CLI reference
This page is verified against the clap-style argument parser in
crates/lime-cli/src/cli/parser.rs. Anything not listed here is not
accepted.
Synopsis
lime [OPTIONS] [SUBCOMMAND] [ARGS...]Run lime with no arguments to start the interactive REPL.
Top-level flags
These flags work without a subcommand and shape REPL behavior.
| Flag | Type | Default | Description |
|---|---|---|---|
--help, -h | bool | — | Print help and exit. |
--version, -V | bool | — | Print version and exit. |
--model SLUG | string | gpt-5.4 | Active model. Accepts any slug from the merged catalog (built-ins + ~/.lime/models.json). |
--permission-mode MODE | enum | default | One of default, plan, acceptEdits, bypassPermissions, dontAsk. |
--dangerously-skip-permissions | bool | false | Force bypassPermissions. |
--settings FILE_OR_JSON | path | inline JSON | — | Extra settings — file path or inline JSON, applied last (highest precedence). |
--setting-sources LIST | csv | all | Restrict the merged config to a CSV of policy, user, project, local, flag. |
--add-dir DIRECTORY | path (repeatable) | — | Additional directories the agent may read/write (in addition to the workspace). |
--continue, -c | bool | false | Resume the most recent session. |
--resume [REF] | path | id | latest | latest | Resume a specific session. Trailing tokens after --resume must be slash commands. |
--allowedTools TOOLS | csv (repeatable) | all | Restrict the enabled tool set. |
--reasoning-effort LEVEL | enum | medium | One of none, low, medium, high, xhigh. |
--verbosity LEVEL | enum | medium | One of low, medium, high. |
--service-tier TIER | string | — | Provider service tier (e.g. default, priority on OpenAI). |
--output-schema FILE | path | — | Constrain the final response to a JSON Schema. See Structured output. |
--ide MODE | auto | off | port | auto | IDE companion mode. auto discovers a running VS Code companion via ~/.lime/ide/. |
Subcommands
lime init
Bootstrap repo-local Lime files: AGENTS.md, .lime/, .lime.json, and
relevant .gitignore entries.
lime status
Print a snapshot of session, model, token, workspace, and provider state.
lime sandbox
Print the sandbox isolation snapshot. See Sandboxing.
lime help, lime version
Aliases for --help and --version.
lime bootstrap-plan
Print the bootstrap-phase skeleton used by lime init.
lime agents [args...]
List or manage configured agents. With no args, lists all.
lime skills [args...]
List or manage discovered skills.
lime command|cmd|commands [args...]
Manage user-scope custom slash commands at ~/.lime/commands/*.md.
Subcommands include list, show, create, edit, delete, help.
lime system-prompt
Render the resolved system prompt as it would be assembled for a turn.
| Flag | Default | Description |
|---|---|---|
--cwd PATH | current dir | Pretend the cwd is PATH. |
--date YYYY-MM-DD | today | Pretend “today” is the given date. |
lime login
Store provider credentials under ~/.lime/. Keys stored here override the
corresponding environment variables.
| Flag | Description |
|---|---|
--status | Print credential status. Combine with --provider to filter. |
--provider NAME | One of openai, anthropic, gemini, openai-compat (alias openai_compat). |
--service NAME | OpenAI-compatible service name. Namespaces credentials under openai_compat:<service>. |
--with-api-key [VALUE] | Supply an API key. If VALUE is omitted, Lime reads the key from stdin (no echo). |
--with-base-url URL | Custom endpoint URL. Requires --with-api-key. |
lime login --with-api-key # OpenAIlime login --provider anthropic --with-api-keylime login --provider openai-compat --service groq \ --with-api-key --with-base-url https://api.groq.com/openai/v1lime login --statuslime logout
Remove stored credentials.
| Flag | Description |
|---|---|
--provider NAME | Clear one provider’s credentials. |
--service NAME | Clear one compat service. |
With no flags, clears all.
lime model | lime models
Manage user entries in ~/.lime/models.json. See
Custom models for the full discussion.
| Subcommand | Description |
|---|---|
list, ls | Print the merged catalog (built-in + user). |
add (with flags below) | Add or override a model entry. |
rm, remove, delete SLUG | Remove a user entry. Built-ins always survive. |
lime model add flags:
| Flag | Required | Notes |
|---|---|---|
--slug SLUG | ✓ | Identifier used by --model / /model. |
--provider NAME | ✓ | One of openai, anthropic, gemini, openai-compat, custom. |
--context-window N | ✓ | Full context window in tokens. |
--service NAME | Required when --provider openai-compat. Pins to a credential bucket. | |
--display-name STR | Defaults to the slug. | |
--description STR, --desc STR | Defaults to "Custom model". | |
--api-id STR, --api-model-id STR | Wire model id when it differs from the slug. | |
--max-output N, --max-output-tokens N | Default response cap. Derived if omitted. | |
--upper-max-output N | Upper retry / thinking cap. | |
--auto-compact N, --auto-compact-threshold N | Token count at which auto-compaction fires. | |
--param-preset NAME | One of none, verbosity, reasoning, reasoning-and-verbosity. | |
--vision | Model accepts images. | |
--reasoning-summaries | OpenAI-style reasoning summaries. | |
--parallel-tools | Multiple tool calls per turn. | |
--extended-thinking, --thinking | Anthropic-style extended thinking. |
lime mcp
Manage MCP servers. Scopes: local (project, untracked), project
(committed .lime.json / .mcp.json), user (global ~/.lime/).
| Subcommand | Notes |
|---|---|
serve | Run Lime itself as an MCP server. |
list, ls | List configured servers across scopes. |
get NAME | Print one server’s resolved config. |
add | Add a server. Flags: --transport stdio|sse|http (-t), --scope local|project|user (-s), -e KEY=VALUE (stdio env), -H "Key: Value" (remote header). End flag list with --. The CLI shortcut covers the three common transports; for ws, sdk, streamable-http, or lime-proxy use add-json. |
add-json NAME JSON | Add a server from a literal JSON object — accepts every mcpServers.type value. Flag: --scope. Example: lime mcp add-json my-srv '{"type":"http","url":"…"}' -s user. |
remove, rm | Remove a server. Flag: --scope. |
enable NAME | Enable a previously-disabled server. |
disable NAME | Disable a server without removing its config. |
reset-project-choices | Forget per-project trust decisions. |
lime bridge
Run the JSON-RPC 2.0 bridge.
| Flag | Description |
|---|---|
--ws | Switch to WebSocket transport (default is stdio). |
--ws-port PORT | Port for the WS bind (default 8765). Implies --ws. |
--ws-token T | Shared bearer token for WS auth. |
--device-auth | Use the device-registry for WS auth. Mutually exclusive with --ws-token. |
--no-redact | Disable outbound redaction for trusted local-only setups. |
--status | Print bridge engine status and exit. |
lime remote
Drive Lime over a Cloudflare tunnel. See Remote control.
| Subcommand | Flags |
|---|---|
start | --persistent NAME, --url URL (require each other), --no-auto-install. |
pair | --label LABEL (required). Mints a one-time device token. |
devices, list | List registered devices. |
revoke DEVICE_ID | Revoke a device. |
Direct slash invocation
Slash commands accepted on the CLI must come from a lime --resume form.
Bare lime /<command> works for a small handful that are non-interactive
(/help, /agents, /command, /skills); the rest will print a clear
error pointing you at lime --resume.
Exit codes
| Code | Meaning |
|---|---|
0 | Success. |
1 | Argument parse error or unrecoverable runtime error. |
2 | Provider authentication failure. |
3 | Permission denied (in dontAsk mode with a deny rule). |
130 | Interrupted (Ctrl-C). |