Skip to content

CLI Reference

Command-line interface for llmist.

Terminal window
bunx @llmist/cli

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

Terminal window
bunx @llmist/cli init

Stream a single response without agent loop:

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

Options:

FlagShortDescriptionDefault
--model <model>-mModel name or aliasgpt-5-nano
--system <prompt>-sSystem promptnone
--temperature <n>-tTemperature (0-2)Provider default
--max-tokens <n>Max output tokensProvider default
--quiet-qSuppress all output except contentfalse

Run the full agent loop with tools:

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

Options:

FlagShortDescriptionDefault
--model <model>-mModel name or aliasgpt-5-nano
--system <prompt>-sSystem promptnone
--temperature <n>-tTemperature (0-2)Provider default
--max-iterations <n>-iMax agent iterations10
--gadget <path>-gGadget file (repeatable)none
--no-builtinsDisable all built-in gadgetsfalse
--no-builtin-interactionDisable AskUser gadgetfalse
--quiet-qSuppress output except TellUserfalse

Built-in Gadgets:

GadgetDescription
AskUserAsks the user a question and waits for response
TellUserOutputs a message with type indicator. Set done=true to end conversation
Terminal window
bunx @llmist/cli gadget run ./floppy.ts
bunx @llmist/cli gadget info ./floppy.ts
bunx @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"]
# 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"}) %>'
FlagDescription
--log-level <level>Log level: silly, trace, debug, info, warn, error, fatal
--log-file <path>Path to log file
--versionShow version number
--helpShow 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_FILE="./app.log"

Pipe content to llmist:

Terminal window
cat code.ts | bunx @llmist/cli complete "Review this code"
git diff | bunx @llmist/cli complete "Summarize changes"
Terminal window
bunx @llmist/cli complete "Hello" --model haiku
bunx @llmist/cli complete "Hello" --model sonnet
bunx @llmist/cli complete "Hello" --model gpt4o
bunx @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.