{"_id":"@alicode/cli","_rev":"5-f4b02665c9b2f0eb3e3d60c1a0ea947e","name":"@alicode/cli","dist-tags":{"latest":"1.0.37"},"versions":{"3.0.1":{"name":"@alicode/cli","version":"3.0.1","_id":"@alicode/cli@3.0.1","maintainers":[{"name":"ngwlh","email":"ngwlh@163.com"}],"bin":{"alicode":"dist/cli.js"},"dist":{"shasum":"f3cca1fb7967b416d9ec0ae8aa15afaa3fa9dac6","tarball":"https://registry.npmjs.org/@alicode/cli/-/cli-3.0.1.tgz","fileCount":28,"integrity":"sha512-IwF35OVBLVY0GOKPjXGHsry4C4JpKHf36w7bSzXM4zrTh/gsMTrtGhVP4IfPK2WhlYOG6KRUVMz8e2mPe5pvXw==","signatures":[{"sig":"MEYCIQCIoN4iTSUeF6l1HqQu7hKIAXKNpOPktOIeAeGEvlVWngIhAMWyuX+nO3gBQsrAyBurcs8f9oW5/xB8qneZoBNz4ao/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165281},"main":"dist/cli.js","type":"module","engines":{"node":">=18"},"gitHead":"791b758d292bba92b35b9a7a0ef714da220060ab","scripts":{"postinstall":"node scripts/download-jre.js"},"_npmUser":{"name":"ngwlh","email":"ngwlh@163.com"},"_npmVersion":"10.8.2","description":"JWCode — Java AI Coding Tool TypeScript CLI","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ws":"^8.18.0","ink":"^5.0.0","react":"^18.3.1","marked":"^14.1.0","esbuild":"^0.28.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cli_3.0.1_1781136462101_0.26578924625778044","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已废弃：请使用 @alicode/cli@1.0.37（二进制版）。旧版为 JS 形态，已不再维护。"},"3.0.2":{"name":"@alicode/cli","version":"3.0.2","_id":"@alicode/cli@3.0.2","maintainers":[{"name":"ngwlh","email":"ngwlh@163.com"}],"bin":{"alicode":"dist/cli.js"},"dist":{"shasum":"c509438891fa775a044dbd24ef12c7d3cbd7fa98","tarball":"https://registry.npmjs.org/@alicode/cli/-/cli-3.0.2.tgz","fileCount":28,"integrity":"sha512-lBZLq3LenoakQs4+3dSFqbcqgrmWZU+1zmM4jhkJinyar+XYfCySCeqMFL9eDMyDdSYFGWWRDCiGUL0qb/ZBrA==","signatures":[{"sig":"MEQCIDDYcaKMSlGJo3SBlTRIp8gKd9nNKtlyea2UYlGQnKd5AiAzMV8h4S0oLODjZNd3Yi9jpdygUFXejVdIim48fiEE5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":165281},"main":"dist/cli.js","type":"module","engines":{"node":">=18"},"gitHead":"e94f082dc0edb0f6f87ac17d1ccd28d64210c777","scripts":{"postinstall":"node scripts/download-jre.js"},"_npmUser":{"name":"ngwlh","email":"ngwlh@163.com"},"_npmVersion":"10.8.2","description":"JWCode — Java AI Coding Tool TypeScript CLI","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ws":"^8.18.0","ink":"^5.0.0","react":"^18.3.1","marked":"^14.1.0","esbuild":"^0.28.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cli_3.0.2_1781159492297_0.6134399557504238","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已废弃：请使用 @alicode/cli@1.0.37（二进制版）。旧版为 JS 形态，已不再维护。"},"3.0.4":{"name":"@alicode/cli","version":"3.0.4","_id":"@alicode/cli@3.0.4","maintainers":[{"name":"ngwlh","email":"ngwlh@163.com"}],"bin":{"alicode":"dist/cli.js"},"dist":{"shasum":"f463766f88f443a33c32978204d8017c192f803f","tarball":"https://registry.npmjs.org/@alicode/cli/-/cli-3.0.4.tgz","fileCount":8,"integrity":"sha512-liBXkMsZKVqmfcvwmQgRnjhHycFnICx1VCknf5w5ERIjmYlLM4x/YoQeXo96H2PELmt6YS4Ye2NxOdtYb/x47g==","signatures":[{"sig":"MEQCIA+YuTXd8t93QPktoHu9ofm11qqonb6s715MzCck0ibpAiBBJTxwRzg+pF6CpL1pThBQQUn8MDLK2i+WhYukASgf5Q==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":43720462},"main":"dist/cli.js","type":"module","engines":{"bun":">=1.3.0"},"gitHead":"c392a288b3c89335d7de25af479b376655a6c2de","scripts":{"postinstall":"node scripts/download-jar.js && node scripts/download-jre.js"},"_npmUser":{"name":"ngwlh","email":"ngwlh@163.com"},"_npmVersion":"10.8.2","description":"JWCode — Java AI Coding Tool TypeScript CLI","directories":{},"_nodeVersion":"20.20.2","dependencies":{"ws":"^8.18.0","marked":"^14.1.0","solid-js":"1.9.12","@opentui/core":"^0.4.0","@opentui/solid":"^0.4.0","@solid-primitives/i18n":"2.2.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/cli_3.0.4_1781539509367_0.20718097957794335","host":"s3://npm-registry-packages-npm-production"},"deprecated":"已废弃：请使用 @alicode/cli@1.0.37（二进制版）。旧版为 JS 形态，已不再维护。"},"1.0.37":{"name":"@alicode/cli","version":"1.0.37","license":"SEE LICENSE IN LICENSE.md","_id":"@alicode/cli@1.0.37","maintainers":[{"name":"ngwlh","email":"ngwlh@163.com"}],"bin":{"dscode":"bin/dscode.exe","alicode":"bin/dscode.exe"},"dist":{"shasum":"3ffdd9b01dbaaee00ac13989476ebcbfa0ee8c1c","tarball":"https://registry.npmjs.org/@alicode/cli/-/cli-1.0.37.tgz","fileCount":401,"integrity":"sha512-wPGiNoV7+G0Dq8fE+cDGY/40Fye5SLHE3h4+HETkEuYC9vOqUx5TBJGLHvdzo79OLd0uEi5CAiC+njJ+17cTYw==","signatures":[{"sig":"MEQCIBJXOYEUFisQKqkMcXTW/ohVDiHSAI1rs+fNOXO079JXAiAmr5rTlQ5CJVgzg5yAh96hII/LNB3wwGknXqUlb1rilA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13942010},"type":"module","engines":{"node":">=18"},"gitHead":"114f3c7d0cce5775232d846bfa9cd253d13e25f6","scripts":{"postinstall":"node install.cjs"},"_npmUser":{"name":"ngwlh","email":"ngwlh@163.com"},"_npmVersion":"10.9.8","description":"DeepSeekCode TypeScript CLI","directories":{},"_nodeVersion":"22.23.2","dependencies":{"xterm":"5.3.0","playwright":"1.62.1"},"_hasShrinkwrap":false,"optionalDependencies":{"@alicode/cli-linux-x64":"1.0.37","@alicode/cli-win32-x64":"1.0.37","@alicode/cli-darwin-x64":"1.0.37","@alicode/cli-linux-arm64":"1.0.37","@alicode/cli-win32-arm64":"1.0.37","@alicode/cli-darwin-arm64":"1.0.37","@alicode/cli-linux-x64-musl":"1.0.37","@alicode/cli-linux-arm64-musl":"1.0.37"},"_npmOperationalInternal":{"tmp":"tmp/cli_1.0.37_1789352586211_0.39354575589136775","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-06-11T00:07:41.786Z","modified":"2026-09-15T14:14:53.563Z","3.0.1":"2026-06-11T00:07:42.248Z","3.0.2":"2026-06-11T06:31:32.430Z","3.0.4":"2026-06-15T16:05:10.037Z","1.0.37":"2026-09-14T02:23:06.472Z"},"license":"SEE LICENSE IN LICENSE.md","description":"DeepSeekCode TypeScript CLI","maintainers":[{"name":"ngwlh","email":"ngwlh@163.com"}],"readme":"# @deepseekcode/cli\n\n[![npm version](https://img.shields.io/npm/v/@deepseekcode/cli.svg)](https://www.npmjs.com/package/@deepseekcode/cli)\n[![License: Proprietary](https://img.shields.io/badge/license-Proprietary-red.svg)](#license)\n[![Node version](https://img.shields.io/node/v/@deepseekcode/cli.svg)](https://nodejs.org)\n\n**DeepSeekCode CLI** — a TypeScript-first AI coding agent with an interactive terminal UI, a built-in web UI, and a local HTTP/WS runtime. It starts a full agent core in-process, opens an [Ink](https://github.com/vadimdemedes/ink) (React-for-terminal) interface in your terminal, and serves a companion web UI you can use for configuration and remote access.\n\n- **TUI** — interactive, keyboard-first coding agent in your terminal\n- **Local runtime** — spins up an in-process server (HTTP + WebSocket), no separate install needed\n- **Web UI** — configuration & model management at `http://localhost:8080`\n- **Non-interactive modes** — `exec`, `codeview`, `test-fix` for scripts & CI\n- **Multi-theme** — dark / light / nord / dracula / monokai / one-dark / tokyo-night\n\nRequires **Node.js >= 18**.\n\n---\n\n## Install\n\n```bash\nnpm install -g @deepseekcode/cli\n```\n\nOr with your favorite package manager:\n\n```bash\n# pnpm\npnpm add -g @deepseekcode/cli\n\n# yarn\nyarn global add @deepseekcode/cli\n\n# bun\nbun add -g @deepseekcode/cli\n```\n\nThis installs two commands: **`dscode`** (short) and **`deepseekcode`** (full name).\n\n## Quick Start\n\n```bash\ndscode\n```\n\nThat's it. The CLI starts the local agent runtime and opens the interactive terminal. On first run (no provider configured) it prints a link to the web UI where you can set up your LLM provider and model:\n\n```bash\n# model/provider setup page (also served by the CLI)\n# → http://localhost:8080/#models\n```\n\nIf your terminal's stdin isn't a TTY (e.g. a script or CI pipeline), the CLI skips the TUI and runs **headless** — the web UI stays available at the printed URL.\n\nConnect to an **existing** backend instead of starting a local one:\n\n```bash\ndscode run --backend http://localhost:8080\n```\n\nResume your last session (or a specific one):\n\n```bash\ndscode --resume          # last session\ndscode --resume <id>     # specific session\n```\n\n## CLI Commands\n\n| Command | Description |\n|---------|-------------|\n| `dscode` / `dscode start` | Start local runtime + interactive TUI (also serves Web UI + API) |\n| `dscode start --auto` | Start with auto-approval mode enabled |\n| `dscode run --backend URL` | Connect to an existing backend instead of starting one |\n| `dscode exec <command>` | Execute a command non-interactively (JSONL output) |\n| `dscode exec --file <path>` | Read the command from a file |\n| `dscode codeview` | AI code review — bugs + unwired features (JSON output) |\n| `dscode review` | Review current code changes (legacy) |\n| `dscode test-fix` | Run the auto-fix test loop |\n| `dscode --resume [id]` | Resume the last session, or a specific one |\n| `dscode version` | Print version |\n\nRun `dscode --help` (or `-h`) for the full list.\n\n### Non-interactive examples\n\n```bash\n# Execute a command, get JSONL results\ndscode exec \"fix the failing test in src/utils\"\n\n# Plain text output, command from file\ndscode exec --file ./task.txt --text\n\n# AI code review focused on security, write report to file\ndscode codeview --focus security --output review.json\n\n# Auto-fix test loop (max 5 retries, analyze only)\ndscode test-fix --packages packages/cli --retries 5 --dry-run\n```\n\n## Interactive Commands\n\nInside the TUI, use `/help` for the full list (most commands have Chinese aliases). Highlights:\n\n| Command | Action |\n|---------|--------|\n| `/help` | Show all commands |\n| `/model [name]` | Open model picker or switch model directly |\n| `/theme [name]` | Show or change terminal theme |\n| `/plan` | Toggle plan mode (review before executing) |\n| `/auto` | Toggle auto-approval mode |\n| `/mode <mode>` | Cycle/set mode: act · auto-act · plan · auto-plan · goal · auto-goal |\n| `/goal` | Set goal-directed mode |\n| `/thinking` | Toggle think mode on/off |\n| `/context` | Show current conversation state |\n| `/sessions [id]` / `/resume [id]` | List history / switch session |\n| `/tasks` | Toggle sub-task output panel |\n| `/undo [list]` | Undo the most recent file change |\n| `/clear` | Start a new session (current session is saved, resumable via `/sessions`) |\n| `/mcp <action>` | Manage MCP servers |\n| `/skills` | Insert a skill |\n| `/trace <traceId>` | Query a trace by id |\n| `/stop` `/pause` `/continue` | Control AI generation |\n| `/exit` | Exit |\n\n## Options\n\n| Option | Description |\n|--------|-------------|\n| `-p, --port <port>` | HTTP port (default: first available from 8080) |\n| `--ws-port <port>` | WebSocket port (default: HTTP port + 1) |\n| `-w, --workspace <dir>` | Workspace directory (default: current directory) |\n| `-F, --force` | Kill an existing process on the target port before starting |\n| `-b, --backend <url>` | Backend URL for `run` mode |\n| `--ws <url>` | Override WebSocket URL |\n| `--provider <name>` | Provider to use (exec/review) |\n| `--model <name>` | Model to use (exec/review) |\n| `--theme <name\\|path>` | Theme name or JSON theme file path |\n| `--prompt-version <ver>` | Prompt template version |\n| `--timeout <ms>` | Per-attempt LLM timeout (default: 300000 = 5 min) |\n| `--stall-threshold <ms>` | Stream stall detection threshold (default: 240000 = 4 min) |\n| `--no-update-check` | Disable the startup new-version notice |\n| `--no-auto-update` | Disable background auto-update (notice still shown) |\n\n## Configuration\n\nThe CLI reads `~/.agent/config.yaml`:\n\n```yaml\nbackend_url: http://localhost:8080\nws_url: ws://localhost:8081/ws\nworkspace_dir: /path/to/workspace\n```\n\nProvider / model settings are managed through the web UI at `http://localhost:8080/#models`.\n\n## Themes\n\nSet the theme at startup via the `DEEPSEEKCODE_THEME` env var (or `--theme`):\n\n| Theme | Env Value | Style |\n|-------|-----------|-------|\n| Dark (default) | `dark` | ANSI named colors, broad compat |\n| Light | `light` | Light terminal variant |\n| Nord | `nord` | Arctic blue-grey palette |\n| Dracula | `dracula` | Dark purple-vibrant |\n| Monokai | `monokai` | Classic code editor |\n| One Dark | `one-dark` | Atom's iconic dark |\n| Tokyo Night | `tokyo-night` | Deep navy + vibrant accents |\n\n```bash\nDEEPSEEKCODE_THEME=nord dscode\nDEEPSEEKCODE_THEME=/path/to/my-theme.json dscode\n\n# Partial overrides on the current theme (JSON)\nDEEPSEEKCODE_THEME_COLORS='{\"primary\":\"#ff0000\"}' dscode\n```\n\nSwitch themes at runtime with `/theme [name]`.\n\n## Auto-Update\n\nOn startup, `dscode` checks npm for the latest version asynchronously (non-blocking). When a newer version is found, the CLI **automatically reinstalls the global package** in the background (`npm install -g @deepseekcode/cli@latest`); the new version takes effect on the next launch.\n\n- Only affects **global npm installs** — source builds and `npx`/`bunx` caches are never touched.\n- Disable auto-install (keep the version notice): `DEEPSEEKCODE_NO_AUTO_UPDATE=1` or `--no-auto-update`\n- Disable the check entirely: `DEEPSEEKCODE_NO_UPDATE_CHECK=1` or `--no-update-check`\n\n## Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `DEEPSEEKCODE_THEME` | Theme name or JSON theme file |\n| `DEEPSEEKCODE_THEME_COLORS` | JSON partial color overrides |\n| `DEEPSEEKCODE_HTTP_PORT` / `DEEPSEEKCODE_WS_PORT` | Default HTTP / WebSocket ports |\n| `DEEPSEEKCODE_QUIET=1` | Suppress non-fatal startup warnings |\n| `DEEPSEEKCODE_NO_AUTO_UPDATE=1` | Disable background auto-update |\n| `DEEPSEEKCODE_NO_UPDATE_CHECK=1` | Disable the version check |\n| `DEEPSEEKCODE_FORCE_UTF8=0` | Skip forcing the Windows console to UTF-8 |\n| `DSC_HEAP_LIMIT_MB` | Node heap limit hint for large sessions (default: 8192) |\n\n## Terminal Verdict Figures\n\nThe `terminal_figure` tool and the Web UI's terminal-verdict button replay captured ANSI bytes through xterm.js and Playwright, then compose a PNG with Python Pillow.\n\nThe published package includes the replay/composition scripts and declares its Node dependencies. The host still needs:\n\n- a Python interpreter with Pillow installed;\n- a Playwright Chromium browser (`npx playwright install chromium` or the equivalent for your package manager).\n\nIf either prerequisite is unavailable, the feature returns an actionable setup error and does not silently write outside the workspace. Capture remains a separate CLI/TUI step because it depends on the specific interface under test.\n\n## License\n\nProprietary — © 2026 DeepSeekCode. All rights reserved.\n\nThis software is proprietary and closed source; it is **not** open source. Copying,\nmodifying, distributing, sublicensing, or selling it requires the prior written\npermission of the copyright holder.\n\nSee `LICENSE.md` for the full terms.\n","readmeFilename":"README.md"}