Command-Line Flags
Every Copper binary accepts two flags:[chttp]
[clogger]
[csql]
[csql.migrations]
[aws]
Used bycmailer’s AWS SES backend. See Sending Email.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
| Flag | Default | Description |
|---|---|---|
-config | ./config/dev.toml | Path to the config file |
-set | — | Inline overrides, e.g. -set "chttp.port=5902". Values are parsed as TOML, so quote strings: -set 'csql.dialect="pgx"'. Separate multiple with ; |
| Key | Type | Default | Description |
|---|---|---|---|
port | uint | 7501 | HTTP server port (copper create sets 5901 in generated config) |
read_timeout_seconds | uint | 10 | http.Server read timeout |
use_local_html | bool | false | Read templates and static files from ./web on disk instead of the embedded copies — for development |
render_html_error | bool | false | Render a detailed error page in the browser — for development |
enable_single_page_routing | bool | false | Serve index.html for all unmatched GET routes (SPA mode) |
redirect_url_for_unauthorized_requests | string | — | Where HTMLReaderWriter.Unauthorized redirects; plain 401 if unset |
base_path | string | — | Mount the app under a path prefix |
| Key | Type | Default | Description |
|---|---|---|---|
out | string | stdout | File path for debug/info logs |
err | string | stderr | File path for warn/error logs |
format | string | plain | plain or json |
level_filter | []string | all | Allow-list of levels to log, e.g. ["info", "error"] |
redact_fields | []string | — | Tag field names to redact — JSON format only |
| Key | Type | Default | Description |
|---|---|---|---|
dialect | string | — | postgres, pgx, sqlite3, or mysql |
dsn | string | — | Database connection string |
max_open_connections | int | 25 | Connection pool: max open connections |
max_idle_connections | int | 25 | Connection pool: max idle connections |
conn_max_lifetime_mins | int | 5 | Connection pool: max connection lifetime in minutes |
| Key | Type | Default | Description |
|---|---|---|---|
direction | string | up | up applies all pending migrations; down rolls back one |
source | string | embed | embed reads migrations from the binary; dir reads ./migrations from disk |
cmailer’s AWS SES backend. See Sending Email.
| Key | Type | Default | Description |
|---|---|---|---|
region | string | — | AWS region |
access_key_id | string | — | AWS access key ID |
secret_access_key | string | — | AWS secret access key |
| Key | Type | Default | Description |
|---|---|---|---|
ssr | bool | false | Render pages via an Inertia SSR server |
ssr_server | string | http://localhost:13714 | SSR server URL |
| Key | Type | Default | Description |
|---|---|---|---|
dev_mode | bool | false | Load assets from the Vite dev server with HMR |
host | string | http://localhost:3000 | Vite dev server URL |
| Key | Type | Default | Description |
|---|---|---|---|
http_enabled | bool | false | Serve the Prometheus metrics endpoint |
http_path | string | /internal/metrics | Path for the metrics endpoint |