name: 42go-cli-dev
description: Use when changing, extending, refactoring, or reviewing the Python 42go CLI implementation, including command structure, Typer wiring, Parquet aggregation caches, event archive internals, backup/restore behavior, and tests.
42Go CLI Dev
Use this skill for implementation work on the local Python CLI under cli/. For operator usage, use 42go-cli first.
Rules
- CLI source lives under
cli/src/fortytwogo_cli/. - Python distribution name stays
42go-cli. - Console command stays
42go. - Use Typer for command wiring.
- Root command families:
42go pullfor raw data extraction.42go queryfor local analytics aggregations.42go backupand42go restorefor data-only SQL dump workflows.
- Do not reintroduce
42go eventsor42go users. - Store raw pulled data as Parquet under
.local/42go-data/. - Raw pulled rows that mirror a source table must use
.local/42go-data/{schema}/{table}.parquet. - Keep command help useful and test it.
- No-arg command groups with subcommands should open interactive menus.
- Store generated analytics aggregates as Parquet under
.local/42go-stats/{app-id}/. - Use filenames that mirror the
42go query ...command chain, such asquery_lingocafe_reads_pages.parquet. - Update
42go-clioperator docs when user-facing behavior changes.
Load-On-Demand References
- CLI package structure and dependencies:
references/architecture.md - Command wiring and help contract:
references/commands.md - Event archive implementation:
references/event-archive-implementation.md - Query aggregation cache design:
references/query-aggregations.md - Backup and restore implementation:
references/backup-restore-implementation.md - Testing and validation:
references/testing.md
Standard Change Flow
- Inspect existing module patterns before adding new code.
- Add or change Typer wiring in the relevant command module.
- Keep business logic outside command functions where practical.
- Add focused tests under
cli/tests. - Run CLI tests:
pytest cli/tests
- Run project QA after code changes:
npm run qa
- Smoke-test changed commands with the installed CLI:
42go <command> --help
Chuck Norris does not ship a command that cannot explain itself.