kiwifs binary. Run kiwifs --help to list available commands, or kiwifs <command> --help for details on a specific command.
Core commands
serve — Start the KiwiFS server
serve — Start the KiwiFS server
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root directory |
--port | -p | 3333 | HTTP port |
--host | 0.0.0.0 | Bind address | |
--search | sqlite | Search engine: sqlite or grep | |
--versioning | git | Versioning strategy: git, cow, or none | |
--auth | none | Auth type: none, apikey, perspace, or oidc | |
--api-key | API key (required if auth=apikey) | ||
--oidc-issuer | OIDC issuer URL | ||
--oidc-client-id | OIDC client ID | ||
--async-commit | true | Enable async batched commits | |
--batch-window | 200 | Async commit batch window in milliseconds | |
--batch-max-size | 50 | Max paths per batch | |
--no-watch | false | Disable fsnotify watcher |
| Flag | Default | Description |
|---|---|---|
--nfs | false | Enable userspace NFSv3 server |
--nfs-port | 2049 | NFS port |
--nfs-allow | CIDRs allowed to mount NFS | |
--s3 | false | Enable S3-compatible API |
--s3-port | 3334 | S3 port |
--webdav | false | Enable WebDAV server |
--webdav-port | 3335 | WebDAV port |
--space | Register additional space (repeatable, format: name=path) |
init — Initialize a knowledge directory
init — Initialize a knowledge directory
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Directory to initialize |
--template | knowledge | Template: knowledge, wiki, runbook, research, tasks, or blank |
mcp — Start MCP server
mcp — Start MCP server
| Flag | Default | Description |
|---|---|---|
--root | Knowledge root (in-process mode) | |
--remote | KiwiFS server URL (proxy mode) | |
--api-key | API key for remote server | |
--space | default | Space to scope to |
--http | false | Enable Streamable HTTP transport (instead of stdio) |
--port | 8181 | HTTP port (only with --http) |
- In-process (stdio)
- Proxy mode
- HTTP transport
mount — FUSE mount a remote KiwiFS
mount — FUSE mount a remote KiwiFS
| Flag | Default | Description |
|---|---|---|
--remote | Remote KiwiFS server URL (required) | |
--api-key | API key (or KIWIFS_API_KEY env) | |
--bearer | Bearer token (or KIWIFS_BEARER env) | |
--basic-user | HTTP Basic auth username | |
--basic-pass | HTTP Basic auth password (or KIWIFS_BASIC_PASS env) | |
--space | default | Space name |
fuse3.Data commands
import — Import data from external sources
import — Import data from external sources
| Flag | Short | Default | Description |
|---|---|---|---|
--from | Source type (see list below) | ||
--root | -r | ./knowledge | Knowledge root |
--dsn | Database connection string | ||
--table | Table or collection name | ||
--query | Custom SQL query | ||
--file | Path to data file | ||
--prefix | Path prefix in KiwiFS | ||
--columns | Comma-separated fields to include | ||
--id-column | Column to use as filename | ||
--limit | Max records to import | ||
--dry-run | false | Preview without writing |
| Category | Sources |
|---|---|
| Databases | postgres, mysql, sqlite, mongodb, firestore, dynamodb, redis, elasticsearch |
| Files | csv, json, jsonl, yaml, excel |
| Services | notion, airtable, gsheets, obsidian, confluence |
export — Export knowledge base
export — Export knowledge base
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--format | jsonl | Data format: jsonl, csv, or parquet | |
--output | -o | stdout | Output file |
--path | Scope to subdirectory | ||
--columns | Comma-separated frontmatter fields (CSV) | ||
--include-content | false | Include full markdown body | |
--include-links | false | Include outgoing/incoming links | |
--include-embeddings | false | Include vector embeddings | |
--limit | 0 | Max files (0 = unlimited) |
--format pdf, html, slides, or site with --path pointing at a file or directory:| Flag | Default | Description |
|---|---|---|
--theme | Theme: paper, modern, minimal, dark, presentation | |
--self-contained | false | Embed assets in HTML/PDF output |
--bibliography | Path to .bib or .json bibliography | |
--csl | Citation style: apa, ieee, chicago, vancouver, harvard | |
--crossref | false | Enable figure/table/equation cross-references |
--pdf-engine | auto | PDF engine: typst or xelatex |
--slide-format | html | Slide output: html, pdf, or pptx |
--site-name | Static site title (MkDocs) | |
--site-url | Canonical site URL | |
--repo-url | Edit-on-GitHub link for generated site |
query — Run a DQL query
query — Run a DQL query
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
aggregate — SQL-style aggregation
aggregate — SQL-style aggregation
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root | |
--group | Frontmatter field to group by | ||
--calc | Aggregation functions: count, avg, sum, min, max (with field, e.g. avg:priority) |
Maintenance commands
analytics — Knowledge health dashboard
analytics — Knowledge health dashboard
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--scope | Path prefix to limit results | ||
--stale-threshold | 30 | Days before a page counts as stale | |
--format | text | Output format: text or json |
lint — Validate knowledge base
lint — Validate knowledge base
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
janitor — Full health scan
janitor — Full health scan
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--stale-days | 90 | Days before a page is considered stale | |
--json | false | Emit JSON instead of a human summary |
reindex — Rebuild search indexes
reindex — Rebuild search indexes
--fts-only is set.| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--vector | false | Force vector index rebuild (requires [search.vector] config) | |
--fts-only | false | Skip vector index even when configured |
view — Manage computed views
view — Manage computed views
kiwi-view: true in frontmatter).| Subcommand | Purpose |
|---|---|
refresh <path> | Regenerate a view file from its kiwi-query |
list | List all computed views |
create | Create a new view file and regenerate it |
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--query | DQL query (create only, required) | ||
--name | View title and filename (create only, required) | ||
--path | Directory for the new file (create only) |
Rules, tokens, benchmarks, clipping, and memory
rules — Manage .kiwi/rules.md
rules — Manage .kiwi/rules.md
| Subcommand | Purpose |
|---|---|
| (default) | Print rules.md (local) or fetch from --remote. |
edit | Open the file in $EDITOR. |
export | Emit Cursor, Claude, AGENTS, or OpenClaw formatted snippets. |
sync | Export and write to --output. |
--remote and --api-key like other commands.token — API tokens in config.toml
token — API tokens in config.toml
.kiwi/config.toml; the plaintext key is shown once on create.bench — Local performance harness
bench — Local performance harness
clip — Save a web page as markdown
clip — Save a web page as markdown
--title, --tags, --folder, --actor (defaults to clipper).memory report — Episodic coverage
memory report — Episodic coverage
| Flag | Default | Description |
|---|---|---|
--root | ./knowledge | Knowledge root |
--json | false | Emit JSON instead of text |
--episodes-prefix | from config | Override [memory] episodes_path_prefix |
KiwiFS Cloud commands
login — Authenticate with KiwiFS Cloud
login — Authenticate with KiwiFS Cloud
~/.kiwifs/credentials.json.| Flag | Default | Description |
|---|---|---|
--host | https://app.kiwifs.com | KiwiFS Cloud host |
--client-id | auto | WorkOS client ID (optional override) |
logout — Remove stored credentials
logout — Remove stored credentials
~/.kiwifs/credentials.json.whoami — Show authenticated user
whoami — Show authenticated user
connect — Generate MCP config for a workspace
connect — Generate MCP config for a workspace
| Flag | Default | Description |
|---|---|---|
--key | $KIWI_API_KEY | API key (optional after kiwifs login) |
--write | Write config to a client: cursor, claude-code, windsurf, claude-desktop, or auto | |
--host | https://api.kiwifs.com | KiwiFS Cloud API host |
--project | false | Write project-level config instead of global |
update — Self-update the CLI
update — Self-update the CLI
kiwifs binary from GitHub Releases.Backup and restore
backup — Push to git remote
backup — Push to git remote
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root | |
--remote | Git remote URL (overrides config) | ||
--branch | Branch to push | ||
--rebase-before-push | true | Fetch and rebase onto the backup branch before pushing |
kiwifs backup fetches and rebases onto the backup branch before pushing. See Backup sync for configuration, opt-outs, and conflict handling.restore — Clone from git remote
restore — Clone from git remote
| Flag | Default | Description |
|---|---|---|
--from | Git remote URL (required) | |
--to | Local directory (required) | |
--branch | Branch to check out |