Skip to content

CLI Reference

Command-line interface for llmist.

Terminal window
npx @llmist/cli

Create a starter configuration file at ~/.llmist/cli.toml:

Terminal window
npx @llmist/cli init

Display resolved configuration for profiles, including fully rendered system prompts:

Terminal window
# List all available profiles
npx @llmist/cli config
# Show resolved config for a specific profile
npx @llmist/cli config code-review

Shows:

  • Inheritance chain
  • Model, temperature, max-iterations
  • Gadgets and approval settings
  • Fully rendered system prompt (with all includes resolved)

Stream a single response without agent loop:

Terminal window
npx @llmist/cli complete "Explain TypeScript generics" --model haiku

Options:

| Flag | Short | Description | Default | |------|-------|-------------|---------| | --model <model> | -m | Model name or alias | gpt-5-nano | | --system <prompt> | -s | System prompt | none | | --temperature <n> | -t | Temperature (0-2) | Provider default | | --max-tokens <n> | | Max output tokens | Provider default | | --quiet | -q | Suppress all output except content | false |

Run the full agent loop with tools:

Terminal window
npx @llmist/cli agent "How many floppies for DOOM.ZIP?" --gadget ./floppy.ts --model sonnet

Options:

| Flag | Short | Description | Default | |------|-------|-------------|---------| | --model <model> | -m | Model name or alias | gpt-5-nano | | --system <prompt> | -s | System prompt | none | | --temperature <n> | -t | Temperature (0-2) | Provider default | | --max-iterations <n> | -i | Max agent iterations | 10 | | --gadget <path> | -g | Gadget file (repeatable) | none | | --mcp-server <spec> | | Attach an MCP stdio server; repeatable | none | | --mcp-trust <name> | | Bypass stdio command allowlist for a named MCP server | none | | --no-builtins | | Disable all built-in gadgets | false | | --no-builtin-interaction | | Disable AskUser gadget | false | | --quiet | -q | Suppress output except TellUser | false |

Built-in Gadgets:

| Gadget | Description | |--------|-------------| | AskUser | Asks the user a question and waits for response | | TellUser | Outputs a message with type indicator. Set done=true to end conversation |

Manage MCP interoperability:

Terminal window
# Import existing Claude Code MCP servers as llmist TOML
npx @llmist/cli mcp import-claude-code >> ~/.llmist/cli.toml
# Publish llmist gadgets and skills as an MCP stdio server
npx @llmist/cli mcp serve --gadgets ./gadgets/ --skills ./skills/

Use [mcp.servers.<name>] config blocks for persistent stdio or Streamable HTTP servers. See MCP Quick Start, llmist mcp import-claude-code, and llmist mcp serve.

Terminal window
npx @llmist/cli gadget run ./floppy.ts
npx @llmist/cli gadget info ./floppy.ts
npx @llmist/cli gadget validate ./floppy.ts

The CLI loads configuration from ~/.llmist/cli.toml:

~/.llmist/cli.toml
[complete]
model = "anthropic:claude-sonnet-4-5"
temperature = 0.7
[agent]
model = "anthropic:claude-sonnet-4-5"
max-iterations = 15
gadget = ["~/gadgets/common-tools.ts"]
[mcp.servers.fs]
transport = "stdio"
command = "npx"
args = ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]
timeout-ms = 30000
# Custom command
[code-review]
type = "agent"
description = "Review code for bugs and best practices."
system = "You are a senior code reviewer."
max-iterations = 5

Sections can inherit settings:

[agent]
model = "anthropic:claude-sonnet-4-5"
max-iterations = 15
[code-review]
inherits = "agent"
temperature = 0.3
system = "You are a code reviewer."

Define reusable prompts with Eta templating:

[prompts]
base-assistant = "You are a helpful AI assistant."
expert = """
<%~ include("@base-assistant") %>
You are also an expert in <%= it.field %>.
"""
[my-expert]
system = '<%~ include("@expert", {field: "TypeScript"}) %>'

| Flag | Description | |------|-------------| | --log-level <level> | Log level: silly, trace, debug, info, warn, error, fatal | | --version | Show version number | | --help | Show help |

Terminal window
export OPENAI_API_KEY="sk-..."
export ANTHROPIC_API_KEY="sk-ant-..."
export GEMINI_API_KEY="..."
# Logging
export LLMIST_LOG_LEVEL="debug"
export LLMIST_LOG_TEE="true" # Also write to stdout when file logging is active

Pipe content to llmist:

Terminal window
cat code.ts | npx @llmist/cli complete "Review this code"
git diff | npx @llmist/cli complete "Summarize changes"
Terminal window
npx @llmist/cli complete "Hello" --model haiku
npx @llmist/cli complete "Hello" --model sonnet
npx @llmist/cli complete "Hello" --model gpt4o
npx @llmist/cli complete "Hello" --model flash

When running in an interactive terminal, llmist agent provides a rich Terminal User Interface with keyboard navigation, real-time status, and debug views.

See TUI Overview for full documentation and keyboard shortcuts.