Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt

Use this file to discover all available pages before exploring further.

All commands use the kiwifs binary. Run kiwifs --help to list available commands, or kiwifs <command> --help for details on a specific command.

Core commands

Start the KiwiFS HTTP server and serve your knowledge base.
kiwifs serve [flags]
FlagShortDefaultDescription
--root-r./knowledgeKnowledge root directory
--port-p3333HTTP port
--host0.0.0.0Bind address
--searchsqliteSearch engine: sqlite or grep
--versioninggitVersioning strategy: git, cow, or none
--authnoneAuth type: none, apikey, perspace, or oidc
--api-keyAPI key (required if auth=apikey)
--oidc-issuerOIDC issuer URL
--oidc-client-idOIDC client ID
--async-committrueEnable async batched commits
--batch-window200Async commit batch window in milliseconds
--batch-max-size50Max paths per batch
--no-watchfalseDisable fsnotify watcher
Protocol flags
FlagDefaultDescription
--nfsfalseEnable userspace NFSv3 server
--nfs-port2049NFS port
--nfs-allowCIDRs allowed to mount NFS
--s3falseEnable S3-compatible API
--s3-port3334S3 port
--webdavfalseEnable WebDAV server
--webdav-port3335WebDAV port
--spaceRegister additional space (repeatable, format: name=path)
kiwifs serve --root ./my-docs --port 8080
Create a new knowledge directory with an optional template.
kiwifs init [flags]
FlagShortDefaultDescription
--root-r./knowledgeDirectory to initialize
--templateknowledgeTemplate: knowledge, wiki, runbook, research, or blank
kiwifs init
Templates provide a starter directory structure with sample files. Use blank if you want an empty knowledge base.
Start a Model Context Protocol server over stdio transport. Use this to connect KiwiFS to AI agents and LLM tools.
kiwifs mcp [flags]
FlagDefaultDescription
--rootKnowledge root (in-process mode)
--remoteKiwiFS server URL (proxy mode)
--api-keyAPI key for remote server
--spacedefaultSpace to scope to
--httpfalseEnable Streamable HTTP transport (instead of stdio)
--port8181HTTP port (only with --http)
Run KiwiFS directly within the MCP server process. Best for local development.
kiwifs mcp --root ./knowledge
Mount a remote KiwiFS server as a local filesystem using FUSE.
kiwifs mount <mountpoint> [flags]
FlagDefaultDescription
--remoteRemote KiwiFS server URL (required)
--api-keyAPI key (or KIWIFS_API_KEY env)
--bearerBearer token (or KIWIFS_BEARER env)
--basic-userHTTP Basic auth username
--basic-passHTTP Basic auth password (or KIWIFS_BASIC_PASS env)
--spacedefaultSpace name
kiwifs mount ~/mnt/kiwi --remote https://kiwi.example.com --api-key my-key
FUSE must be installed on your system. On macOS, install macFUSE. On Linux, install fuse3.

Data commands

Import data from databases, files, or third-party services into your knowledge base.
kiwifs import [flags]
FlagShortDefaultDescription
--fromSource type (see list below)
--root-r./knowledgeKnowledge root
--dsnDatabase connection string
--tableTable or collection name
--queryCustom SQL query
--filePath to data file
--prefixPath prefix in KiwiFS
--columnsComma-separated fields to include
--id-columnColumn to use as filename
--limitMax records to import
--dry-runfalsePreview without writing
Supported sources
CategorySources
Databasespostgres, mysql, sqlite, mongodb, firestore, dynamodb, redis, elasticsearch
Filescsv, json, jsonl, yaml, excel
Servicesnotion, airtable, gsheets, obsidian, confluence
kiwifs import --from postgres --dsn "postgres://user:pass@localhost/mydb" \
  --table articles --id-column slug --prefix articles/
Use --dry-run first to preview which files will be created before writing anything.
Export your knowledge base as JSONL or CSV.
kiwifs export [flags]
FlagShortDefaultDescription
--root-r./knowledgeKnowledge root
--formatjsonlOutput format: jsonl or csv
--output-ostdoutOutput file
--pathScope to subdirectory
--columnsComma-separated frontmatter fields
--include-contentfalseInclude full markdown body
--include-linksfalseInclude outgoing/incoming links
--include-embeddingsfalseInclude vector embeddings
--limit0Max files (0 = unlimited)
kiwifs export --format jsonl -o knowledge.jsonl
See the data export guide for full details on output formats and the REST API.
Run a Dataview Query Language (DQL) query against your knowledge base.
kiwifs query "<query>" [flags]
FlagShortDefaultDescription
--root-r./knowledgeKnowledge root
kiwifs query "TABLE title, status FROM 'concepts' WHERE status = 'draft'"
Run aggregation queries against frontmatter fields.
kiwifs aggregate [flags]
FlagShortDefaultDescription
--root-rKnowledge root
--groupFrontmatter field to group by
--calcAggregation functions: count, avg, sum, min, max (with field, e.g. avg:priority)
kiwifs aggregate --root ./knowledge --group status --calc count --calc avg:priority

Maintenance commands

Display a dashboard summarizing the health and statistics of your knowledge base.
kiwifs analytics [flags]
FlagShortDefaultDescription
--root-rKnowledge root
kiwifs analytics --root ./knowledge
Check your knowledge base for issues such as broken links, missing frontmatter, or invalid YAML.
kiwifs lint [flags]
FlagShortDefaultDescription
--root-rKnowledge root
kiwifs lint --root ./knowledge
Run a comprehensive health scan that combines linting, analytics, and cleanup suggestions.
kiwifs janitor [flags]
FlagShortDefaultDescription
--root-rKnowledge root
kiwifs janitor --root ./knowledge
Rebuild all search indexes from scratch. Useful after bulk imports or if search results seem stale.
kiwifs reindex [flags]
FlagShortDefaultDescription
--root-rKnowledge root
kiwifs reindex --root ./knowledge
Reindexing locks writes briefly. Run this during low-traffic periods on production servers.
Create and manage computed views that aggregate data from your knowledge base.
kiwifs view [subcommand] [flags]
FlagShortDefaultDescription
--root-rKnowledge root
kiwifs view --root ./knowledge

Backup and restore

Push your knowledge base to a git remote for backup.
kiwifs backup [flags]
FlagShortDefaultDescription
--root-rKnowledge root
--remoteGit remote URL (overrides config)
--branchBranch to push
kiwifs backup --root ./knowledge --remote git@github.com:org/knowledge.git
Clone a knowledge base from a git remote.
kiwifs restore [flags]
FlagDefaultDescription
--fromGit remote URL (required)
--toLocal directory (required)
--branchBranch to check out
kiwifs restore --from git@github.com:org/knowledge.git --to ./knowledge
Last modified on May 4, 2026