Skip to main content

Configuration

Configure the Sentrix CLI with repository and user settings.

Configuration

The Sentrix CLI uses two configuration 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.

toml
[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 contains:
    • apps: A list of app names that use this platform.
    • architecture: A list of architecture documentation file paths. These are provided to the AI when generating and reviewing plans.

Supported platform names: nextjs, fastapi, ui-component, rust-cli.

User Config#

File: ~/.sentrix/config.toml

This file is local to your machine and should never be committed to source control. It contains your API key and personal information.

toml
[api]
key = "sk-your-api-key"

[user]
name = "Jane Smith"
email = "jane@example.com"

Sections#

  • [api]key: Your Sentrix API key. You can also set url here as a user-level override of the repository config.
  • [user]name and email: Used to stamp authorship on plans and other artifacts.

On Unix systems, the file permissions should be 0600 (readable only by you). The sentrix init --check command warns if permissions are incorrect.

Environment Variables#

Environment variables override file-based configuration. The precedence varies by field:

api.url#

SENTRIX_API_URL > user config > repo config > default (http://localhost:3100)

bash
export SENTRIX_API_URL=https://api.staging.sentrix.ai

api.key#

SENTRIX_API_KEY > user config (not read from repo config, since keys should never be committed)

bash
export SENTRIX_API_KEY=sk-your-api-key

user.name / user.email#

Read from user config (~/.sentrix/config.toml) 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:

FlagShortDefaultDescription
--formatjsonOutput 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-nfalsePreview changes without writing files or calling the API.
--forcefalseOverwrite existing files or skip confirmation prompts.