@cheapcode/cli
v0.23.0
Published
Cheap Code: the coding-agent terminal for the CheapVibeCode project.
Downloads
913
Maintainers
Readme
Cheap Code
Cheap Code is the coding-agent terminal for CheapVibeCode.
Install
Requires Node.js 22 or newer.
npm install -g @cheapcode/cli@latest
cheapcodeRun once without a global installation:
npx --yes @cheapcode/cliThe same npm command works on Windows, macOS, and Linux and exposes the
cheapcode command globally.
For local development from the repository root on Windows PowerShell:
.\scripts\install-cheapcode-cli.ps1On Linux/macOS:
bash scripts/install-cheapcode-cli.shThe installer checks Node.js, installs Bun if needed, installs dependencies,
builds dist/cli.mjs, and links these commands globally:
cheapcode
To build the downloadable archive served by the website:
.\scripts\package-cheapcode-cli.ps1Run
cheapcodeOn installation or the first interactive run, Cheap Code offers two methods:
- Sign in through
cheapvibecode.ru(recommended). The browser links a separate, revocable CLI session to the user's profile, balance, and settings. - Enter an API key. Existing
CVC_API_KEY,.env,--provider-env-file, and saved-profile workflows continue to work. Manual key input is masked.
Both browser sessions and manually entered keys are stored in the local user profile with owner-only permissions.
You can manage the saved key explicitly:
cheapcode auth login
cheapcode auth login --key
cheapcode auth status --text
cheapcode auth logoutInside an interactive Cheap Code session, /logout performs the same action
and then exits the current process so it cannot keep using stale credentials.
Cheap Code does not use Claude account authorization or the Claude subscription OAuth flow.
Useful maintenance commands:
cheapcode --help
cheapcode --version
cheapcode updateInside an interactive session, release history comes from the official Cheap Code manifest:
/release-notes # installed version (works offline)
/release-notes latest # refresh from the official Cheap Code manifest
/release-notes 0.22.0 # one exact version
/release-notes all # complete available history/changelog is an alias. Release metadata is maintained in
release-notes.json, embedded into the CLI bundle, and copied into the
verified-archive manifest during packaging.
Sandbox
Cheap Code uses Codex-compatible sandbox policies for model-generated shell
commands. The default is workspace-write: commands may read the filesystem,
but writes are limited to the workspace, /tmp, TMPDIR, and directories
added with --add-dir; outbound network access is denied unless a domain is
approved. Project metadata such as .git, .agents, .codex, and .cheapcode
remains read-only and uses the normal approval flow when a command needs to
change it.
Select a policy for one session with the same flag and values as Codex CLI:
cheapcode --sandbox read-only
cheapcode -s workspace-write
cheapcode --sandbox danger-full-accessThe modes are:
read-only— filesystem writes require approval.workspace-write— workspace and temporary-directory writes are sandboxed; this is the default.danger-full-access— disables OS sandboxing. Cheap Code's separate tool permission rules still apply.
Use /sandbox in an interactive session to inspect or change the mode. It can
also be configured in settings.json:
{
"sandbox": {
"mode": "workspace-write"
}
}The implementation uses Seatbelt on macOS, bubblewrap on Linux/WSL2, and the
Sandbox Runtime Windows backend. On Linux, /doctor reports missing sandbox
dependencies.
Long sessions default to an 8 GB Node.js old-space limit. Override it with either supported launcher form:
cheapcode --max-memory=4096
cheapcode --max-memory 4096For provider variables stored in a local env file:
cheapcode --provider-env-file .envThe launcher stores Cheap Code-specific CLI state in
~/.cheapcode-cli by default. Override it with
CHEAPCODE_CLI_CONFIG_DIR if needed.
Token and context efficiency
Cheap Code defers MCP tool schemas until the model actually needs them, compresses old tool results, preserves prompt-cache prefixes, and batches automatic memory extraction. The default memory extractor runs once per five eligible user turns instead of spawning a background agent after every turn.
Use /config to change Background memory extraction:
every 5 turns(default) — balanced persistence and costevery 10 turns— cheaper for high-volume sessionsevery turn— maximum memory freshness, highest token useoff— disables automatic extraction but keeps explicit memory reads and writes available
For one session, the environment variable takes precedence over settings:
CHEAPCODE_MEMORY_EXTRACTION_INTERVAL=10 cheapcode
CHEAPCODE_MEMORY_EXTRACTION_INTERVAL=off cheapcodeUseful diagnostics:
/context # what currently occupies the context window
/ctx # compact context visualization
/cache-stats # prompt-cache reads, writes, and hit ratio
/doctor # oversized memory, agent, and MCP warningsThird-party hooks that intercept Bash or rewrite tool output should remain experimental until their interaction with tool-history compression and context collapse has been measured.
Develop
cd cli
bun install --frozen-lockfile
bun run build
node bin/cheapcode --versionRun the complete release gate before packaging:
bun run checkIt covers type checking, generated integration drift, release-manifest consistency, a production smoke build, the privacy guard, dead-code analysis, and the full test suite.
