Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
docs: refresh docs to match the current CLI and docs site
thinhlpg8ad4a74e4fef
diff --git a/AGENT-TUI.md b/AGENT-TUI.mdindex a616fe22c..c7937cfd5 100644--- a/AGENT-TUI.md+++ b/AGENT-TUI.md@@ -4,12 +4,12 @@The **Jan Agent CLI TUI** is a terminal-based interactive UI for Jan's agent. It uses [ratatui](https://ratatui.rs) (a Rust TUI framework) and [crossterm](https://github.com/crossterm-rs/crossterm) for terminal control.-The CLI binary (`jan`) is separate from the desktop binary (`jan-desktop`). They share the same library crate (`app_lib`).+The CLI binary (`jan`) is separate from the desktop binary (`Jan-Desktop`). They share the same library crate (`app_lib`).### Architecture```-jan (binary, src-tauri/src/bin/jan.rs)+jan (binary, src-tauri/jan-cli/src/main.rs)└── app_lib (library, src-tauri/src/core/)└── cli/├── mod.rs — CLI entry points, thread management@@ -24,36 +24,35 @@ jan (binary, src-tauri/src/bin/jan.rs)| File | Purpose ||------|---------|-| `src-tauri/src/bin/jan.rs` | CLI binary entry point (clap argument parsing) |+| `src-tauri/jan-cli/src/main.rs` | CLI binary entry point (clap argument parsing) || `src-tauri/src/core/cli/mod.rs` | CLI public API + thread listing || `src-tauri/src/core/cli/tui.rs` | Main TUI (~4600+ lines): `App` struct, event loop, rendering, commands |-| `src-tauri/Cargo.toml` | Crate config; `cli` feature gates TUI dependencies |+| `src-tauri/Cargo.toml` | Library (`app_lib`) config; `cli` feature gates TUI dependencies |+| `src-tauri/jan-cli/Cargo.toml` | Standalone CLI crate; its `cli` feature pulls in `app_lib/cli` |## Build### First Time Setup```bash-# The project is at:-cd /Users/alandao/Documents/codes/jan-agent+# Clone the Jan repo, then cd to its root.# Rust toolchain (already installed):-rustc --version # 1.77.2+ (minimum)+rustc --version # 1.85+ (minimum)```### Build Commands```bash-# Quick check (no binary produced):+# Quick check of the library (no binary produced):cd src-tauri && cargo check --no-default-features --features cli --lib# Debug build + install to ~/.local/bin:-cd /Users/alandao/Documents/codes/jan-agent./build-tui.sh # debug./build-tui.sh release # release (optimized, slower build)# Release build (optimized, smaller binary):-cd src-tauri && cargo build --no-default-features --features cli --bin jan --release+cd src-tauri/jan-cli && cargo build --features cli --release```### Using the Build Script@@ -68,15 +67,15 @@ The `build-tui.sh` script at the project root automates building and installing:./build-tui.sh help # show help```-The script installs the binary to `~/.local/bin/jan-agent`. Make sure `~/.local/bin` is in your `PATH`.+The script installs the binary to `~/.local/bin/jan`. Make sure `~/.local/bin` is in your `PATH`.### Binary vs Library- The **library** (`app_lib`) is what you build in CI/CD for both desktop and CLI,but the two are mutually exclusive feature configs: `cli` compiles out everyTauri-dependent module, and the Tauri/GTK crates are not even dependencies.-- The **CLI binary** (`jan`) needs `--no-default-features --features cli` to include TUI dependencies.-- The **desktop binary** (`jan-desktop`) uses the `desktop` feature (Tauri).+- The **CLI binary** (`jan`) is built from the standalone `src-tauri/jan-cli` crate (`cargo build --features cli`); its `cli` feature pulls in `app_lib/cli`.+- The **desktop binary** (`Jan-Desktop`) uses the `desktop` feature (Tauri).When developing TUI features, use `cargo check --no-default-features --features cli --lib` for the fast inner loop (checks only the library, not binary linking).@@ -261,17 +260,17 @@ The TUI supports Tab-based slash command completion:## Running the TUI```bash-# After building (binary at ~/.local/bin/jan-agent):-jan-agent tui+# After building (binary at ~/.local/bin/jan):+jan tui# Or from the project:-cd src-tauri && cargo run --no-default-features --features cli --bin jan -- tui+cd src-tauri/jan-cli && cargo run --features cli -- tui# With a specific model:-jan-agent tui --model my-model+jan tui --model my-model# With provider overrides:-jan-agent tui --provider openai --model gpt-4+jan tui --provider openai --model gpt-4```## Making Changes@@ -292,7 +291,7 @@ vim src-tauri/src/core/cli/tui.rs./build-tui.sh debug# 5. Test in terminal-jan-agent tui+jan tui```### Adding a New Slash Command@@ -346,7 +345,7 @@ The Rust compiler may run out of memory on large builds. Try:```bash# Limit parallel codegen units-cd src-tauri && CARGO_BUILD_JOBS=2 cargo build --no-default-features --features cli --bin jan+cd src-tauri/jan-cli && CARGO_BUILD_JOBS=2 cargo build --features cli```### TUI rendering artifactsdiff --git a/Makefile b/Makefileindex 1fe84341b..3c24bf002 100644--- a/Makefile+++ b/Makefile@@ -86,17 +86,17 @@ install-web-app:dev-web-app: install-web-appyarn build:core- yarn dev:web-app+ yarn dev:webbuild-web-app: install-web-appyarn build:core- yarn build:web-app+ yarn build:webserve-web-app:- yarn serve:web-app+ yarn workspace @janhq/web-app previewbuild-serve-web-app: build-web-app- yarn serve:web-app+ yarn workspace @janhq/web-app preview# Mobiledev-android: install-and-build install-android-rust-targetsdiff --git a/docs/README.md b/docs/README.mdindex 11b68f26b..92bfc5683 100644--- a/docs/README.md+++ b/docs/README.md@@ -6,15 +6,21 @@ This website is built using [Nextra](https://nextra.site/), a modern static websWe try to **keep routes consistent** to maintain SEO.-- **`/guides/`**: Guides on how to use the Jan application. For end users who are directly using Jan.+- **`/docs/`**: Product documentation (Jan Desktop, Jan Agent).-- **`/developer/`**: Developer docs on how to extend Jan. These pages are about what people can build with our software.+- **`/handbook/`**: Handbook pages.-- **`/api-reference/`**: Reference documentation for the Jan API server, written in Swagger/OpenAPI format.+- **`/research/`**: Research content.- **`/changelog/`**: A list of changes made to the Jan application with each release.-- **`/blog/`**: A blog for the Jan application.+- **`/blog/`**: Blog posts.++- **`/download/`**: Download page.++- **`/support/`**: Support page.++- **`/privacy/`**: Privacy policy.## How to Contribute@@ -23,7 +29,7 @@ Refer to the [Contributing Guide](https://github.com/janhq/jan/blob/main/CONTRIB### Pre-requisites and Installation- [Node.js](https://nodejs.org/en/) (version 20.0.0 or higher)-- [yarn](https://yarnpkg.com/) (version 1.22.0 or higher)+- [yarn](https://yarnpkg.com/) (version 4.x; the repo pins 4.5.3 via corepack)#### Installation@@ -41,23 +47,13 @@ This command starts a local development server and opens up a browser window. Moyarn build```-This command generates static content into the `build` directory and can be served using any static contents hosting service.+This command generates static content into the `out` directory (`next.config.mjs` sets `output: 'export'`) and can be served using any static contents hosting service.### Deployment-Using SSH:--```bash-USE_SSH=true yarn deploy-```--Not using SSH:--```bash-GIT_USER=<Your GitHub username> yarn deploy-```+Documentation is published to [https://jan.ai/](https://jan.ai/) by the `jan-docs.yml` GitHub Actions workflow when changes land on `main`. That workflow builds the site (`yarn build`, output `out`) and publishes it to Cloudflare Pages. Pull requests get a preview URL automatically.-If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.+There is no `yarn deploy` script; deployment is handled entirely by CI.### Preview URL, Pre-release and Publishing Documentationdiff --git a/extensions/CONTRIBUTING.md b/extensions/CONTRIBUTING.mdindex ee5c5aa9f..ad31ec34e 100644--- a/extensions/CONTRIBUTING.md+++ b/extensions/CONTRIBUTING.md@@ -25,6 +25,18 @@ Extensions add specific features to Jan as self-contained modules.- `src/backend.ts` - llama.cpp integration- `settings.json` - Model settings+### `/mlx-extension`+- MLX-Swift inference on Apple Silicon Macs+- `src/index.ts` - Entry point++### `/rag-extension`+- RAG tooling: registers RAG tools and orchestrates retrieval across parser, embeddings, and vector DB+- `src/index.ts` - Main implementation++### `/vector-db-extension`+- Vector DB integration using sqlite-vec, with a linear fallback+- `src/index.ts` - Entry point+## Creating Extensions### Setupdiff --git a/extensions/assistant-extension/README.md b/extensions/assistant-extension/README.mdindex f9690da09..f9d66f2d2 100644--- a/extensions/assistant-extension/README.md+++ b/extensions/assistant-extension/README.md@@ -28,13 +28,13 @@ After you've cloned the repository to your local machine or codespace, you'll ne1. :hammer_and_wrench: Install the dependencies```bash- npm install+ yarn install```1. :building_construction: Package the TypeScript for distribution```bash- npm run bundle+ yarn build:publish```1. :white_check_mark: Check your artifactdiff --git a/web-app/CONTRIBUTING.md b/web-app/CONTRIBUTING.mdindex 32d7779bd..f6ef8e06d 100644--- a/web-app/CONTRIBUTING.md+++ b/web-app/CONTRIBUTING.md@@ -66,7 +66,7 @@ export const useAppState = create<AppState>((set) => ({### Tauri Integration```tsx-import { invoke } from '@tauri-apps/api/tauri'+import { invoke } from '@tauri-apps/api/core'const result = await invoke('command_name', { param: 'value' })```@@ -95,8 +95,8 @@ import { VariableSizeList } from 'react-window'# - Debug hooks and state# - Profile performance-# Debug Tauri commands-console.log(await window.__TAURI__.invoke('command_name'))+# Debug Tauri commands using the same imported API the app does+console.log(await invoke('command_name'))# Check for console errors# Press F12 → Console tab