Skip to main content

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.

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 and architecture.

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:

OSUser 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.

FilePurpose
config.tomlUser config with your name, email, and optional user-level overrides
config.lockLock file used while updating user config
secrets.enc.jsonEncrypted local secret store
secrets.keyLocal 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.

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

Sections#

  • [user] - name and email: Used to stamp authorship on plans and other artifacts.
  • [api] - Optional user-level overrides such as url, http_connect_timeout, and http_request_timeout.
  • [sentrix] - Optional user-level manifest_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)

bash
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:

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.