CLI Reference
Usage: jan <COMMAND>Commands: serve Load a local model and expose it at localhost:6767/v1 launch Start a local model, then launch an AI agent with it pre-wired threads List and inspect conversation threads models List and load models installed in the Jan data folder agent Run the autonomous agent with tool use
jan serve
Load a local model and expose it at localhost:6767/v1 as an OpenAI-compatible API.
jan serve [MODEL_ID] [OPTIONS]
| Option | Description | Default |
|---|---|---|
MODEL_ID | Model ID or HuggingFace repo (e.g. unsloth/Qwen3-4B-GGUF) | interactive picker |
--model-path | Direct path to model file | — |
--bin | Path to inference binary | auto-discovered |
--port | Port to listen on | 6767 |
--mmproj | Path to multimodal projector | — |
--embedding | Treat as embedding model | false |
--timeout | Request timeout in seconds | 120 |
--n-gpu-layers | GPU layers to offload (-1 = all, 0 = CPU) | -1 |
--ctx-size | Context window size in tokens | 32768 |
--fit | Auto-fit context to available VRAM | false |
--threads | CPU threads (0 = auto) | 0 |
--api-key | API key required by clients | "" |
-d, --detach | Run in background, print PID | false |
--log | Log file path (for detached mode) | — |
-v, --verbose | Print full server logs | false |
--select | Show quantization picker when downloading | false |
Examples:
jan serve # pick a model interactivelyjan serve qwen3-4b # serve a specific modeljan serve unsloth/Qwen3-4B-GGUF # auto-download from HuggingFacejan serve qwen3-4b --fit # auto-fit context to VRAMjan serve qwen3-4b --detach # run in backgroundjan serve qwen3-4b --port 8080 # custom port
When given a HuggingFace repo ID (e.g. owner/repo), Jan Agent automatically downloads the GGUF model if it isn't already installed.
jan launch
Start a local model server, then launch an external AI agent with environment variables pre-configured.
jan launch [PROGRAM] [OPTIONS]
| Option | Description | Default |
|---|---|---|
PROGRAM | Agent to launch: claude, openclaw, opencode | interactive picker |
--model | Model ID to load | interactive picker |
--bin | Path to inference binary | auto-discovered |
--port | Port for the model server | 6767 |
--api-key | API key (exported as OPENAI_API_KEY) | jan |
--n-gpu-layers | GPU layers to offload | -1 |
--ctx-size | Context window size | — |
--fit | Auto-fit context to VRAM | auto for claude |
-v, --verbose | Print full server logs | false |
--select | Show quantization picker | false |
Examples:
jan launch claude # pick a model, launch Claude Codejan launch claude --model qwen3-4b # use specific model with Claude Codejan launch openclaw --model qwen3-4b # wire OpenClaw to a local modeljan launch opencode --model qwen3-4b # wire opencode to a local model
The launch command sets these environment variables for the spawned program:
| Variable | Value |
|---|---|
OPENAI_API_KEY | The --api-key value |
OPENAI_BASE_URL | http://localhost:<port>/v1 |
ANTHROPIC_AUTH_TOKEN | The --api-key value |
ANTHROPIC_BASE_URL | http://localhost:<port>/v1 |
jan models
List and manage models installed in the Jan data folder.
jan models <SUBCOMMAND>
jan models list
jan models list [--engine <ENGINE>]
| Option | Description | Default |
|---|---|---|
--engine | Filter by engine | all |
jan models load
Load and serve a model (alias for jan serve).
jan models load [MODEL_ID] [OPTIONS]
Accepts the same options as jan serve.
jan threads
List and inspect conversation threads saved by the Jan app.
jan threads <SUBCOMMAND>
| Subcommand | Description |
|---|---|
list | Print all threads as JSON |
get <ID> | Print a thread's metadata as JSON |
messages <THREAD_ID> | Print all messages in a thread as JSON |
delete <ID> | Permanently delete a thread and its messages |
jan agent chat
Run the built-in autonomous ReAct agent.
jan agent chat [OPTIONS]
| Option | Description | Default |
|---|---|---|
--api-url | LLM endpoint URL | auto-serve local model |
-m, --message | One-shot prompt (skip interactive TUI) | — |
--mount | Directories to expose to the agent (repeatable) | — |
--agent | Agent implementation to use | react |
--sensor-url | Sensor input endpoint URL | — |
Plus all jan serve options (model ID, port, ctx-size, etc.) when auto-serving.
Examples:
# Interactive TUI with external endpointjan agent chat --api-url http://localhost:6767/v1# One-shot with auto-served modeljan agent chat --model qwen3-4b -m "List all TODO comments in this project"# Mount specific directoriesjan agent chat --api-url http://localhost:6767/v1 --mount ./src --mount ./tests