RFC: CLI (v1)
Status: Draft
Version: v1
Scope: Command-line interface architecture, configuration, and implementation resolution
Non-goals: Execution semantics, protocol definitions, stream behavior
1. Purpose
This RFC defines the XMachines CLI architecture.
The CLI provides:
- a human-facing interface to XMachines capabilities
- configuration and defaults for implementation selection
- an orchestration layer over RFC-defined capabilities
The CLI does not define behavior. It selects and wires implementations.
2. Design Principles
- CLI is optional
- CLI never defines semantics
- CLI resolves implementations explicitly
- Configuration is explicit and persistent
- Alias packages expose commands, implementation packages implement behavior
3. Package Structure
@xmachines/cli- built using oclif
- contains command definitions and shared helpers only
4. Implementation Resolution
Resolution order:
- explicit CLI flags
- persisted configuration
- alias-level defaults (if any)
- error
Implementation identifiers are stored as fully qualified package names.
If no scope is provided, default scope is @xmachines/.
5. Configuration Model
- stored via oclif config
- user-scoped
- persistent across upgrades
Defaults follow a first-writer-wins strategy.
6. Install & Uninstall Hooks
Implementation packages MAY:
- suggest themselves as defaults on install
- respect
if-not-setorquietstrategies - avoid auto-reassignment on uninstall
Uninstall MAY support an explicit purge option to remove config entries.
7. Feature Enablement
Some capabilities expose features (e.g. REST, Git, MCP).
Rules:
- features map to installed packages
- enablement is explicit
- disablement requires explicit flags
8. Scope Boundaries
The CLI:
- wires components
- launches servers
- manages configuration
The CLI does NOT:
- define protocol semantics
- parse stream payloads
- implement execution logic
9. Invariants
- No implicit defaults
- Explicit implementation selection
- CLI never defines semantics
10. Lock statement
The CLI is an orchestration and configuration layer only.
All semantics live in other RFCs.
This is CLI v1.