Skip to main content
All commands support --json for machine-readable output, --quiet to suppress non-essential output, and --no-color to disable ANSI colors.

Commands at a glance

CommandDescription
connectionsInspect and manage stored provider connections.
daemonManage the local Authsome daemon.
doctorRun health checks on directory layout and encryption.
initInitialize local storage and register a fresh profile.
logView structured audit entries or the raw client debug log.
login <provider>Authenticate with PROVIDER using the configured flow.
logout <provider>Log out of the specified PROVIDER connection.
profileManage local profiles backed by identity keys.
providerManage provider definitions and provider-level operations.
run -- <cmd>Run COMMAND as a subprocess injected with authentication credentials.
scanScan env files and process env for provider API keys.
whoamiShow basic local context.

Global flags

FlagDescription
--jsonOutput in machine-readable JSON.
--quietSuppress non-essential output (banners, status messages). Primary data rows always print.
--no-colorDisable ANSI colors.
-v, --versionPrint the authsome version.
--verboseEnable DEBUG logging to stderr.
--log-file <path>Path for the rotating client debug log file. Pass "" to disable. Default: ~/.authsome/client/logs/authsome.log.

Command details

init / whoami / doctor

authsome init             # initialize local storage and register profile
authsome whoami           # show identity context and encryption mode
authsome doctor           # run health checks
authsome doctor --json    # structured output for monitoring
doctor runs six checks and exits 0 when all pass:
CheckWhat it verifies
spec_versionServer spec version is compatible
identityActive identity key is present and readable
providersProvider registry loads without error
connectionsConnection store is accessible
vaultVault roundtrip (put / get / delete) succeeds
integrityStore integrity check passes

provider list / provider inspect / connections inspect

authsome provider list                      # all providers + connection states
authsome provider list --json               # machine-readable, bundled + custom arrays
authsome provider inspect github            # full provider definition + connections as JSON
authsome connections inspect github         # full connection details + credentials (redacted)
--quiet suppresses the summary header (Providers: N total, N connected) but always prints the table.

login

authsome login <provider> [OPTIONS]
OptionDescription
--flow <type>Override the auth flow. Valid values: pkce, device_code, dcr_pkce, api_key.
--connection <name>Connection name. Default: default.
--scopes <s1,s2>Comma-separated scopes to request.
--base-url <url>Override the base URL for multi-tenant providers.
--forceOverwrite an existing connection without prompting.
Examples:
authsome login github                       # OAuth2 PKCE flow
authsome login github --flow device_code    # headless OAuth2
authsome login openai                       # API-key flow via browser bridge
authsome login github --connection work     # second connection on the same provider
authsome login github --base-url https://github.acme.com   # GitHub Enterprise
Sensitive values — client_secret, API keys — are never accepted as command-line arguments. Authsome collects them through the secure browser bridge or, on headless machines, through masked terminal input.

run

authsome run -- <command> [args...]
Runs <command> behind a local HTTP proxy that injects auth headers into matched outbound requests. The child process never sees the raw secret.
authsome run -- python my_agent.py
authsome run -- curl https://api.openai.com/v1/models
How it works:
  1. Starts a local proxy on an ephemeral port.
  2. Launches the child with HTTP_PROXY / HTTPS_PROXY set.
  3. Sets placeholder env vars (e.g. OPENAI_API_KEY=authsome-proxy-managed) so SDKs initialize.
  4. Intercepts matched requests and injects the real auth headers.
  5. Stops the proxy on child exit.
  6. Returns the child’s exit code.
See Proxy injection for the routing contract.

scan

authsome scan [OPTIONS]
Scans .env files in the current directory tree and the active process environment for credentials matching bundled providers. By default it prints a drift report (what’s in your env vs. what’s in the vault).
OptionDescription
--importApply the discovered values, creating connections in the vault.
--connection <name>Target a non-default connection name when importing.
--jsonMachine-readable drift report. Combine with --import to apply.
authsome scan                           # report-only
authsome scan --json                    # report-only, JSON output
authsome scan --import                  # write discovered keys into the vault
authsome scan --import --connection ci  # import into a named connection
scan does not support --quiet. Use --json for headless contexts.

connections set-default

authsome connections set-default <provider> <connection>
Sets the default connection for a provider. The proxy and library calls use the default unless an explicit --connection flag is passed.
authsome connections set-default github work

profile

authsome profile create   # create a new local profile keypair
authsome profile use      # switch the active local profile
Profiles are backed by Ed25519 identity keys at ~/.authsome/identities/. Each profile has its own credential namespace in the vault.

daemon

authsome daemon serve      # run the daemon in the foreground
authsome daemon start      # start the local daemon in the background
authsome daemon stop       # stop the local daemon
authsome daemon restart    # restart the local daemon
authsome daemon status     # show daemon status
authsome daemon logs       # show daemon log output

logout / provider revoke / provider remove

CommandLocal stateRemote provider
logoutRemoves the connection recordNot contacted
provider revokeRemoves all connections + client credentialsCalls revocation endpoint where supported
provider removeRemoves the provider entirely (custom) or resets to bundled default (bundled)Not contacted
authsome logout github --connection work
authsome provider revoke github
authsome provider remove acmecrm

provider register

authsome provider register <path/to/provider.json> [OPTIONS]
OptionDescription
--forceOverwrite an existing provider with the same name without prompting.
--yesSkip the confirmation prompt (without forcing an overwrite).
Validates the JSON, copies it into ~/.authsome/providers/, and confirms the new provider appears in authsome provider list.
authsome provider register ./acme.json             # prompt before registering
authsome provider register ./acme.json --force     # overwrite existing, no prompt
authsome provider register ./acme.json --yes       # skip prompt, fail if already exists
See Custom providers for full templates.

log

authsome log              # last 50 structured audit entries
authsome log -n 200       # last 200 entries
authsome log --json       # entries as a parsed JSON array
authsome log --raw        # raw client debug log (loguru format)
authsome log --raw -n 20  # last 20 lines of the client debug log
Reads from ~/.authsome/server/logs/authsome.log (the server-side structured audit log). Each entry records actions like login, logout, revoke, and scan, with fields: timestamp, event, provider, connection, identity, status. The --raw flag switches to the client-side debug log at ~/.authsome/client/logs/authsome.log (loguru format, DEBUG level).

Exit codes

CodeMeaningError class
0Success
1Unexpected failureUnclassified exceptions
2Authentication failed or input cancelledAuthenticationFailedError, InputCancelledError
3Connection not foundConnectionNotFoundError
4Provider not found or operation not allowedProviderNotFoundError, OperationNotAllowedError
5Credential missing or token expiredCredentialMissingError, TokenExpiredError, RefreshFailedError
6Connection already existsConnectionAlreadyExistsError
7Provider already registeredProviderAlreadyRegisteredError
8Endpoint unreachableEndpointUnreachableError
9Daemon unavailableDaemonUnavailableError
Note: Click argument validation errors (missing required argument, unknown option) also produce exit code 2 via Click’s own mechanism. When --json is passed and a command fails, the structured output includes "error" and "message" keys.