Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

docs: Jan CLI and providers

Louis92cd2efed11f
diff --git a/docs/src/pages/docs/desktop/_assets/provider-anthropic.png b/docs/src/pages/docs/desktop/_assets/provider-anthropic.png
new file mode 100644
index 000000000..1cc6ec955
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-anthropic.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-azure.png b/docs/src/pages/docs/desktop/_assets/provider-azure.png
new file mode 100644
index 000000000..7d367ede1
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-azure.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-gemini.png b/docs/src/pages/docs/desktop/_assets/provider-gemini.png
new file mode 100644
index 000000000..fd36e4e1c
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-gemini.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-groq.png b/docs/src/pages/docs/desktop/_assets/provider-groq.png
new file mode 100644
index 000000000..bf2757890
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-groq.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-huggingface.png b/docs/src/pages/docs/desktop/_assets/provider-huggingface.png
new file mode 100644
index 000000000..4db3a51c3
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-huggingface.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-mistral.png b/docs/src/pages/docs/desktop/_assets/provider-mistral.png
new file mode 100644
index 000000000..975611bae
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-mistral.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-openai.png b/docs/src/pages/docs/desktop/_assets/provider-openai.png
new file mode 100644
index 000000000..21be255ed
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-openai.png differ
diff --git a/docs/src/pages/docs/desktop/_assets/provider-openrouter.png b/docs/src/pages/docs/desktop/_assets/provider-openrouter.png
new file mode 100644
index 000000000..35bfd21e5
Binary files /dev/null and b/docs/src/pages/docs/desktop/_assets/provider-openrouter.png differ
diff --git a/docs/src/pages/docs/desktop/_meta.json b/docs/src/pages/docs/desktop/_meta.json
index 7a2623d49..836c441a6 100644
--- a/docs/src/pages/docs/desktop/_meta.json
+++ b/docs/src/pages/docs/desktop/_meta.json
@@ -20,6 +20,7 @@
"local-engine": "Local AI Engine",
"model-parameters": "Model Parameters",
"settings": "App Settings",
+ "cli": "Jan CLI",
"privacy-policy": {
"type": "page",
"display": "hidden",
diff --git a/docs/src/pages/docs/desktop/cli.mdx b/docs/src/pages/docs/desktop/cli.mdx
new file mode 100644
index 000000000..71935cbb3
--- /dev/null
+++ b/docs/src/pages/docs/desktop/cli.mdx
@@ -0,0 +1,144 @@
+---
+title: Jan CLI
+description: Serve local models and launch autonomous AI agents from your terminal using Jan.
+keywords:
+ [
+ Jan,
+ Jan CLI,
+ local AI,
+ terminal,
+ serve models,
+ AI agents,
+ Claude Code,
+ OpenClaw,
+ llama.cpp,
+ MLX,
+ ]
+---
+
+import { Callout, Tabs } from 'nextra/components'
+
+# Jan CLI
+
+The `jan` CLI lets you serve local AI models and launch autonomous agents from your terminal — no cloud account, no usage fees, full privacy.
+
+Models downloaded in the Jan desktop app are automatically available to the CLI.
+
+## Installation
+
+Jan CLI is installed automatically when you launch the Jan desktop app for the first time — no extra steps needed. You can uninstall or reinstall it at any time from **Settings > General > Jan CLI**.
+
+<Callout type="info">
+The CLI binary is installed at `~/.local/bin/jan` on macOS/Linux. Make sure this path is in your `$PATH` to use the `jan` command from any terminal.
+</Callout>
+
+## Commands
+
+### `jan serve`
+
+Load a local model and expose it at `localhost:6767/v1` as an OpenAI-compatible API. Auto-detects LlamaCPP or MLX.
+
+```bash
+jan serve [MODEL_ID] [OPTIONS]
+```
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `MODEL_ID` | Model ID to load (omit to pick interactively) | — |
+| `--port` | Port to listen on (0 = random free port) | `6767` |
+| `--n-gpu-layers` | GPU layers to offload (-1 = all, 0 = CPU only) | `-1` |
+| `--ctx-size` | Context window size in tokens | `32768` |
+| `--fit` | Auto-fit context to available VRAM | — |
+| `--api-key` | API key required by clients | `""` |
+| `-d, --detach` | Run in background, print PID | — |
+| `--threads` | CPU threads for inference (0 = auto) | `0` |
+| `--embedding` | Treat model as an embedding model | — |
+| `-v, --verbose` | Print full server logs | — |
+
+**Examples:**
+
+```bash
+jan serve # pick a model interactively
+jan serve qwen3.5-35b-a3b # serve a specific model
+jan serve qwen3.5-35b-a3b --fit # auto-fit context to available VRAM
+jan serve qwen3.5-35b-a3b --detach # run in background
+jan serve qwen3.5-35b-a3b --port 8080 # serve on a custom port
+```
+
+---
+
+### `jan launch`
+
+Start a local model, then launch an AI agent with it pre-wired — environment variables are set automatically so the agent connects to your local model.
+
+```bash
+jan launch [PROGRAM] [OPTIONS]
+```
+
+| Option | Description | Default |
+|--------|-------------|---------|
+| `PROGRAM` | Agent to launch: `claude`, `openclaw`, `opencode` (omit to pick interactively) | — |
+| `--model` | Model ID to load (omit to pick interactively) | — |
+| `--ctx-size` | Context window size in tokens | `4096` |
+| `--fit` | Auto-fit context to available VRAM | on for `claude` |
+| `--port` | Port for the model server | `6767` |
+| `--api-key` | API key (exported as `OPENAI_API_KEY` and `ANTHROPIC_AUTH_TOKEN`) | `jan` |
+| `-v, --verbose` | Print full server logs | — |
+
+**Examples:**
+
+```bash
+jan launch claude # pick a model, then run Claude Code
+jan launch claude --model qwen3.5-35b-a3b # use a specific model with Claude Code
+jan launch openclaw --model qwen3.5-35b-a3b # wire OpenClaw to a local model
+jan launch opencode --model qwen3.5-35b-a3b # wire opencode to a local model
+```
+
+---
+
+### `jan models`
+
+List and manage models installed in the Jan data folder.
+
+```bash
+jan models list # list all installed models
+jan models load <MODEL_ID> # serve a model (alias for jan serve)
+jan models load-mlx <ID> # load an MLX model (macOS / Apple Silicon only)
+```
+
+---
+
+### `jan threads`
+
+List and inspect conversation threads saved by the Jan desktop app.
+
+```bash
+jan threads list # list all threads
+jan threads get <ID> # get a thread's metadata
+jan threads messages <THREAD_ID> # list all messages in a thread
+jan threads delete <ID> # permanently delete a thread
+```
+
+---
+
+## Common Workflows
+
+**Serve a model for use with any OpenAI-compatible client:**
+```bash
+jan serve jan-code-4b --fit
+```
+
+**Launch Claude Code against a local model:**
+```bash
+jan launch claude --model jan-code-4b
+```
+
+**Run a model in the background:**
+```bash
+jan serve jan-code-4b --detach
+```
+
+**List all installed models:**
+```bash
+jan models list
+```
diff --git a/docs/src/pages/docs/desktop/index.mdx b/docs/src/pages/docs/desktop/index.mdx
index b2e0f53a8..5b00e91c5 100644
--- a/docs/src/pages/docs/desktop/index.mdx
+++ b/docs/src/pages/docs/desktop/index.mdx
@@ -23,7 +23,7 @@ keywords:
---
import { DocCard, DocCards } from '@/components/DocCard'
-import { Rocket, Package, Bot, Plug, Monitor, Globe, Server, Brain } from 'lucide-react'
+import { Rocket, Package, Bot, Plug, Monitor, Globe, Server, Brain, Terminal, Layers } from 'lucide-react'
# Overview
@@ -45,6 +45,8 @@ Jan is an open-source replacement for Claude and ChatGPT. It comes with built-in
<DocCard title="Jan Web" href="https://chat.jan.ai" icon={<Globe size={20} />}>Jan in the browser — a direct alternative to chatgpt.com.</DocCard>
<DocCard title="Jan Server" href="/docs/desktop/api-server" icon={<Server size={20} />}>Run a local OpenAI-compatible API server on your machine.</DocCard>
<DocCard title="Jan Models" href="/docs/desktop/jan-models/jan-code-4b" icon={<Brain size={20} />}>Optimized for reasoning, agents, and deep research — built to match frontier AI capabilities and small enough to run on your personal computer.</DocCard>
+ <DocCard title="Jan CLI" href="/docs/desktop/cli" icon={<Terminal size={20} />}>Serve local models and launch autonomous agents from your terminal using Jan's local AI.</DocCard>
+ <DocCard title="Jan Platform" href="https://jan.ai" icon={<Layers size={20} />}>The infrastructure layer for building AI products on top of Jan. (Coming Soon)</DocCard>
</DocCards>
diff --git a/docs/src/pages/docs/desktop/remote-models/_meta.json b/docs/src/pages/docs/desktop/remote-models/_meta.json
index 60268b73c..a21422d9d 100644
--- a/docs/src/pages/docs/desktop/remote-models/_meta.json
+++ b/docs/src/pages/docs/desktop/remote-models/_meta.json
@@ -2,9 +2,6 @@
"anthropic": {
"title": "Anthropic"
},
- "cohere": {
- "title": "Cohere"
- },
"google": {
"title": "Gemini"
},
@@ -17,6 +14,9 @@
"openai": {
"title": "OpenAI"
},
+ "azure": {
+ "title": "Azure OpenAI"
+ },
"openrouter": {
"title": "OpenRouter"
},
diff --git a/docs/src/pages/docs/desktop/remote-models/anthropic.mdx b/docs/src/pages/docs/desktop/remote-models/anthropic.mdx
index 09418aad0..7c06131a1 100644
--- a/docs/src/pages/docs/desktop/remote-models/anthropic.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/anthropic.mdx
@@ -41,9 +41,7 @@ Ensure your API key has sufficient credits
2. Under **Model Providers**, select **Anthropic**
3. Insert your **API Key**
-<br/>
-![Anthropic](../_assets/model-management-06.png)
-<br/>
+![Anthropic](../_assets/provider-anthropic.png)
### Step 3: Start Using Anthropic's Models
diff --git a/docs/src/pages/docs/desktop/remote-models/azure.mdx b/docs/src/pages/docs/desktop/remote-models/azure.mdx
new file mode 100644
index 000000000..4e0c0ecfc
--- /dev/null
+++ b/docs/src/pages/docs/desktop/remote-models/azure.mdx
@@ -0,0 +1,64 @@
+---
+title: Azure OpenAI
+description: A step-by-step guide on integrating Jan with Azure OpenAI.
+keywords:
+ [
+ Jan,
+ Azure OpenAI,
+ local AI,
+ privacy focus,
+ free and open source,
+ conversational AI,
+ large language models,
+ Azure integration,
+ API integration
+ ]
+---
+
+import { Callout, Steps } from 'nextra/components'
+import { Settings } from 'lucide-react'
+
+# Azure OpenAI
+
+Jan supports [Azure OpenAI](https://azure.microsoft.com/en-us/products/ai-services/openai-service) API integration, allowing you to use Azure-hosted OpenAI models through Jan's interface.
+
+## Integrate Azure OpenAI with Jan
+
+<Steps>
+
+### Step 1: Get Your API Key
+1. Visit [Azure OpenAI Studio](https://oai.azure.com/) and sign in
+2. Navigate to your resource and copy the API key
+
+<Callout type='info'>
+Ensure your Azure resource has the model deployments you want to use.
+</Callout>
+
+### Step 2: Configure Jan
+
+1. Navigate to **Settings** (<Settings width={16} height={16} style={{display:"inline"}}/>)
+2. Under **Model Providers**, select **Azure**
+3. Insert your **API Key** and set your **Base URL** to your Azure OpenAI resource endpoint (e.g. `https://YOUR-RESOURCE-NAME.openai.azure.com/openai/v1`)
+
+![Azure](../_assets/provider-azure.png)
+
+### Step 3: Start Using Azure Models
+
+1. In any existing **Chat** or create a new one
+2. Select an Azure model from **model selector**
+3. Start chatting
+
+</Steps>
+
+## Troubleshooting
+
+**1. API Key Issues**
+- Verify your API key is correct and not expired
+- Check if your Azure resource has the model deployment active
+
+**2. Connection Problems**
+- Check your internet connection
+- Verify the Base URL matches your Azure resource endpoint exactly
+- Look for error messages in [Jan's logs](/docs/desktop/troubleshooting#how-to-get-error-logs)
+
+Need more help? Join our [Discord community](https://discord.gg/FTk2MvZwJH) or check the [Azure OpenAI documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/).
diff --git a/docs/src/pages/docs/desktop/remote-models/cohere.mdx b/docs/src/pages/docs/desktop/remote-models/cohere.mdx
deleted file mode 100644
index 05d2a4c74..000000000
--- a/docs/src/pages/docs/desktop/remote-models/cohere.mdx
+++ /dev/null
@@ -1,81 +0,0 @@
----
-title: Cohere
-description: Learn how to integrate Cohere with Jan for enhanced functionality.
-keywords:
- [
- Cohere API,
- Jan,
- Jan AI,
- ChatGPT alternative,
- conversational AI,
- large language model,
- integration,
- Cohere integration,
- API integration
- ]
----
-
-import { Callout, Steps } from 'nextra/components'
-import { Settings, Plus } from 'lucide-react'
-
-# Cohere
-
-Jan supports [Cohere](https://cohere.com/) API integration, allowing you to use Cohere's
-models (Command, Command-R and more) through Jan's interface.
-
-## Integrate Cohere API with Jan
-
-<Steps>
-
-### Step 1: Get Your API Key
-1. Visit [Cohere Dashboard](https://dashboard.cohere.com/api-keys) and sign in
-2. Create a new API key and/or copy your existing one
-
-<Callout type='info'>
-Ensure your API key has sufficient credits.
-</Callout>
-
-### Step 2: Configure Jan
-
-1. Navigate to **Settings** (<Settings width={16} height={16} style={{display:"inline"}}/>)
-2. Under **Model Providers**, select **Cohere**
-3. Insert your **API Key**
-
-<br/>
-![Cohere](../_assets/cohere.png)
-<br/>
-
-### Step 3: Start Using Cohere's Models
-
-1. Jump into any existing **Chat** or create a new one
-2. Select a Cohere model from **model selector** options
-3. Start chatting
-</Steps>
-
-## Available Cohere Models
-
-Jan automatically includes Cohere's available models. In case you want to use a specific
-Cohere model that you cannot find in **Jan**, follow instructions in [Add Cloud Models](/docs/desktop/manage-models):
-- See list of available models in [Cohere Documentation](https://docs.cohere.com/v2/docs/models).
-- The `id` property must match the model name in the list. For example, `command-nightly` or `command-light`.
-
-## Troubleshooting
-
-Common issues and solutions:
-
-**1. API Key Issues**
-- Verify your API key is correct and not expired
-- Check if you have billing set up on your Cohere account
-- Ensure you have access to the model you're trying to use
-
-**2. Connection Problems**
-- Check your internet connection
-- Verify Cohere's [system status](https://status.cohere.com/)
-- Look for error messages in [Jan's logs](/docs/desktop/troubleshooting#how-to-get-error-logs)
-
-**3. Model Unavailable**
-- Confirm your API key has access to the model
-- Check if you're using the correct model ID
-- Verify your Cohere account has the necessary permissions
-
-Need more help? Join our [Discord community](https://discord.gg/FTk2MvZwJH) or check the [Cohere documentation](https://docs.cohere.com).
diff --git a/docs/src/pages/docs/desktop/remote-models/google.mdx b/docs/src/pages/docs/desktop/remote-models/google.mdx
index 3984e429a..3139ef77f 100644
--- a/docs/src/pages/docs/desktop/remote-models/google.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/google.mdx
@@ -39,9 +39,7 @@ Ensure your API key has sufficient credits
2. Under **Model Providers**, select **Gemini**
3. Insert your **API Key**
-<br/>
-![Google](../_assets/google.png)
-<br/>
+![Google](../_assets/provider-gemini.png)
### Step 3: Start Using Google's Models
diff --git a/docs/src/pages/docs/desktop/remote-models/groq.mdx b/docs/src/pages/docs/desktop/remote-models/groq.mdx
index 95feb1d6e..d32b8fc92 100644
--- a/docs/src/pages/docs/desktop/remote-models/groq.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/groq.mdx
@@ -39,9 +39,7 @@ Ensure your API key has sufficient credits
2. Under **Model Providers**, select **Groq**
3. Insert your **API Key**
-<br/>
-![Groq](../_assets/groq.png)
-<br/>
+![Groq](../_assets/provider-groq.png)
### Step 3: Start Using Groq's Models
diff --git a/docs/src/pages/docs/desktop/remote-models/huggingface.mdx b/docs/src/pages/docs/desktop/remote-models/huggingface.mdx
index 4a7891586..66f0e2624 100644
--- a/docs/src/pages/docs/desktop/remote-models/huggingface.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/huggingface.mdx
@@ -39,7 +39,7 @@ Visit [Hugging Face Settings > Access Tokens](https://huggingface.co/settings/to
2. Enter your HF token
3. Use this URL: `https://router.huggingface.co/v1`
-![Jan HF Setup](../_assets/hf_jan_setup.png)
+![Jan HF Setup](../_assets/provider-huggingface.png)
You can find out more about the HF Router [here](https://huggingface.co/docs/inference-providers/index).
diff --git a/docs/src/pages/docs/desktop/remote-models/mistralai.mdx b/docs/src/pages/docs/desktop/remote-models/mistralai.mdx
index 52271cd68..e2644a6d8 100644
--- a/docs/src/pages/docs/desktop/remote-models/mistralai.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/mistralai.mdx
@@ -42,9 +42,7 @@ Ensure your API key has sufficient credits
2. Under **Model Providers**, select **Mistral AI**
3. Insert your **API Key**
-<br/>
-![Mistral](../_assets/mistralai.png)
-<br/>
+![Mistral](../_assets/provider-mistral.png)
### Step 3: Start Using Mistral's Models
diff --git a/docs/src/pages/docs/desktop/remote-models/openai.mdx b/docs/src/pages/docs/desktop/remote-models/openai.mdx
index 6c78f31c3..ec4a70c17 100644
--- a/docs/src/pages/docs/desktop/remote-models/openai.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/openai.mdx
@@ -43,9 +43,7 @@ Ensure your API key has sufficient credits
2. Under Remote Engines, select OpenAI
3. Insert your API Key
-<br/>
-![OpenAI](../_assets/openai.png)
-<br/>
+![OpenAI](../_assets/provider-openai.png)
### Step 3: Start Using OpenAI's Models
diff --git a/docs/src/pages/docs/desktop/remote-models/openrouter.mdx b/docs/src/pages/docs/desktop/remote-models/openrouter.mdx
index 0faf68dac..1ff03775b 100644
--- a/docs/src/pages/docs/desktop/remote-models/openrouter.mdx
+++ b/docs/src/pages/docs/desktop/remote-models/openrouter.mdx
@@ -51,9 +51,7 @@ Ensure your API key has sufficient credits. OpenRouter credits work across all a
2. Under **Model Providers**, select **OpenRouter**
3. Insert your **API Key**
-<br/>
-![OpenRouter](../_assets/openrouter.png)
-<br/>
+![OpenRouter](../_assets/provider-openrouter.png)
### Step 3: Start Using OpenRouter Models