CLI Reference

This reference documents the public sftpwarden command surface from the real Typer application. It is written for operators who are new to SFTPWarden and need to know what each command does, what each argument accepts, and which commands change local files, remote hosts, containers, provider data, or Kubernetes resources.

How To Read Commands

sftpwarden is command-first:

sftpwarden <command> [options]
sftpwarden <group> <subcommand> [arguments] [options]

Most commands work against the active context. Select a different context for one command with --context <name> or -c <name>. Use --config <path> only when you want to bypass the context registry and point directly at a sftpwarden.yaml file.

sftpwarden.yaml is desired state. Editing it manually, or changing it with sftpwarden config, does not update running infrastructure by itself. Apply deployment-level config changes with sftpwarden deploy, sftpwarden kube apply, or sftpwarden helm upgrade. User/provider data changes are applied to the running runtime with sftpwarden refresh, except Kubernetes YAML/CSV providers, where the provider file is copied into the PVC during deploy/apply or upgrade.

Common Value Types

Type

Accepted value

TEXT

Plain string. Quote values that contain spaces.

INTEGER

Whole number, for example 2200 or 12001.

BOOLEAN

Usually a flag such as --json; for config values use YAML scalars such as true or false.

PATH

File or directory path. ~ is expanded by SFTPWarden where path expansion is supported.

DSN

Database URL such as postgresql://user:pass@host:5432/sftpwarden. Environment references like ${SFTPWARDEN_POSTGRES_DSN} are accepted in config.

REMOTE

Remote URL in user@host:/path form.

Common Flags

Flag

Value

What it does

--context, -c

TEXT

Runs the command against one registered context without changing the active context.

--config

PATH

Reads a specific sftpwarden.yaml file directly.

--json

flag

Prints machine-readable JSON instead of Rich tables or human text.

--dry-run

flag

Prints the planned operation without writing files, touching containers, or mutating remote resources.

--yes, -y

flag

Accepts confirmation prompts for scripts and CI. Use it only when the action is intentional.

--help

flag

Shows command help generated by Typer.

Shell Completion

Install completion for the current shell:

sftpwarden --install-completion

Print the completion script without installing it:

sftpwarden --show-completion

Command Sections

The command pages below are also available in the left navigation under the Reference section. Each page documents its commands and subcommands with arguments, options, examples, and operational effects.

  • Init Commands: project creation and provider schema selection.

  • Core Commands: deploy, validate, compose, plan, refresh, health, backup, and restore.

  • User Commands: user listing, creation, updates, disable/enable, and removal.

  • User Key Commands: named key listing, add/remove, lifecycle, rotation, expiry, and import.

  • Provider Commands: provider export/import/copy and schema migration commands.

  • Context Commands: context registry, active context, remote metadata, cleanup, and dynamic context fields.

  • Config Commands: sftpwarden.yaml inspection and supported config updates.

  • Watcher And Sync Commands: remote local-sync planning, foreground watch, and watcher service installation.

  • Kubernetes Commands: render, apply, status, logs, doctor, and delete.

  • Helm Commands: values, template, lint, upgrade, and uninstall.

  • Runtime Commands: container-side runtime entrypoints used by the deployed image.

Command Index