Docs
CLI Reference

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]

OptionDescriptionDefault
MODEL_IDModel ID or HuggingFace repo (e.g. unsloth/Qwen3-4B-GGUF)interactive picker
--model-pathDirect path to model file
--binPath to inference binaryauto-discovered
--portPort to listen on6767
--mmprojPath to multimodal projector
--embeddingTreat as embedding modelfalse
--timeoutRequest timeout in seconds120
--n-gpu-layersGPU layers to offload (-1 = all, 0 = CPU)-1
--ctx-sizeContext window size in tokens32768
--fitAuto-fit context to available VRAMfalse
--threadsCPU threads (0 = auto)0
--api-keyAPI key required by clients""
-d, --detachRun in background, print PIDfalse
--logLog file path (for detached mode)
-v, --verbosePrint full server logsfalse
--selectShow quantization picker when downloadingfalse

Examples:


jan serve # pick a model interactively
jan serve qwen3-4b # serve a specific model
jan serve unsloth/Qwen3-4B-GGUF # auto-download from HuggingFace
jan serve qwen3-4b --fit # auto-fit context to VRAM
jan serve qwen3-4b --detach # run in background
jan 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]

OptionDescriptionDefault
PROGRAMAgent to launch: claude, openclaw, opencodeinteractive picker
--modelModel ID to loadinteractive picker
--binPath to inference binaryauto-discovered
--portPort for the model server6767
--api-keyAPI key (exported as OPENAI_API_KEY)jan
--n-gpu-layersGPU layers to offload-1
--ctx-sizeContext window size
--fitAuto-fit context to VRAMauto for claude
-v, --verbosePrint full server logsfalse
--selectShow quantization pickerfalse

Examples:


jan launch claude # pick a model, launch Claude Code
jan launch claude --model qwen3-4b # use specific model with Claude Code
jan launch openclaw --model qwen3-4b # wire OpenClaw to a local model
jan launch opencode --model qwen3-4b # wire opencode to a local model

The launch command sets these environment variables for the spawned program:

VariableValue
OPENAI_API_KEYThe --api-key value
OPENAI_BASE_URLhttp://localhost:<port>/v1
ANTHROPIC_AUTH_TOKENThe --api-key value
ANTHROPIC_BASE_URLhttp://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>]

OptionDescriptionDefault
--engineFilter by engineall

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>

SubcommandDescription
listPrint 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]

OptionDescriptionDefault
--api-urlLLM endpoint URLauto-serve local model
-m, --messageOne-shot prompt (skip interactive TUI)
--mountDirectories to expose to the agent (repeatable)
--agentAgent implementation to usereact
--sensor-urlSensor input endpoint URL

Plus all jan serve options (model ID, port, ctx-size, etc.) when auto-serving.

Examples:


# Interactive TUI with external endpoint
jan agent chat --api-url http://localhost:6767/v1
# One-shot with auto-served model
jan agent chat --model qwen3-4b -m "List all TODO comments in this project"
# Mount specific directories
jan agent chat --api-url http://localhost:6767/v1 --mount ./src --mount ./tests