setup, login, logout, whoami
Square brackets mark optional arguments; angle brackets mark values to replace. Shared options: --server-url <url> overrides the resolved server for one invocation; --no-update-check skips the update lookup; -h after a command shows its help. There is no global --profile; use KCAP_PROFILE
kcap setup [<tenant>] [options]kcap setup --local [options]kcap setup --discover [--json] [--github] [--device]<tenant> is a workspace slug (expanded to https://<slug>.kcap.ai) or a URL. When it is omitted, setup signs in and discovers your workspaces, and offers to create one only when discovery finds none
| Option | Behaviour |
|---|---|
--local | Install and start the local edition on this machine instead of connecting to a workspace |
--server-url <url> | Configure an existing server; takes precedence over the positional tenant |
--discover | Sign in, list reachable workspaces, stop. Saves nothing. --json prints one document with workspaces, can_create and provider |
--org <name> --slug <slug> | Create a first workspace non-interactively. Not with a server argument or --github |
--github | Discover through GitHub instead of single sign-on |
--device | Device-code sign-in, for SSH and machines without a browser. Redirected input selects it automatically |
--no-prompt | Use defaults, install detected integrations, import this machine’s history in the foreground. Needs a server argument or --org/--slug |
--default-visibility <v> | With --no-prompt: private, project, org_public (default) or public |
--daemon-name <name> | With --no-prompt: the daemon’s name; default is the lowercase OS username |
--use-provider-api-key true|false | With --no-prompt: keep or scrub ANTHROPIC_API_KEY/OPENAI_API_KEY for headless calls |
--skip-import | Skip the history import, interactive or not |
--skip-<agent>-hooks, --skip-<agent>-mcp, --skip-<agent>-instructions, --skip-<agent>-skills | Opt out of one component for one agent; kcap setup --help lists them. A command-line skip beats a browser choice |
--skip-codex-network-access | Leave Codex’s sandbox network allowlist alone |
--muse-assistant | Set up inside a Muse Assistant VM; implies --no-prompt --device --skip-import, installs no agent integrations |
Installing any agent’s hooks also adds the kcap git hook to ~/.gitconfig (git 2.54 or later)
login, logout, whoami
Section titled “login, logout, whoami”kcap login [--discover] [--github] [--device]kcap logoutkcap whoamilogin | Sign in to the configured server with its provider; with no server, discover and save one. --discover re-runs discovery and saves the chosen workspace as a profile |
logout | Delete locally stored credentials for all profiles |
whoami | Show the effective profile’s identity, provider, expiry and server, and check the server accepts the token. Exit 1 when credentials are missing or rejected; 0 when accepted, when none are needed, or when the check is inconclusive |
Tokens live per profile in ~/.config/kcap/tokens/<profile>.json (or under KCAP_CONFIG_DIR) and refresh automatically