Configuration
Configure the Sentrix CLI with repository and user settings.
Configuration
The Sentrix CLI uses a repo config file, user-scoped files, and environment variables. Configuration is created automatically by sentrix init, but you can also edit the files manually.
Repository Config#
File: .sentrix/config.toml
This file is committed to source control so your team shares the same configuration. It contains the API URL and platform mappings.
[api]
url = "https://api.sentrix.ai"
[platforms.nextjs]
apps = ["website", "ai-ui"]
architecture = ["docs/all-ts/architecture-minimal.md", "docs/all-ts/architecture-patterns.md"]
[platforms.fastapi]
apps = ["ai-api"]
architecture = ["docs/ai-api/architecture-minimal.md", "docs/ai-api/architecture-testing.md"]
[platforms.rust-cli]
apps = ["sentrix-cli"]
architecture = ["docs/rust-cli/architecture-minimal.md"]
[platforms.ui-component]
apps = ["ui"]
architecture = ["docs/all-ts/architecture-ui-components.md"]
Sections#
[api]-url: The Sentrix API base URL.[platforms.<name>]- One section per platform. Each containsappsandarchitecture.
Supported platform names: nextjs, fastapi, ui-component, rust-cli.
User Data Directory#
Sentrix keeps user-scoped data outside your repository. The base directory depends on the operating system that is running the CLI:
| OS | User data directory |
|---|---|
| macOS | ~/.sentrix/ |
| Linux | ~/.sentrix/ |
| Windows WSL (Ubuntu) | ~/.sentrix/ |
| Windows native | %APPDATA%\sentrix\ |
This user-scoped directory is separate from the repo-local .sentrix/ directory in your repository root.
| File | Purpose |
|---|---|
config.toml | User config with your name, email, and optional user-level overrides |
config.lock | Lock file used while updating user config |
secrets.enc.json | Encrypted local secret store |
secrets.key | Local encryption key for the secret store |
User Config#
File: ~/.sentrix/config.toml on macOS, Linux, and Windows WSL (Ubuntu); %APPDATA%\sentrix\config.toml on Windows native
This file is local to your machine and should never be committed to source control. Fresh installs write your personal information here. The API key is not stored in this file.
[user]
name = "Jane Smith"
email = "jane@example.com"
Sections#
[user]-nameandemail: Used to stamp authorship on plans and other artifacts.[api]- Optional user-level overrides such asurl,http_connect_timeout, andhttp_request_timeout.[sentrix]- Optional user-levelmanifest_lock_timeout.
On Unix systems, the file permissions should be 0600 (readable only by you). The sentrix init --check command warns if permissions are incorrect.
Encrypted Secrets#
Files: ~/.sentrix/secrets.enc.json and ~/.sentrix/secrets.key on macOS, Linux, and Windows WSL (Ubuntu); %APPDATA%\sentrix\secrets.enc.json and %APPDATA%\sentrix\secrets.key on Windows native
This is where sentrix init stores your API key. The CLI writes the API key to an encrypted local secret store instead of putting it in config.toml.
On Unix systems, sentrix init writes config.toml, secrets.enc.json, and secrets.key with 0600 permissions.
Environment Variables#
Environment variables override file-based configuration where supported. API keys are handled separately through the encrypted secret store. The behavior varies by field:
api.url#
SENTRIX_API_URL > user config > repo config > default (https://api.sentrix.ai)
export SENTRIX_API_URL=https://api.staging.sentrix.ai
api.key#
The API key is stored in the encrypted user secret store, not in repo config. sentrix init writes it to secrets.enc.json and secrets.key under the user data directory.
user.name / user.email#
Read from user config (config.toml in the user data directory above) only at runtime.
The SENTRIX_USER_NAME and SENTRIX_USER_EMAIL environment variables are used only during sentrix init setup for non-interactive environments - they are not used for ongoing runtime resolution.
platforms#
Read from repo config (.sentrix/config.toml) only. There are no environment variable overrides for platform mappings.
Global CLI Flags#
These flags are available on every command:
| Flag | Short | Default | Description |
|---|---|---|---|
--format | json | Output format: json or text. The default is json, designed for machine-readable output and tooling integration. Use --format text for human-readable output. | |
--dry-run | -n | false | Preview changes without writing files or calling the API. |
--force | false | Overwrite existing files or skip confirmation prompts. |