A CLI tool for composing, managing, and building modular AI assistant instructions using the Unified Module System (UMS) v2.0 TypeScript format.
Status: the CLI is in the middle of a UMS v1 → v2 migration. The commands documented below reflect the currently implemented, TypeScript-first behaviors.
Package name: ums-cli
Binary commands: copilot-instructions, ums
npm install -g ums-cliNote: You can use either copilot-instructions or ums as the binary name. Both execute the same CLI entry point.
Most commands expect module discovery to be configured through a modules.config.yml file (see Configuration).
# Build from persona file
copilot-instructions build --persona ./personas/my-persona.persona.ts
# or: ums build --persona ./personas/my-persona.persona.ts
# Build with custom output
copilot-instructions build --persona ./personas/my-persona.persona.ts --output ./dist/instructions.mdRequirements:
- The persona must be a TypeScript
.persona.tsfile that exports a UMS v2.0Personaobject. - All referenced modules must be discoverable through
modules.config.yml(there is no implicitinstructions-modules/fallback). - Standard input piping is not supported yet; pass
--personaexplicitly.
# List all modules
copilot-instructions list
# Filter by cognitive level
copilot-instructions list --level 0
copilot-instructions list --level 2,3
# Filter by capability
copilot-instructions list --capability testing
copilot-instructions list --capability testing,debugging
# Filter by domain
copilot-instructions list --domain typescript
# Filter by tags
copilot-instructions list --tag best-practices
# Combine multiple filters
copilot-instructions list --level 2 --capability testing --domain typescriptLists modules resolved through modules.config.yml with optional filtering by cognitive level (0-6), capabilities, domain, or tags.
# Search by keyword
copilot-instructions search "react"
# Search with filters
copilot-instructions search "error" --level 2
copilot-instructions search "testing" --capability debugging
copilot-instructions search "async" --domain typescript
# Combine multiple filters
copilot-instructions search "pattern" --level 2,3 --capability architecturePerforms a case-insensitive substring search across module metadata (name, description, semantic, tags) for all modules discovered via modules.config.yml. Supports filtering by cognitive level, capabilities, domain, and tags.
# Validation entry point (prints TypeScript guidance)
copilot-instructions validate
# Verbose mode (adds extra tips)
copilot-instructions validate --verboseAt present the command emits instructions for running tsc --noEmit. Runtime validation for UMS v2.0 modules/personas is on the roadmap.
# Inspect registry summary
copilot-instructions inspect
# Show only conflicts
copilot-instructions inspect --conflicts-only
# Inspect a single module ID
copilot-instructions inspect --module-id foundation/design/user-centric-thinking
# Emit JSON for tooling
copilot-instructions inspect --format jsonProvides visibility into the module registry created from discovery, including conflict diagnostics and source annotations.
The mcp command group wraps developer utilities for the MCP server bundled with this repository:
copilot-instructions mcp start --transport stdio
copilot-instructions mcp test --verbose
copilot-instructions mcp validate-config
copilot-instructions mcp list-toolsThese commands are primarily used when iterating on the MCP server in packages/ums-mcp.
The CLI resolves modules exclusively through modules.config.yml. A minimal example:
conflictStrategy: warn
localModulePaths:
- path: ./instructions-modules-v2
onConflict: replace
- path: ./overrides- Omit
conflictStrategyto default toerror. - Each
localModulePathsentry must point to a directory containing.module.tsfiles. - Paths are resolved relative to the current working directory.
- Standard-library modules are not loaded automatically; include them explicitly if needed.
- ✅ TypeScript-first builds: Render UMS v2.0 personas by composing
.module.tsfiles - ✅ Config-driven discovery: Load modules via
modules.config.ymlwith conflict strategies - ✅ Registry inspection: Diagnose conflicts and sources with
inspect - ✅ MCP tooling: Run and probe the bundled MCP server from the CLI
⚠️ Validation via TypeScript: Usetsc --noEmit; dedicated runtime validation is still on the roadmap
- Standard input builds are not yet supported—always supply
--persona. - Module discovery currently ignores implicit standard libraries; configure every path explicitly.
- Runtime validation for UMS v2.0 modules/personas is pending future iterations.
The CLI expects this directory structure:
your-project/
├── modules.config.yml # Discovery configuration (required)
├── instruct-modules-v2/ # One or more module directories listed in config
│ ├── modules/ # Organized by domain/category
│ │ ├── communication/
│ │ ├── testing/
│ │ ├── typescript/
│ │ └── ...
└── personas/ # Persona TypeScript files
└── my-persona.persona.ts
Modules are organized by domain and category rather than rigid tiers. Use the cognitiveLevel field (0-6) to indicate abstraction level.
This CLI uses the ums-lib library for all UMS operations, ensuring consistency and reusability.
GPL-3.0-or-later