All commands use theDocumentation Index
Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt
Use this file to discover all available pages before exploring further.
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
Start the KiwiFS HTTP server and serve your knowledge base.
Protocol flags
| 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
Create a new knowledge directory with an optional template.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Directory to initialize |
--template | knowledge | Template: knowledge, wiki, runbook, research, or blank |
mcp — Start MCP server
mcp — Start MCP server
Start a Model Context Protocol server over stdio transport. Use this to connect KiwiFS to AI agents and LLM tools.
| 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
Run KiwiFS directly within the MCP server process. Best for local development.
mount — FUSE mount a remote KiwiFS
mount — FUSE mount a remote KiwiFS
Mount a remote KiwiFS server as a local filesystem using FUSE.
| 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 |
FUSE must be installed on your system. On macOS, install macFUSE. On Linux, install
fuse3.Data commands
import — Import data from external sources
import — Import data from external sources
Import data from databases, files, or third-party services into your knowledge base.
Supported 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
Export your knowledge base as JSONL or CSV.
See the data export guide for full details on output formats and the REST API.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
--format | jsonl | Output format: jsonl or csv | |
--output | -o | stdout | Output file |
--path | Scope to subdirectory | ||
--columns | Comma-separated frontmatter fields | ||
--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) |
query — Run a DQL query
query — Run a DQL query
Run a Dataview Query Language (DQL) query against your knowledge base.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | ./knowledge | Knowledge root |
aggregate — SQL-style aggregation
aggregate — SQL-style aggregation
Run aggregation queries against frontmatter fields.
| 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
Display a dashboard summarizing the health and statistics of your knowledge base.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
lint — Validate knowledge base
lint — Validate knowledge base
Check your knowledge base for issues such as broken links, missing frontmatter, or invalid YAML.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
janitor — Full health scan
janitor — Full health scan
Run a comprehensive health scan that combines linting, analytics, and cleanup suggestions.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
reindex — Rebuild search indexes
reindex — Rebuild search indexes
Rebuild all search indexes from scratch. Useful after bulk imports or if search results seem stale.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
Reindexing locks writes briefly. Run this during low-traffic periods on production servers.
view — Manage computed views
view — Manage computed views
Create and manage computed views that aggregate data from your knowledge base.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root |
Backup and restore
backup — Push to git remote
backup — Push to git remote
Push your knowledge base to a git remote for backup.
| Flag | Short | Default | Description |
|---|---|---|---|
--root | -r | Knowledge root | |
--remote | Git remote URL (overrides config) | ||
--branch | Branch to push |
restore — Clone from git remote
restore — Clone from git remote
Clone a knowledge base from a git remote.
| Flag | Default | Description |
|---|---|---|
--from | Git remote URL (required) | |
--to | Local directory (required) | |
--branch | Branch to check out |