@benchcode/cli 0.0.0-stage → 1.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.
Files changed (3) hide show
  1. package/README.md +66 -2
  2. package/bin/benchcode.js +2599 -0
  3. package/package.json +15 -4
package/README.md CHANGED
@@ -1,3 +1,67 @@
1
- # Temporary Holding Version
1
+ # BenchCode
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ A terminal coding agent for the [Ahar AI API](https://api.aharai.qzz.io). Full-screen interface, formatted Markdown, diffs, tools, and a live credits panel. No dependencies, just Node.js 18+.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ # Linux, macOS, WSL, Termux, FreeBSD
9
+ curl -fsSL https://api.aharai.qzz.io/v2/install | bash
10
+
11
+ # Windows (PowerShell)
12
+ irm https://api.aharai.qzz.io/v2/install | iex
13
+
14
+ # any OS with Node.js 18+
15
+ npm install -g @benchcode/cli
16
+ ```
17
+
18
+ ## Sign in (no API key to copy)
19
+
20
+ ```bash
21
+ benchcode login # opens your browser, approve the code, done
22
+ ```
23
+
24
+ On a machine without a browser, open the printed link on your phone: the code flow works anywhere. `benchcode login --key` is there if you prefer pasting a key.
25
+
26
+ ## Use
27
+
28
+ ```bash
29
+ cd my-project
30
+ benchcode # full-screen interface
31
+ benchcode -c # continue the last session here
32
+ benchcode "add input validation and run the tests" # one task, plain output
33
+ cat error.log | benchcode "why is this failing?"
34
+ ```
35
+
36
+ **In the interface**
37
+
38
+ | Key | Does |
39
+ |-----|------|
40
+ | `enter` | send (`alt+enter` or a trailing `\` for a new line) |
41
+ | `tab` | switch **Build** (full access) / **Plan** (read-only) |
42
+ | `ctrl+p` | command palette |
43
+ | `/` | slash commands: `/model /new /sessions /undo /copy /compact /credits /buy /login /think /auto /init /help` |
44
+ | `↑` on an empty prompt, or click a message | **Revert** (undoes the messages and the file changes), **Copy**, **Fork** |
45
+ | `esc` | interrupt the running task |
46
+ | `pgup/pgdn`, mouse wheel | scroll |
47
+ | `!cmd` | run a shell command yourself |
48
+
49
+ The right panel shows your **purchased credits**, **free credits left today with a countdown to the reset (00:00 UTC)**, tokens in context, credits spent this session, the todo list and changed files. On narrow terminals the same numbers sit in the footer.
50
+
51
+ ## Tools the agent has
52
+
53
+ `list_dir` `read_file` `search` `find_files` `write_file` `edit_file` `multi_edit` `move_file` `delete_file` `run_command` `run_background` `background_output` `kill_background` `web_fetch` `web_search` `todo_write` `ask_user` `generate_image` `transcribe_audio`
54
+
55
+ Reads are free. Writes, edits, deletes and commands ask first (allow once / always / deny), except harmless read-only commands. Image and audio tools ask before spending extra credits. `--yes` or `/auto` approves everything.
56
+
57
+ Put project rules in `BENCHCODE.md` (also reads `AGENTS.md` / `CLAUDE.md`); `/init` writes one for you.
58
+
59
+ ## Credits
60
+
61
+ Every model call costs credits and one task usually takes several calls. `benchcode models` shows each model's cost. Free credits reset daily; purchased credits never expire.
62
+
63
+ ## Maintainers
64
+
65
+ Source is in `src/*.js`; `node build.js` joins it into `bin/benchcode.js`.
66
+ To ship a version: bump `VERSION` (`src/10-base.js`) and `package.json`, run `node build.js`, then
67
+ `node build-worker.js path/to/worker.js path/to/worker.new.js` and deploy the Worker (this serves `/v2/*`), then `npm publish --access public`.