Simple KB

Pre-release. Simple KB's first release on PyPI is on its way: until it's out, installing it won't find it.

CLI reference

Generated from skb --help by scripts/gen_cli_reference.py. Every command takes the global options below; skb <command> --help prints the same text.

Global options

usage: skb [-h] [-V] [--home HOME] [--json] [--server URL] [--allow-private-urls]
           [--allow-http] [--allowed-git-host HOST]
           COMMAND ...

Knowledge bases any agent can use.

positional arguments:
  COMMAND
    create              create a base from files or folders, and build it
    add                 add files, folders, URLs or a git repository to a base, and
                        build
    refresh             rebuild what changed (or everything with --full)
    search              search a base
    fetch               print one concept
    list                list bases
    show                show a base: documents, concepts, last build, problems
    builds              list builds
    stop                stop a build between documents
    resume              resume a stopped, failed or interrupted build
    worker              run queued builds
    import              import an existing OKF bundle
    export              copy a base's bundle to a folder
    publish             let anyone's agent read a base, with no credentials (MCP and
                        llms.txt)
    unpublish           make a public base private again
    note                write a note to a base (from a file, or - for stdin)
    proposals           proposals to a base, pending first
    approve             approve a proposal (it is written as its proposer's)
    reject              reject a proposal, saying why
    verify              mark a page as checked by you, at its current text
    org                 organizations on a hosted server: create, list
    invite              invitation links: create, list, revoke
    members             an organization's members and their roles
    write-policy        readonly, review (the default) or direct
    delete              delete a base and its bundle
    usage               usage totals
    audit               the audit log, newest first
    doctor              check this installation
    migrate             apply pending schema changes (a hosted server's pre-deploy step)
    upload              upload files or archives into a base, and build
    files               list a base's uploaded files
    serve               serve the HTTP API (and MCP) to people and agents
    token               agent tokens: create, list, revoke
    access              people's roles, for proxy mode: grant, revoke, list
    profile             layout profiles: how generated docs are read
    login               sign in to a hosted server, for --server
    logout              forget a server's sign-in
    whoami              who a server knows you as, and your roles

options:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --home HOME           data folder (default: $SKB_HOME or ~/.local/share/simple-kb)
  --json                machine-readable output
  --server URL          a hosted server (signed in with `skb login`) instead of the
                        local data folder; profile commands today (default: $SKB_SERVER)

network (url and git sources; the defaults are the safe ones):
  --allow-private-urls  let url/git sources reach private addresses (a trusted internal
                        docs host)
  --allow-http          let url sources use plain http://
  --allowed-git-host HOST
                        restrict git sources to these hosts (repeatable)

skb create

usage: skb create [-h] [-d DESCRIPTION] [--exclude EXCLUDE] [--section-kb SECTION_KB]
                  [--queue]
                  id [paths ...]

positional arguments:
  id
  paths

options:
  -h, --help            show this help message and exit
  -d DESCRIPTION, --description DESCRIPTION
                        what the base holds; agents read this to decide whether to
                        search it
  --exclude EXCLUDE     glob to leave out (repeatable)
  --section-kb SECTION_KB
                        split large documents into sections of about this size
  --queue               queue the build for `skb worker` instead of running it now

skb add

usage: skb add [-h] [--git URL] [--ref REF] [--paths GIT_PATHS]
               [--credential CREDENTIAL] [--exclude EXCLUDE] [--queue]
               id [paths ...]

positional arguments:
  id
  paths                 files, folders, globs or https:// URLs

options:
  -h, --help            show this help message and exit
  --git URL             a git repository (https://)
  --ref REF             the branch or tag (default: the repository's default branch)
  --paths GIT_PATHS     globs inside the repository
  --credential CREDENTIAL
                        for a private repository: env:<VARIABLE> holding the token
  --exclude EXCLUDE
  --queue

skb refresh

usage: skb refresh [-h] [--full] [--queue] id

positional arguments:
  id

options:
  -h, --help  show this help message and exit
  --full
  --queue
usage: skb search [-h] [-n LIMIT] [--all] id query [query ...]

positional arguments:
  id                    a base id, or several separated by commas
  query

options:
  -h, --help            show this help message and exit
  -n LIMIT, --limit LIMIT
  --all                 every matching result, not one page

skb fetch

usage: skb fetch [-h] id path

positional arguments:
  id
  path

options:
  -h, --help  show this help message and exit

skb list

usage: skb list [-h]

options:
  -h, --help  show this help message and exit

skb show

usage: skb show [-h] id

positional arguments:
  id

options:
  -h, --help  show this help message and exit

skb builds

usage: skb builds [-h] [id]

positional arguments:
  id

options:
  -h, --help  show this help message and exit

skb stop

usage: skb stop [-h] build

positional arguments:
  build

options:
  -h, --help  show this help message and exit

skb resume

usage: skb resume [-h] [--queue] build

positional arguments:
  build

options:
  -h, --help  show this help message and exit
  --queue

skb worker

usage: skb worker [-h] [--once]

options:
  -h, --help  show this help message and exit
  --once      exit when the queue is empty

skb import

usage: skb import [-h] [-d DESCRIPTION] id dir

positional arguments:
  id
  dir

options:
  -h, --help            show this help message and exit
  -d DESCRIPTION, --description DESCRIPTION

skb export

usage: skb export [-h] id dir

positional arguments:
  id
  dir

options:
  -h, --help  show this help message and exit

skb publish

usage: skb publish [-h] [--yes] [--public-url PUBLIC_URL] id

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  --yes                 confirm
  --public-url PUBLIC_URL
                        the server's address, to print the links to share

skb unpublish

usage: skb unpublish [-h] id

positional arguments:
  id

options:
  -h, --help  show this help message and exit

skb note

usage: skb note [-h] -t TITLE [--cite CITE] [--deprecate] id path file

positional arguments:
  id
  path                  lowercase words and hyphens, e.g. runbooks/failover-gotchas
  file                  the note's Markdown, or - to read stdin

options:
  -h, --help            show this help message and exit
  -t TITLE, --title TITLE
  --cite CITE           a source (repeatable)
  --deprecate           deprecate it instead

skb proposals

usage: skb proposals [-h] [--status {pending,approved,rejected,superseded}] id

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  --status {pending,approved,rejected,superseded}

skb approve

usage: skb approve [-h] [--verify] proposal

positional arguments:
  proposal

options:
  -h, --help  show this help message and exit
  --verify    and verify it, in one step

skb reject

usage: skb reject [-h] --reason REASON proposal

positional arguments:
  proposal

options:
  -h, --help       show this help message and exit
  --reason REASON

skb verify

usage: skb verify [-h] [--remove] id path

positional arguments:
  id
  path

options:
  -h, --help  show this help message and exit
  --remove    remove your verification

skb org

usage: skb org [-h] ACTION ...

positional arguments:
  ACTION
    create    create an organization, with its first admin
    list      every organization

options:
  -h, --help  show this help message and exit

skb org create

usage: skb org create [-h] --name NAME --admin ADMIN slug

positional arguments:
  slug           its permanent short name, as in /o/<slug>/

options:
  -h, --help     show this help message and exit
  --name NAME
  --admin ADMIN  the email of someone who has signed in

skb org list

usage: skb org list [-h]

options:
  -h, --help  show this help message and exit

skb invite

usage: skb invite [-h] ACTION ...

positional arguments:
  ACTION
    create    a link that lets someone join; shown once
    list      an organization's invitations
    revoke    end an invitation at once

options:
  -h, --help  show this help message and exit

skb invite create

usage: skb invite create [-h] --org ORG
                         [--role {reader,contributor,reviewer,verifier,admin}]
                         [--days DAYS] [--uses USES] [--public-url PUBLIC_URL]

options:
  -h, --help            show this help message and exit
  --org ORG
  --role {reader,contributor,reviewer,verifier,admin}
  --days DAYS
  --uses USES
  --public-url PUBLIC_URL
                        to print the full link

skb invite list

usage: skb invite list [-h] --org ORG

options:
  -h, --help  show this help message and exit
  --org ORG

skb invite revoke

usage: skb invite revoke [-h] --org ORG id

positional arguments:
  id

options:
  -h, --help  show this help message and exit
  --org ORG

skb members

usage: skb members [-h] --org ORG

options:
  -h, --help  show this help message and exit
  --org ORG

skb write-policy

usage: skb write-policy [-h] id {readonly,review,direct}

positional arguments:
  id
  {readonly,review,direct}

options:
  -h, --help            show this help message and exit

skb delete

usage: skb delete [-h] [--yes] id

positional arguments:
  id

options:
  -h, --help  show this help message and exit
  --yes       confirm

skb usage

usage: skb usage [-h] [id]

positional arguments:
  id

options:
  -h, --help  show this help message and exit

skb audit

usage: skb audit [-h] [-n LIMIT] [id]

positional arguments:
  id

options:
  -h, --help            show this help message and exit
  -n LIMIT, --limit LIMIT

skb doctor

usage: skb doctor [-h]

options:
  -h, --help  show this help message and exit

skb migrate

usage: skb migrate [-h]

options:
  -h, --help  show this help message and exit

skb upload

usage: skb upload [-h] [--folder FOLDER] [--queue] id files [files ...]

positional arguments:
  id
  files

options:
  -h, --help       show this help message and exit
  --folder FOLDER  upload folder inside the base
  --queue

skb files

usage: skb files [-h] [--folder FOLDER] id

positional arguments:
  id

options:
  -h, --help       show this help message and exit
  --folder FOLDER

skb serve

usage: skb serve [-h] [--host HOST] [--port PORT] [--auth {local,proxy,workos}]
                 [--trusted-proxy TRUSTED_PROXY] [--identity-header IDENTITY_HEADER]
                 [--admin ADMIN] [--oauth-issuer OAUTH_ISSUER] [--public-url PUBLIC_URL]
                 [--oauth-org OAUTH_ORG] [--oauth-identity-claim OAUTH_IDENTITY_CLAIM]
                 [--oauth-cli-client CLIENT_ID] [--device-token-days DAYS]
                 [--workers WORKERS] [--tenancy TENANCY] [--allow-remote]

options:
  -h, --help            show this help message and exit
  --host HOST           bind address (default: 127.0.0.1 for local, 0.0.0.0 otherwise;
                        SKB_HOST)
  --port PORT
  --auth {local,proxy,workos}
                        local: single user on this machine; proxy: people named by a
                        trusted proxy; workos: people sign in through WorkOS AuthKit
                        (needs SKB_COOKIE_SECRET)
  --trusted-proxy TRUSTED_PROXY
                        address or CIDR of the proxy (repeatable)
  --identity-header IDENTITY_HEADER
  --admin ADMIN         person granted admin on every base: proxy mode, their email or
                        user id; workos mode, their email, made admin when they first
                        sign in (also SKB_ADMINS, comma-separated)
  --oauth-issuer OAUTH_ISSUER
                        let MCP clients sign in with OAuth: the authorization server,
                        exactly as tokens name it (design/oauth.md; SKB_OAUTH_ISSUER)
  --public-url PUBLIC_URL
                        how clients reach this server (needed with OAuth;
                        SKB_PUBLIC_URL)
  --oauth-org OAUTH_ORG
                        accept tokens for this organization only (org_id; SKB_OAUTH_ORG)
  --oauth-identity-claim OAUTH_IDENTITY_CLAIM
                        the token claim naming the person; must match how the proxy
                        names people
  --oauth-cli-client CLIENT_ID
                        a first-party CLI client (skb login): its tokens for <public-
                        url>/v1 act as the person, with their own roles (repeatable;
                        design/oauth.md)
  --device-token-days DAYS
                        how long a device signed in with `skb login --device` stays
                        signed in (default 90)
  --workers WORKERS     build workers inside the server (0 for none; SKB_WORKERS)
  --tenancy TENANCY     single: one team per server (the default); many: anyone signs up
                        and creates organizations (needs --auth workos; SKB_TENANCY)
  --allow-remote        local mode on a non-loopback address: anyone who can reach it is
                        the owner

skb token

usage: skb token [-h] ACTION ...

positional arguments:
  ACTION
    create    create a token; its secret is shown once
    list      list tokens (never their secrets)
    revoke    revoke a token

options:
  -h, --help  show this help message and exit

skb token create

usage: skb token create [-h] [--base BASE] [--all-bases]
                        [--role {reader,contributor,reviewer}] [--expires DAYS]
                        name

positional arguments:
  name

options:
  -h, --help            show this help message and exit
  --base BASE           a base it may use (repeatable)
  --all-bases
  --role {reader,contributor,reviewer}
  --expires DAYS

skb token list

usage: skb token list [-h]

options:
  -h, --help  show this help message and exit

skb token revoke

usage: skb token revoke [-h] token_id

positional arguments:
  token_id

options:
  -h, --help  show this help message and exit

skb access

usage: skb access [-h] ACTION ...

positional arguments:
  ACTION
    grant     give a person a role on one base, or all
    list      list grants
    revoke    remove a grant

options:
  -h, --help  show this help message and exit

skb access grant

usage: skb access grant [-h] [--base BASE]
                        email {reader,contributor,reviewer,verifier,admin}

positional arguments:
  email
  {reader,contributor,reviewer,verifier,admin}

options:
  -h, --help            show this help message and exit
  --base BASE

skb access list

usage: skb access list [-h]

options:
  -h, --help  show this help message and exit

skb access revoke

usage: skb access revoke [-h] grant_id

positional arguments:
  grant_id

options:
  -h, --help  show this help message and exit

skb profile

usage: skb profile [-h] ACTION ...

positional arguments:
  ACTION
    list      the built-in profiles, and a base's own with --base
    schema    print the profile format (JSON Schema)
    test      check a profile against a folder of pages, with no model; exit 1 if
              refused
    create    propose a profile with your own model (through SwarmKit), test it, revise
              it
    push      validate a profile on the base's documents, make it active, and rebuild
    show      a stored profile and its validation report
    versions  a profile's versions: who pushed each, when, which is active
    activate  make a stored version the active one, and rebuild
    remove    stop using a profile (its versions are kept), and rebuild
    pull      write the base's active profiles to a folder
    sync      push every profile in a folder: unchanged ones skipped, changed ones
              pushed

options:
  -h, --help  show this help message and exit

skb profile list

usage: skb profile list [-h] [--base BASE] [--server URL]

options:
  -h, --help    show this help message and exit
  --base BASE   a base: its profiles and their active versions
  --server URL  a hosted server

skb profile schema

usage: skb profile schema [-h]

options:
  -h, --help  show this help message and exit

skb profile test

usage: skb profile test [-h] [--limit LIMIT] [--min-retained MIN_RETAINED]
                        [--samples SAMPLES]
                        profile folder

positional arguments:
  profile               a profile.json, or a built-in profile's name
  folder

options:
  -h, --help            show this help message and exit
  --limit LIMIT         pages tested at most (sampled)
  --min-retained MIN_RETAINED
                        share of a page's content a profile must keep (default 0.9)
  --samples SAMPLES     pages shown as they'd be indexed

skb profile create

usage: skb profile create [-h] --model PROVIDER/MODEL [--out OUT] [--rounds ROUNDS]
                          [--budget BUDGET] [--samples SAMPLES] [--from BUILT_IN]
                          [--schema-on-wire]
                          folder

positional arguments:
  folder                a copy of the documents (only samples are sent)

options:
  -h, --help            show this help message and exit
  --model PROVIDER/MODEL
                        a SwarmKit model provider and model: anthropic/claude-
                        sonnet-5-5, ollama/qwen3:14b, openrouter/<vendor>/<model> (its
                        API key from the provider's usual variable)
  --out OUT             where to write it
  --rounds ROUNDS       answers asked for at most (default 3)
  --budget BUDGET       tokens spent at most (default 200,000)
  --samples SAMPLES     layouts shown, one page each
  --from BUILT_IN       start from a built-in profile
  --schema-on-wire      also send the format as response_format where the provider
                        enforces it (some hosts hang on it)

skb profile push

usage: skb profile push [-h] --base BASE [--server URL] [--queue] file

positional arguments:
  file          a profile.json

options:
  -h, --help    show this help message and exit
  --base BASE   the knowledge base
  --server URL  a hosted server, signed in with `skb login` (default: $SKB_SERVER, else
                local)
  --queue       queue the build instead of waiting

skb profile show

usage: skb profile show [-h] --base BASE [--server URL] [--version VERSION] name

positional arguments:
  name

options:
  -h, --help         show this help message and exit
  --base BASE        the knowledge base
  --server URL       a hosted server, signed in with `skb login` (default: $SKB_SERVER,
                     else local)
  --version VERSION  a version (default: the active one)

skb profile versions

usage: skb profile versions [-h] --base BASE [--server URL] name

positional arguments:
  name

options:
  -h, --help    show this help message and exit
  --base BASE   the knowledge base
  --server URL  a hosted server, signed in with `skb login` (default: $SKB_SERVER, else
                local)

skb profile activate

usage: skb profile activate [-h] --base BASE [--server URL] --version VERSION [--queue]
                            name

positional arguments:
  name

options:
  -h, --help         show this help message and exit
  --base BASE        the knowledge base
  --server URL       a hosted server, signed in with `skb login` (default: $SKB_SERVER,
                     else local)
  --version VERSION
  --queue            queue the build instead of waiting

skb profile remove

usage: skb profile remove [-h] --base BASE [--server URL] [--queue] name

positional arguments:
  name

options:
  -h, --help    show this help message and exit
  --base BASE   the knowledge base
  --server URL  a hosted server, signed in with `skb login` (default: $SKB_SERVER, else
                local)
  --queue       queue the build instead of waiting

skb profile pull

usage: skb profile pull [-h] --base BASE [--server URL] --out OUT

options:
  -h, --help    show this help message and exit
  --base BASE   the knowledge base
  --server URL  a hosted server, signed in with `skb login` (default: $SKB_SERVER, else
                local)
  --out OUT

skb profile sync

usage: skb profile sync [-h] --base BASE [--server URL] [--dry-run] [--prune] [--queue]
                        folder

positional arguments:
  folder        a folder of profile .json files

options:
  -h, --help    show this help message and exit
  --base BASE   the knowledge base
  --server URL  a hosted server, signed in with `skb login` (default: $SKB_SERVER, else
                local)
  --dry-run     show what would change, change nothing
  --prune       remove the base's profiles that aren't in the folder
  --queue       queue the build instead of waiting

skb login

usage: skb login [-h] [--server URL] [--device | --with-token] [--name NAME]

options:
  -h, --help    show this help message and exit
  --server URL  the server's URL
  --device      sign in with a code approved in the portal on any machine (SSH,
                containers, CI)
  --with-token  read a token from standard input instead of signing in with a browser
  --name NAME   the device's name in the portal (default: skb on <host>)

skb logout

usage: skb logout [-h] [--server URL]

options:
  -h, --help    show this help message and exit
  --server URL

skb whoami

usage: skb whoami [-h] [--server URL]

options:
  -h, --help    show this help message and exit
  --server URL