Skip to main content

sentrix init

Set up a repository for use with Sentrix.

sentrix init

Set up a repository for use with Sentrix. This command creates configuration files, installs Claude Code commands, and updates your .gitignore.

Usage#

bash
sentrix init [--check]

Options#

FlagTypeDefaultDescription
--checkboolfalseValidate an existing setup without modifying any files.

--check and --force are mutually exclusive and cannot be used together.

What It Creates#

When you run sentrix init, four things happen:

1. Claude Code Commands#

Installs 16 AI-powered slash commands to .claude/commands/. If a command file already exists, it is skipped unless you pass --force to overwrite it.

2. Repository Config#

Creates .sentrix/config.toml with your API URL and platform mappings. This file is committed to source control so your team shares the same configuration.

You are prompted for:

  • API URL — The Sentrix API endpoint (default: https://api.sentrix.ai)
  • Platforms — For each app directory found in plans/, which platform it uses (nextjs, fastapi, rust-cli, or ui-component)
  • Architecture docs — File paths to architecture documentation that guides AI-generated plans for each platform

3. User Config#

Creates ~/.sentrix/config.toml with your personal credentials. This file is local to your machine and should never be committed.

You are prompted for:

  • API key — Your authentication key (entered as hidden input)
  • Name — Your display name
  • Email — Your email address

4. Gitignore Update#

Appends .sentrix/plan-index.json to your .gitignore if not already present.

Validating an Existing Setup#

Use --check to verify your setup without making changes:

bash
sentrix init --check

This runs checks including:

  • Config files exist and contain valid schemas
  • API URL and key are configured
  • At least one platform mapping is present
  • All 16 Claude Code command files are installed
  • .gitignore includes the plan index
  • User config file permissions are secure (Unix only)

The command exits with code 1 if any check fails. Warnings (such as missing name/email or incorrect file permissions) do not affect the exit code.

Examples#

Set up a new repository:

bash
sentrix init

Overwrite existing Claude Code command files:

bash
sentrix init --force

Preview what would be created without writing anything:

bash
sentrix init --dry-run

Check that an existing setup is valid:

bash
sentrix init --check