Skip to content

shipq.ini Reference

shipq.ini is the control plane for your ShipQ project. It lives at the project root and is read by every ShipQ command. This page documents every section and key.

Standard INI format with [section] headers, key = value pairs, and # or ; comments:

# This is a comment
; This is also a comment
[section_name]
key = value
another_key = another value

Keys and section names are case-insensitive. Values are trimmed of leading/trailing whitespace.

The most important section. Controls database connectivity, dialect selection, and multi-tenant scoping.

KeyTypeWritten byDescription
database_urlstringshipq db setupConnection URL for the dev database. Determines which SQL dialect ShipQ uses for all code generation.
scopestringManualOptional global scope column for multi-tenancy. When set, shipq migrate new auto-injects this column as a foreign key reference into every new table.
PrefixDialectExample
postgres:// or postgresql://PostgreSQLpostgres://localhost:5432/myapp_dev?sslmode=disable
mysql://MySQLmysql://root:password@tcp(localhost:3306)/myapp_dev
sqlite://SQLitesqlite:///path/to/.shipq/data/myapp.db

For Postgres and MySQL, shipq db setup requires DATABASE_URL to point to localhost. This prevents accidental writes to production databases during development.

[db]
database_url = postgres://localhost:5432/myapp_dev
scope = organization_id

When scope = organization_id is set:

  • shipq migrate new injects organization_id:references:organizations into every new table (skip with --global)
  • Generated queries include WHERE organization_id = ? automatically
  • Generated handlers extract organization_id from the authenticated user’s context
  • Generated tests include tenancy isolation verification

Created by shipq auth. Controls authentication behavior for handler generation.

KeyTypeWritten byDescription
protect_by_defaultboolshipq authWhen true, all handlers generated by shipq resource require authentication. Pass --public to override per-resource.
[auth]
protect_by_default = true

[typescript] — TypeScript Client Codegen

Section titled “[typescript] — TypeScript Client Codegen”

Created by shipq init. Controls TypeScript client generation during shipq handler compile.

KeyTypeWritten byDescription
frameworkstringshipq initWhich framework helpers to generate alongside the base HTTP client. Options: react, svelte, or omit for plain TypeScript.
http_outputstringshipq initOutput directory for generated TypeScript files, relative to the project root.
[typescript]
framework = react
http_output = .
ValueWhat gets generated
reactBase HTTP client + React hooks (query hooks, mutation hooks)
svelteBase HTTP client + Svelte store-based helpers
(omitted or empty)Base HTTP client only (zero framework dependencies)

Created by shipq files. Marks the file upload subsystem as enabled. Actual credentials are read from environment variables, not from the INI file.

VariableDescription
S3_BUCKETS3 bucket name
S3_REGIONAWS region (e.g., us-east-1)
S3_ENDPOINTS3 endpoint URL. Empty for AWS S3; set for MinIO, R2, GCS.
AWS_ACCESS_KEY_IDS3-compatible access key
AWS_SECRET_ACCESS_KEYS3-compatible secret key

Created by shipq workers. Configures the background job queue (Redis) and real-time WebSocket hub (Centrifugo).

KeyTypeWritten byDescription
redis_urlstringshipq workersRedis connection URL for the job queue.
centrifugo_urlstringshipq workersCentrifugo HTTP API URL.
centrifugo_api_keystringshipq workersAPI key for server-to-Centrifugo authentication. Auto-generated.
centrifugo_secretstringshipq workersHMAC secret for signing Centrifugo WebSocket connection/subscription tokens (separate from the cookie-based HTTP auth system). Auto-generated.
[workers]
redis_url = redis://localhost:6379
centrifugo_url = http://localhost:8000
centrifugo_api_key = auto-generated-value
centrifugo_secret = auto-generated-value

Optional. Declare additional environment variables that must be present when running in production. ShipQ’s generated config loader validates these at startup and refuses to start if any are missing.

[env]
STRIPE_SECRET_KEY = required
SENDGRID_API_KEY = required
CUSTOM_FEATURE_FLAG = required

Each key under [env] is the name of an environment variable. The value should be required. At startup, the generated server checks that each declared variable is set and non-empty.

SectionKeyRequiredWritten by
[db]database_urlYesshipq db setup
[db]scopeNoManual
[auth]protect_by_defaultNoshipq auth
[typescript]frameworkNoshipq init
[typescript]http_outputNoshipq init
[files](section presence)Noshipq files
[workers]redis_urlNoshipq workers
[workers]centrifugo_urlNoshipq workers
[workers]centrifugo_api_keyNoshipq workers
[workers]centrifugo_secretNoshipq workers
[env](any key)NoManual
CommandReadsWrites
shipq init[db], [typescript]
shipq db setupDATABASE_URL env var[db] database_url
shipq db compile[db]
shipq migrate new[db] scope
shipq migrate up[db] database_url
shipq auth[db][auth]
shipq signup[db], [auth]
shipq files[db][files]
shipq workers[db], [auth][workers]
shipq workers compile[db], [auth], [workers]
shipq resource[db], [auth]
shipq handler compile[auth], [typescript]
shipq dockerAll sections
  • Commit shipq.ini to version control. It’s build configuration, not secrets.
  • Never store credentials in shipq.ini. Use environment variables for database passwords, API keys, S3 credentials, etc.
  • Use shipq db setup to write database_url rather than editing it by hand.
  • Set scope early — before creating any business-domain migrations.
  • Declare production env vars in [env] so the generated server catches missing configuration at startup instead of at runtime.