Skip to content

CLI Reference

The Cortex TMS CLI is the primary tool for managing your TMS projects. Use it to initialize projects, validate documentation health, check project status, and more.

Installation

Terminal window
# Install globally
npm install -g [email protected]
# Or use with npx (no installation)
npx [email protected] <command>

Global Usage

Terminal window
cortex-tms [command] [options]
cortex-tms --help # Show help for all commands
cortex-tms --version # Show current version

Available Commands

init

Initialize Cortex TMS in your project

Sets up the complete TMS documentation structure with interactive prompts.

View init documentation

validate

Validate project health and compliance

Runs comprehensive health checks to ensure documentation follows TMS standards.

View validate documentation

status

Show project health dashboard

Displays a high-level overview of scope, sprint progress, health summary, and backlog.

View status documentation

migrate

Upgrade TMS files to current version

Safely updates template files while preserving customizations.

View migrate documentation

prompt

Access AI prompt templates

Provides quick access to project-aware AI prompts with clipboard integration.

View prompt documentation


Global Options

All commands support these global options:

OptionDescription
-h, --helpShow help for the command
-V, --versionShow CLI version

Command Summary

CommandPurposeCommon Usage
initInitialize TMS in projectcortex-tms init
validateCheck project healthcortex-tms validate --strict
statusView project dashboardcortex-tms status
migrateUpgrade templatescortex-tms migrate --apply
promptGet AI promptscortex-tms prompt init-session
tutorialLearn Cortex TMScortex-tms tutorial

Exit Codes

All commands follow standard Unix exit code conventions:

CodeMeaning
0Success - command completed without errors
1Failure - command encountered errors

Common Workflows

Initial Setup

Terminal window
# 1. Initialize project
cortex-tms init
# 2. Verify setup
cortex-tms validate
# 3. Check status
cortex-tms status

Daily Development

Terminal window
# 1. Get AI session prompt
cortex-tms prompt init-session
# 2. Work on tasks in NEXT-TASKS.md
# 3. Validate before committing
cortex-tms validate --strict

Template Upgrades

Terminal window
# 1. Check for updates
cortex-tms migrate
# 2. Apply upgrades
cortex-tms migrate --apply
# 3. Verify changes
cortex-tms validate

Environment Variables

Cortex TMS CLI respects these environment variables:

VariableDescriptionDefault
NO_COLORDisable colored outputNot set
CIIndicates CI/CD environmentNot set

Configuration File

The CLI uses .cortexrc in your project root for configuration:

{
"version": "2.6.0",
"scope": "standard",
"projectName": "my-project",
"metadata": {
"createdAt": "2026-01-19T10:00:00.000Z",
"customFiles": []
}
}

This file is automatically created by cortex-tms init and updated by other commands.


Next Steps

Explore individual command documentation: