CLI Reference
CLI Reference
Section titled “CLI Reference”Complete command reference for the scs CLI tool.
Installation
Section titled “Installation”From PyPI
Section titled “From PyPI”pip install scs-toolsThis automatically installs scs-validator as a dependency.
From Source
Section titled “From Source”# Clone the repositorygit clone https://github.com/tim-mccrimmon/structured-context-spec.gitcd structured-context-spec/../scs-cli
# Install in development modepip install -e .Commands Overview
Section titled “Commands Overview”The scs command provides five main subcommands:
| Command | Purpose |
|---|---|
scs new | Create new SCS projects from templates |
scs init | Initialize SCS in existing projects |
scs add | Add SCDs and bundles incrementally |
scs bundle | Create and manage bundles |
scs validate | Validate SCDs and bundles |
scs new - Create New Projects
Section titled “scs new - Create New Projects”Scaffold a complete SCS project from templates.
Basic Usage
Section titled “Basic Usage”# Create standard projectscs new project my-project
# Healthcare application (HIPAA, CHAI, TEFCA)scs new project medication-adherence --type healthcare
# Financial services (PCI-DSS, SOX)scs new project banking-app --type fintech
# SaaS product (GDPR, SOC2)scs new project my-saas --type saas
# Government application (NIST, FedRAMP)scs new project gov-portal --type government
# Minimal project (11 essential SCDs)scs new project prototype --type minimal
# Standard project (38 minimum SCDs)scs new project my-app --type standardOptions
Section titled “Options”# Specify output directoryscs new project my-app --dir /path/to/projects
# Add author information
# Interactive mode (prompts for all options)scs new project my-app --interactivescs init - Initialize Existing Projects
Section titled “scs init - Initialize Existing Projects”Add SCS structure to an existing project.
# Initialize in current directoryscs init
# Initialize with specific project typescs init --type healthcare
# Initialize in specific directoryscs init --dir /path/to/existing/projectscs add - Add SCDs and Bundles
Section titled “scs add - Add SCDs and Bundles”Incrementally add SCDs or domain bundles to your project.
# Add a specific SCDscs add scd system-context
# Add a domain bundlescs add bundle security
# Add multiple SCDsscs add scd authn-authz data-protection threat-model
# Add domain bundle with all related SCDsscs add bundle compliance-governance --with-scdsscs bundle - Manage Bundles
Section titled “scs bundle - Manage Bundles”Create and manage SCD bundles.
# Create a bundle from SCDsscs bundle create --name my-bundle --scds context/project/*.yaml
# List all bundlesscs bundle list
# Update a bundlescs bundle update bundles/project-bundle.yaml
# Validate bundle completenessscs bundle check bundles/project-bundle.yamlscs validate - Validate SCDs and Bundles
Section titled “scs validate - Validate SCDs and Bundles”Validate SCS documents against the specification.
Basic Usage
Section titled “Basic Usage”# Validate a single SCD filescs validate context/project/system-context.yaml
# Validate multiple SCD filesscs validate context/project/*.yaml
# Validate a bundlescs validate --bundle bundles/project-bundle.yamlValidation Options
Section titled “Validation Options”# Strict mode (fail on warnings)scs validate --bundle bundles/project-bundle.yaml --strict
# JSON outputscs validate --bundle bundles/project-bundle.yaml --output json
# Skip completeness checksscs validate --bundle bundles/project-bundle.yaml --skip-completeness
# Custom schema directoryscs validate --schema-dir /path/to/schemas context/project/system-context.yaml
# Verbose outputscs validate --bundle bundles/project-bundle.yaml --verbose
# Disable colored outputscs validate --no-color context/project/system-context.yamlOptions Reference
Section titled “Options Reference”| Option | Description |
|---|---|
--bundle | Validate a bundle file instead of individual SCDs |
--schema-dir | Specify custom schema directory |
--output [text|json] | Output format (default: text) |
--strict | Fail on warnings (exit code 2) |
--no-color | Disable colored output |
--verbose | Verbose output |
--skip-completeness | Skip Level 6 completeness validation |
Project Structure
Section titled “Project Structure”A generated SCS project has this structure:
my-project/├── bundles/ # SCS bundles│ ├── project-bundle.yaml # Top-level bundle│ ├── meta-bundle.yaml # Meta vocabulary│ ├── standards-bundle.yaml # Compliance standards│ └── domains/ # Domain bundles│ ├── architecture.yaml│ ├── security.yaml│ ├── performance-reliability.yaml│ └── ... (10 total)├── context/ # SCD files│ └── project/ # Project-tier SCDs│ ├── system-context.yaml│ ├── tech-stack.yaml│ ├── integration-map.yaml│ └── ... (30+ SCDs)├── docs/│ └── GETTING_STARTED.md├── .scs/│ └── config├── .gitignore├── README.md└── VERSIONDomain Bundles
Section titled “Domain Bundles”Projects include 10 domain bundles covering:
- Architecture: System design, tech stack, integrations, components
- Security: Authentication, data protection, threat model
- Performance & Reliability: Response time, availability, fault tolerance, scalability
- Usability & Accessibility: UX principles, accessibility compliance, error handling
- Compliance & Governance: Regulatory requirements (HIPAA, SOC2, etc.)
- Data & Provenance: Data model, lineage tracking, retention policies
- Testing & Validation: Test coverage, validation plans, QA procedures
- Deployment & Operations: Infrastructure, observability, incident response
- Safety & Risk: Risk assessment, safety checklists
- Ethics & AI Accountability: AI usage policy, audit trails, bias mitigation
Getting Help
Section titled “Getting Help”Get help for any command:
scs --helpscs new --helpscs init --helpscs add --helpscs bundle --helpscs validate --help