Amber

v1.17.0

HomeDocsCompatibilityBlogPlaygroundGitHub
GitHub

v1.17.0

Docs/Guides

CLI reference

Stable

Every amber subcommand in v1.17.0, grouped by maturity. Checked against src/main.rs.

Run amber --help or amber <command> --help for the full flag list on your build.

Stable commands

CommandWhat it doesContract
amber run <file> [args...]Run a JS or TS file—
amber eval <code>Evaluate a snippet and print the result—
amber replInteractive REPL—
amber test [file]Discover and run Jest-style testsTesting
amber bundle <entry> -o <out>Pack a local module graph into one JS fileBUNDLE_CONTRACT.md
amber compile <entry> -o <bin>Build a single executable for this hostCOMPILE_CONTRACT.md
amber install [--frozen-lockfile]Install direct dependencies from package.jsonINSTALL_CONTRACT.md
amber serve [file]Serve a fetch handler over HTTP/1.1SERVE_HTTP_CONTRACT.md
amber serve --https --cert --keySame, over rustls TLSSERVE_HTTPS_CONTRACT.md
amber session <file>JSON-RPC tool session over stdin and stdoutMCP & sessions
amber mcp <file>MCP stdio server for a tool fileMCP & sessions
amber snapshot build|status|cleanManage the V8 startup snapshot—
amber version / amber --versionPrint the version—

Stable amber run flags

FlagWhat it doesContract
--watch, -wRe-run the entry when a watched file changesWATCH_CONTRACT.md
--inspect, --inspect-brk, --inspect-portA small CDP endpoint on 127.0.0.1INSPECT_CONTRACT.md
--export-toolsPrint tool schemas as JSON and exit, without running the fileEXPORT_TOOLS_CONTRACT.md

--watch restarts the whole process after the previous run returns. It is not hot module replacement.

Permission and determinism flags

These flags work on run, test, serve, session, mcp, and the other commands that execute code.

FlagWhat it does
--sandboxDeny file, network, environment, and child-process access by default
--allow-read <path> / --allow-write <path>Allow one exact path (repeatable)
--allow-net <host> / --allow-listen <host>Allow outbound connections or listeners for a host or URL
--allow-env <NAME> / --allow-run <command>Allow one variable or one command
--deny-fs, --deny-net, --deny-env, --deny-runDeny one capability without the full sandbox
--permission-policy <file>Load allow and deny rules from JSON
--audit-log <file>Append each permission decision as JSONL
--seed <u64>Seed Math.random, crypto.getRandomValues, and crypto.randomBytes
--freeze-time <spec>Freeze Date.now, new Date(), and performance.now
--timeout <ms> / --max-memory <MB>Stop runaway scripts

See Agent sandbox for examples.

Experimental commands

These commands exist, but they are outside the Stable scope. Expect rough edges.

CommandNotes
amber debug <file>Older debug entry point. Use amber run --inspect instead.
amber init, amber createProject scaffolding
amber add, amber remove, amber prune, amber upgradePackage edits outside the amber install contract
amber x <pkg> (aliases dlx, bunx)Run a package binary without installing
amber test --parallelRejected with exit code 2. V8 isolates are not shared across threads.

Present but not classified

The binary also includes these commands. CURRENT_SCOPE.md does not classify them yet, so this manual treats them as Experimental: amber fmt, amber lint, amber bench, amber task, amber types, amber lsp, amber profile, amber deploy, amber record, and amber replay, plus the --import-map and --virtual-fs flags. See Experimental.

Exit codes

Contracted failures print a prefix such as error: amber serve: or error: amber install: and exit non-zero. Misuse of a flag, such as amber test --parallel, exits 2.

Edit this page on GitHub