undernet-coder
v1.0.9
Published
UnderNet Coder for the terminal: an AI coding agent (like Claude Code) powered by UnderNet GPT. Reads, edits and tests your project from any shell.
Maintainers
Readme
UnderNet Coder CLI
The terminal version of UnderNet Coder: an AI coding agent that works like Claude Code, powered by UnderNet GPT (https://safechat.undernet.click, OpenAI-compatible endpoint). Same brain and same tools as the VS Code extension, but it runs anywhere you have a shell: local terminal, SSH, CI, Docker.
◆ UnderNet Coder v1.0.0
folder: /home/me/my-app
mode: CODE
❯ add a /health endpoint to the express server and a test for it
● Detecting project setup
● Reading src/server.ts · 84 lines
src/server.ts +6 −0
…
+ app.get("/health", (_req, res) => res.json({ ok: true }));
? Apply this edit? [y]es / [n]o / [a]ll for this task y
✓ updated src/server.ts
$ pnpm test
↳ exit 0
✓ Added GET /health returning {ok:true} and a vitest case. Verify with `pnpm test`.
6 steps · 14k tokens · ≈ $0.05 · 2 files changedInstall
Requires Node.js 18.17+ (Node 20+ recommended).
npm install -g undernet-coderThat gives you the aye command (and undernet-coder). Mirror without npm registry access: npm install -g https://undernet.work/downloads/undernet-coder-cli.tgz.
Updates are automatic: once a day it checks npm and, if there is a newer version, installs it quietly in the background so the next start uses it. aye update installs immediately; /set autoUpdate false turns the background install off (you still get a notice).
From source
pnpm install
pnpm build
npm link # `aye` now points at this folderPublishing a new version
npm version patch # bumps package.json, commits and tags
npm publish # runs check-types, tests and bundle first (prepublishOnly)
pnpm release # optional: refresh the tarball mirror in the web app's downloads folderFirst run
cd your-project
undernetPaste your UnderNet API key (starts with sc-, from https://undernet.work) when asked. It is stored in ~/.undernet-coder/config.json. You can also set UNDERNET_API_KEY in the environment, which takes precedence.
Usage
undernet interactive session in the current folder
undernet "fix the failing tests" run one task, stay interactive
undernet -p "summarise src/" print mode: no prompts, auto-approve, exit code 0/1 (scripts, CI)
undernet --ask confirm each edit and command (auto-approve is the default)
undernet --plan start read-only, get a numbered plan, say "go" to execute
undernet -c continue the last task in this folder
undernet -r <id> resume a task from /history
undernet -C ../other-project work in another folderInside a session:
| Command | What it does |
| --- | --- |
| /plan, /code | Switch between read-only PLAN mode and CODE mode |
| /auto on\|off | Auto-approve edits and commands. On by default (same as the extension); /auto off or aye --ask makes it confirm each step |
| /key | Set or replace the API key |
| /wallet | Show balance |
| /changes, /undo, /revert <file> | See and undo what this task changed (git checkpoint when the folder is a repo) |
| /history, /resume <n>, /delete <n> | Recent tasks (kept in ~/.undernet-coder/history) |
| /new | Start a fresh task |
| /settings, /set <key> <value> | Same settings as the extension: autoApproveEdits, autoApproveCommands, maxSteps, instructions, maxOutputTokens, reasoning (low/high), webSearch, temperature, maxCostPerTask (0 = no limit, the default), gitCheckpoints |
| /cost | Tokens and estimated cost |
| /exit | Quit (Ctrl+C twice also works) |
Extras: @path/to/file attaches a file to your message, !cmd runs a shell command directly, and ending a line with \ continues on the next line. Ctrl+C during a task stops it.
Persian/Arabic text: Windows consoles and VS Code's terminal do not join Arabic letters or apply right-to-left order, so the CLI shapes and reorders such text itself (model output and what you type). It is on automatically on Windows and in VS Code; /set rtl on|off|shape overrides: off for a terminal that renders RTL natively (some Linux terminals), shape for one that orders right-to-left itself but does not join letters.
AGENTS.md and .undernet-coder.md in the project root are sent with every task (the agent writes notes to the latter with its remember tool).
Tools the agent has
Files: list_files, read_file, read_lines, search, grep (ripgrep when available), write_file, apply_patch, multi_edit, delete_file, move_file, create_directory, format_file, revert_file.
Code intelligence: get_diagnostics (runs tsc and eslint, returns path:line:col), outline, go_to_definition, find_references, rename_symbol (TypeScript/JavaScript, via the project's own typescript package).
Commands: run_command, run_in_background, run_tests, list_processes, read_process_output, stop_process, kill_port, wait, env_info, detect_project.
Network: fetch_url, http_request, open_in_browser, plus a headless browser (browser_open, browser_screenshot, browser_click, browser_type, browser_console, browser_close) when playwright-core and Chrome/Edge are installed.
Git: git_status, git_diff, git_log, git_branch, git_stash, git_commit.
Control: ask_user, remember, switch_mode, task_complete.
Differences from the VS Code extension: there is no editor, so get_editor_context, install_extension and open_file do not exist. Read-only tool calls issued together in one reply run in parallel, and a dropped connection mid-reply is resumed automatically (up to 3 times) without losing the text already streamed.
Build and test
pnpm check-types # tsc
pnpm test # unit tests + agent-loop integration tests against a scripted mock server (parallel tools, PLAN mode, reconnect)
pnpm bundle # esbuild → dist/cli.js (single file, no runtime deps)