@lucasschirm/devinp 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +100 -0
- package/bin/command.js +55164 -0
- package/bin/run.js +19679 -0
- package/data/swe-scores.json +73 -0
- package/package.json +55 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 lucasschirm
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# devinp
|
|
2
|
+
|
|
3
|
+
Pretty pricing table for [Devin](https://devin.ai) models — reads live prices
|
|
4
|
+
from `devin models list`, joins SWE-bench Verified scores, and renders a
|
|
5
|
+
sorted table in your terminal or a web page.
|
|
6
|
+
|
|
7
|
+
Thinking-effort variants that share a price (`low`, `medium`, `high`, `xhigh`,
|
|
8
|
+
`max`, …) are collapsed into one row, so you see one row per price tier — e.g.
|
|
9
|
+
`Claude Opus 5` and `Claude Opus 5 Fast` instead of ten near-identical rows.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm i -g @lucasschirm/devinp
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The package ships as a self-contained bundle — no dependencies are installed.
|
|
18
|
+
|
|
19
|
+
### Requirements
|
|
20
|
+
|
|
21
|
+
- Node.js ≥ 18
|
|
22
|
+
- The [`devin` CLI](https://devin.ai) installed and signed in — prices come from
|
|
23
|
+
your account via `devin models list --format json`. If `devin` is missing or
|
|
24
|
+
not authenticated, `devinp` exits with an error (use `--source` for a saved
|
|
25
|
+
snapshot).
|
|
26
|
+
|
|
27
|
+
## Usage
|
|
28
|
+
|
|
29
|
+
```sh
|
|
30
|
+
devinp # table sorted by best value (SWE % ÷ output price)
|
|
31
|
+
devinp -o=input # cheapest input price first
|
|
32
|
+
devinp -o=cached # cheapest cached-input price first
|
|
33
|
+
devinp -o=output # cheapest output price first
|
|
34
|
+
devinp -o=swe # highest SWE-bench Verified score first
|
|
35
|
+
devinp -o=value # default: best SWE score per output dollar
|
|
36
|
+
|
|
37
|
+
devinp -g=family # section the table by model family
|
|
38
|
+
devinp -g=price # section by identical price tier
|
|
39
|
+
devinp -g=size # section by context window size
|
|
40
|
+
|
|
41
|
+
devinp --web # serve an interactive page on http://127.0.0.1:4321
|
|
42
|
+
devinp --web --port 8080 # pick a port
|
|
43
|
+
|
|
44
|
+
devinp --source models.json # read a saved `devin models list --format json`
|
|
45
|
+
devinp --json # emit normalized rows as JSON
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Reading the table
|
|
49
|
+
|
|
50
|
+
```
|
|
51
|
+
│ # │ Model │ Ctx │ Input │ Cached │ Output │ SWE % │ Value │ Sidekick i/c/o │
|
|
52
|
+
│ 1 │ Gemini 3 Flash │ 1.05M │ $0.5 │ $0.05 │ $3 │ 75.8% │ 25.27 │ — │
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
- Prices are USD per 1M tokens; columns are heat-colored green → red.
|
|
56
|
+
- **Value** = `SWE % ÷ output $/1M` — the score you buy per output dollar.
|
|
57
|
+
Free models show `∞`; models without a SWE score show `—` and sort last
|
|
58
|
+
under `-o=swe` / `-o=value`.
|
|
59
|
+
- Markers: `β` = beta, `●` = new, magenta name = free. `Sidekick` shows the
|
|
60
|
+
partner-model pricing for Fusion rows.
|
|
61
|
+
- Colors disable automatically when piping; `NO_COLOR` / `FORCE_COLOR` are
|
|
62
|
+
respected.
|
|
63
|
+
|
|
64
|
+
## SWE-bench scores
|
|
65
|
+
|
|
66
|
+
Scores live in `data/swe-scores.json` and ship with the package. To refresh
|
|
67
|
+
them (maintainers, manual — not automated):
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
npm run update-swe
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
This scrapes the embedded leaderboard JSON on
|
|
74
|
+
[swebench.com](https://www.swebench.com) — the **Verified** board's
|
|
75
|
+
`mini-SWE-agent` ("Bash Only") entries — and writes `data/swe-scores.json`.
|
|
76
|
+
Leaderboard names that don't map to a family slug are reported under
|
|
77
|
+
`unmatched`; add entries to `MANUAL_MAP` in `scripts/update-swe.js` to fix them.
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```sh
|
|
82
|
+
npm install # installs dev deps (esbuild, oclif, fastify, ansis)
|
|
83
|
+
npm run build # bundle src/ → bin/run.js + bin/command.js (self-contained)
|
|
84
|
+
npm run dev # build + run
|
|
85
|
+
npm test # node --test against sample/models.json
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`bin/` is generated and gitignored; `prepare`/`prepack` build it automatically
|
|
89
|
+
so `npm publish`, git-URL installs, and `npm link` always ship a fresh bundle.
|
|
90
|
+
|
|
91
|
+
## Publishing
|
|
92
|
+
|
|
93
|
+
`.github/workflows/publish.yml` bumps the patch version and publishes with
|
|
94
|
+
[npm trusted publishing](https://docs.npmjs.com/trusted-publishers) (OIDC —
|
|
95
|
+
no `NPM_TOKEN`). Requires the trusted publisher to be configured on npmjs.com:
|
|
96
|
+
repository `lucasschirm/devinp`, workflow `publish.yml`.
|
|
97
|
+
|
|
98
|
+
## License
|
|
99
|
+
|
|
100
|
+
MIT
|