connections
tonic connections manages named targets in global config or local project overrides.
Add Postgres
Section titled “Add Postgres”tonic connections add postgres local-pg \ --host localhost \ --user app \ --password-env PGPASSWORD \ --context database=app_db \ --context schema=publicFlags:
--host--port, default5432--user--password-env--sslmode, defaultprefer--context database=...--context schema=...--local
Required by validation: name, host, user, and database context.
Add Snowflake
Section titled “Add Snowflake”tonic connections add snowflake warehouse \ --account my-account \ --user my-user \ --auth browserauth \ --browserauth-cache \ --context database=ANALYTICS \ --context schema=PUBLIC \ --context warehouse=COMPUTE_WH \ --context role=ANALYSTFlags:
--account--user--auth password|browserauth|keypair, defaultpassword--browserauth-cache--password-env--private-key-path--private-key-passphrase-env--context database=...--context schema=...--context warehouse=...--context role=...--local
Password auth requires --password-env. Keypair auth requires --private-key-path. Browser auth does not require a secret flag.
Add SQLite
Section titled “Add SQLite”tonic connections add sqlite scratch --path ./scratch.db --localFlags:
--path--local
SQLite targets do not support execution context keys.
Add MySQL
Section titled “Add MySQL”tonic connections add mysql app-db \ --host db.example.com \ --user app \ --password-env MYSQL_PWD \ --context database=analyticsFlags:
--host--port, default3306--user--password-env--sslmode disable|preferred|require|skip-verify|preferred-skip-verify, defaultpreferred--context database=...--context schema=...--context catalog=...--context namespace=...--local
MySQL treats database and schema as the same scope. All accepted context aliases normalize to the effective database.
Show Connections
Section titled “Show Connections”tonic connections showtonic connections show warehouseWithout a name, tonic prints the effective connection list with source information. With a name, it prints that connection as YAML and includes the source path.
Edit Config
Section titled “Edit Config”tonic connections edittonic connections edit --localedit creates the selected config file if needed and opens $VISUAL or $EDITOR.