Instruction file imported from nirholas/xspace-AI (
.github/instructions/cli.instructions.md). Copyright stays with the author.
CLI Package (packages/cli/)
Published as @xspace/cli. See packages/cli/CLAUDE.md for the module map.
Commands
init— Setup wizard → writesxspace.config.json(chmod 600)auth— Save X credentials to.envjoin <url>— Join an X Space with provider flagsstart— Start server with admin paneldashboard— Standalone dashboard server
Patterns
- Config precedence: CLI flags > config file > env vars > defaults
- Config validation: Zod schemas in
src/config.ts - Interactive prompts: Inquirer in
src/prompts.ts - Logging: Colored console with verbose/quiet modes in
src/logger.ts - Path resolution: Walks up from
__dirnamelooking for.gitinsrc/paths.ts
Rules
- New commands go in
src/commands/using Commander.js - Config files must be written with restrictive permissions (chmod 600) when containing credentials