Server configuration
All environment variables are optional for local development. The defaults provide a working setup out of the box.| Variable | Default | Description |
|---|---|---|
DATABASE_URL | Bundled PostgreSQL | PostgreSQL connection string. The Docker Compose setup includes PostgreSQL by default. |
SECRET_ENCRYPTION_KEY | Auto-generated | AES-256-GCM encryption key for the secret store. Auto-generated on first run if not set. |
NEXTAUTH_SECRET | - | Enables Google OAuth (multi-user mode). Without this, OneCLI runs in single-user mode with no login required. |
GOOGLE_CLIENT_ID | - | Google OAuth client ID. Required if NEXTAUTH_SECRET is set. |
GOOGLE_CLIENT_SECRET | - | Google OAuth client secret. Required if NEXTAUTH_SECRET is set. |
Single-user vs multi-user mode
By default, OneCLI runs in single-user mode with no login screen. This is ideal for local development and personal use. To enable multi-user mode with Google OAuth, set the three auth variables:Bring your own database
By default, the Docker Compose setup bundles a PostgreSQL instance. To use an external PostgreSQL instance instead:Telemetry
| Variable | Default | Description |
|---|---|---|
DO_NOT_TRACK | - | Set to 1 to disable anonymous telemetry. Supported by many open-source tools (Next.js, Homebrew, Gatsby, Sanity, Railway, etc.). |
CLI configuration variables
These variables configure theoc CLI tool.
| Variable | Default | Description |
|---|---|---|
ONECLI_ENV | production | Set to dev for development mode |
ONECLI_PLUGIN_DIR | ~/.onecli/plugins | Override the plugin binary directory |
Development vs production
SettingONECLI_ENV=dev switches oc to development mode, which uses separate directories and keychain entries to avoid interfering with your production setup:
| Path / Key | Production | Development |
|---|---|---|
| Credentials directory | ~/.onecli/credentials | ~/.onecli/credentials-dev |
| Cache directory | ~/.onecli/cache | ~/.onecli/cache-dev |
| Keychain service name | onecli-token | onecli-token-dev |
Plugin directory override
ONECLI_PLUGIN_DIR tells oc where to look for plugin binaries. This is useful for:
- Pointing to a local build directory during plugin development
- Storing plugins in a non-default path
- Isolating plugin binaries per test environment