---
url: /runcobo/cli/configuration.md
description: >-
  Every runcobo.yml setting used by cobo, with defaults, plus the environment
  variables cobo reads.
---

# runcobo.yml

`runcobo.yml` configures `cobo`'s development commands. It lives in the project root, is read only by `cobo` — **your running application never reads it** — and must not contain production credentials.

```yaml [runcobo.yml]
name: blog
database_prefix: blog

seed_command: [crystal, run, src/seed.cr]
development_environment:
  HOST: "127.0.0.1"
  PORT: "3000"
secret_environment: SESSION_SECRET
public_base_environment: PUBLIC_BASE_URL

tasks:
  reindex:
    description: Rebuild the search index
    command: [crystal, run, src/jobs/reindex.cr, --]
```

Unknown keys are an error, so typos are caught immediately.

## Required settings

| Key | Description |
| --- | --- |
| `name` | Project name |
| `database_prefix` | Local databases are named `<prefix>_development` and `<prefix>_test`. Lowercase letters, digits and `_`. |

## Local database

Only needed when your local server doesn't use the defaults. SQLite ignores both.

| Key | Default | Description |
| --- | --- | --- |
| `database_user` | `postgres` (PostgreSQL), `root` (MySQL) | User for the local server |
| `database_port` | `5432` (PostgreSQL), `3306` (MySQL) | Port of the local server |

For a password or anything else, set a full URL in `DEVELOPMENT_DATABASE_URL` and `TEST_DATABASE_URL` — see [Local databases](/cli/database#local-databases).

## Development server

| Key | Default | Description |
| --- | --- | --- |
| `seed_command` | none | Command run by `cobo dev` and `cobo db seed` |
| `development_environment` | `{}` | Variables for `dev`, `console`, `runner` and `task`. Values already set in your shell win. |
| `secret_environment` | none | Variable name to fill with a random secret. Generated once and stored in `.local/development-secret`, so sessions survive restarts. |
| `public_base_environment` | none | Variable name to fill with `http://$HOST:$PORT`, unless already set |
| `application_entry` | `src/app.cr` | File loaded by `console` and `runner` |
| `tasks` | `{}` | Named commands for `cobo task` — each with `command` (array) and optional `description` |

Commands are arrays: each element is passed as one argument, with no shell expansion.

## Database and code generation paths

All paths are relative to the project root.

| Key | Default |
| --- | --- |
| `migration_directory` | `db/migrations` |
| `snapshot_path` | `db/schema.snapshot.sql` |
| `generator_config` | `sqlc.yaml` |
| `generator_inputs` | `[db/migrations, db/queries]` |
| `generator_binary` | `bin/crsql` |
| `generated_directory` | `src/persistence/generated` |

If you change generator paths, keep `sqlc.yaml` consistent with them.

## Environment variables

| Variable | Used by | Description |
| --- | --- | --- |
| `DEVELOPMENT_DATABASE_URL` | local `db` commands, `dev` | Override the development database. Must still be `<prefix>_development` on `localhost`/`127.0.0.1`. |
| `TEST_DATABASE_URL` | local `db` commands, `test` | Same, for `<prefix>_test` |
| `STAGING_DATABASE_URL` | `db migrate/status/wait/rollback staging` | Staging connection |
| `PRODUCTION_DATABASE_URL` | `db migrate/status/wait production` | Production connection |

`cobo` deliberately **ignores `DATABASE_URL`** when choosing a database, and strips connection-redirecting variables such as `PGHOST`, `PGPORT`, `PGDATABASE` and `PGSERVICE`. A stray variable in your shell can't point a destructive command at the wrong database.

## Ignore local files

```text [.gitignore]
/.local/
/bin/
/db/schema.snapshot.sql
```

`.local/` holds SQLite databases, the `cobo dev` build, the development secret and cached tools.
