Manage sonny’s configuration file and inspect the effective, merged configuration.

Configuration can be specified via:

  • Command line flags
  • Environment variables (SONNY_* prefix)
  • Configuration file (.sonny.yaml in the working directory, then $HOME)
  • Directory configuration (the directory: block of every .sonny.yaml from the filesystem root down to the working directory; created by sonny config init)
Usage:
  sonny config [command]

All config subcommands accept the global flags .

config show

Print the effective configuration merged from flags, environment, and config file.

FlagTypeDescription
-h, --help—help for show
--supervisor-deploymentstringinspect this protected deployment without activation (default: SONNY_SUPERVISOR_DEPLOYMENT)

Its ## From flags/environment: block also carries the two resolved dangerous-mode lines, auto_approve and isolation_bypassed, each with the origin that armed or forbade it. An ignored project .sonny/permissions.yaml is reported on stderr, so the posture block stays pipeable. This command reports; it never refuses.

sonny config show

config explain

Show, for every configuration key, the value that wins and every lower-precedence candidate it beat, with where each one lives. Secret-bearing keys show presence and location only.

FlagTypeDescription
-h, --help—help for explain
--json—emit the versioned JSON envelope on stdout
--supervisor-deploymentstringinspect this protected deployment without activation (default: SONNY_SUPERVISOR_DEPLOYMENT)

config validate

Validate the analysis.version=1 configuration across its layers (protected operator base, user, global, project, environment, invocation) and report known startup blockers, without activating analysis or calling a model. Graph and policy validation does not attest provider capabilities or authorize model calls.

FlagTypeDescription
-h, --help—help for validate
--json—emit the versioned JSON envelope on stdout
--supervisor-deploymentstringinspect this protected deployment without activation (default: SONNY_SUPERVISOR_DEPLOYMENT)

sonny config validate does not consult dangerous-mode policy at all.

config init

Add a starter directory: block to .sonny.yaml.

FlagTypeDescription
--force—replace an existing directory: block, create ./.sonny.yaml even when it hides $HOME/.sonny.yaml, or write through a symlink that dangles or leaves the working directory
-h, --help—help for init

config path

Show every standard configuration / data / cache path.

FlagTypeDescription
-h, --help—help for path

config resource-reuse

Show the effective resource_reuse configuration and its digest.

FlagTypeDescription
-h, --help—help for resource-reuse
--json—emit the versioned JSON envelope on stdout

Credential resolution: sonny credentials

Credential resolution is part of configuration, so it is documented here rather than on its own page. The command is sonny credentials — plural. There is no sonny credential command.

sonny stores Copilot/Hyper OAuth tokens through the credentials.Broker (keychain, or a sealed file store) once a one-time migration has copied and verified every row from the legacy sessions.db table; until then the legacy store remains authoritative.

Usage:
  sonny credentials [command]

Available Commands:
  delete         Remove the API key or sign-in stored in the keyring for a model source or provider
  migrate-status Migrate (or resume migrating) legacy OAuth tokens to the credential broker, and report status
  resolve        Report which credential tier (keyring, bao, environment, .env) answers a catalog source, never the value
  retire-legacy  Zero and delete the legacy OAuth rows and master key once migration has been verified
FlagTypeDescription
-h, --help—help for credentials

credentials delete

sonny credentials delete <source or provider id> removes what Settings' Disconnect removes: every credential the broker holds under the provider id, and the key a model source stored under its own account (the keyring tier sonny credentials resolve reports). Environment variables, .env files and Bao are not touched. Exit 1 when nothing was stored.

FlagTypeDescription
-h, --help—help for delete

credentials migrate-status

Run (or resume) the legacy OAuth token migration and report its state. Safe to run repeatedly.

FlagTypeDescription
-h, --help—help for migrate-status

credentials retire-legacy

Zero and delete the legacy OAuth rows and master key once migration has been verified, after the confirmation window has passed.

FlagTypeDescription
--force—retire immediately, bypassing the confirmation window
-h, --help—help for retire-legacy

credentials resolve

Report which secret-resolver tier (keyring, bao, environment, .env) supplies a catalog source’s credential — never the value.