Skip to content

Shell Completion and Version

Shell Completion

sh
knot completion [command]
CommandDescription
knot completion bashGenerate Bash completion.
knot completion zshGenerate Zsh completion.
knot completion fishGenerate Fish completion.
knot completion powershellGenerate PowerShell completion.

Bash, Zsh, and Fish support:

FlagTypeDefaultDescription
--no-descriptionsboolfalseDisable completion descriptions.

PowerShell defaults to no descriptions for faster shell startup. It supports:

FlagTypeDefaultDescription
--descriptionsboolfalseEnable completion descriptions.

Examples:

sh
source <(knot completion bash)
knot completion bash > ~/.local/share/bash-completion/completions/knot
autoload -U compinit && compinit && source <(knot completion zsh)
knot completion fish | source

PowerShell:

powershell
$CompletionDir = Join-Path $HOME ".config\knot"
New-Item -ItemType Directory -Path $CompletionDir -Force | Out-Null
$CompletionPath = Join-Path $CompletionDir "completion.ps1"
knot completion powershell > $CompletionPath
. $CompletionPath

Sync Commands

sh
knot sync provider add [webdav|s3] [alias]
knot sync provider add webdav [alias]
knot sync provider add s3 [alias]
knot sync provider edit <alias>
knot sync provider list
knot sync provider show <alias>
knot sync push [provider]
knot sync pull [provider] --strategy local-first

WebDAV provider flags:

FlagTypeDescription
--urlstringWebDAV object URL or directory URL.
--userstringWebDAV username.
--passwordstringWebDAV password, stored encrypted locally.

S3 provider add/edit flags:

FlagTypeDescription
--bucketstringS3 bucket. Required when adding.
--keystringS3 object key. Defaults to config.toml.enc.
--regionstringS3 signing region. Required when adding.
--endpointstringOptional S3-compatible endpoint URL.
--access-key-idstringS3 access key ID, stored encrypted locally.
--secret-access-keystringS3 secret access key, stored encrypted locally.
--session-tokenstringOptional S3 session token, stored encrypted locally. Use - with provider edit to clear it.
--path-styleboolUse S3 path-style URLs for compatible endpoints that require bucket-in-path addressing.

provider show never prints provider secrets. S3 targets appear in provider list as s3://bucket/key.

Version

sh
knot version
knot version --json
knot version check
knot version check --json
knot version upgrade [-y|--yes]
knot version upgrade [-y|--yes] --json
knot upgrade [-y|--yes]
knot upgrade [-y|--yes] --json

knot version shows the Knot version, commit, build date, operating system, and architecture.

knot version check checks the latest stable release manifest and reports whether an update is available. JSON output uses the global --json flag.

knot version upgrade checks first, then upgrades only when a newer release exists. knot upgrade is the shortcut for the same operation.

If the daemon has active SSH sessions, upgrade asks before stopping the daemon because those sessions will be disconnected. In non-interactive scripts, pass -y or --yes; otherwise the command refuses to proceed when active sessions exist.

Development builds (version=dev) do not self-upgrade. They report that self-upgrade is unsupported and exit successfully.

The root command also supports:

sh
knot --version