Commit be417a6
committed
feat: add cobra Example fields to all 115+ CLI commands
Every `ctx <command> --help` now shows practical usage examples.
Expanded examples.yaml from 5 add-subtype entries to 136 keys,
wired desc.Example() into all cmd.go files and parent.Cmd(),
and added drift-prevention comments to YAML asset files.
Changes:
- examples.yaml: 136 command-keyed entries, add-subtypes
namespaced under "add." prefix
- parent.Cmd(): auto-loads Example from desc key
- 115 cmd.go files + bootstrap root: Example field wired
- ForType(): uses ExampleKeyPrefixAdd constant
- TestExamplesYAMLLinkage: validates against desc key constants
- commands.yaml, flags.yaml: update reminder comments
Spec: specs/cli-examples.md
Signed-off-by: Jose Alekhinne <jose@ctx.ist>1 parent 033d7e8 commit be417a6
123 files changed
Lines changed: 1184 additions & 391 deletions
File tree
- .context
- internal
- assets/commands
- audit
- bootstrap
- cli
- add
- cmd/root
- core/example
- agent/cmd/root
- change/cmd/root
- compact/cmd/root
- config/cmd
- schema
- status
- switchcmd
- decision/cmd/reindex
- dep/cmd/root
- doctor/cmd/root
- drift/cmd/root
- guide/cmd/root
- initialize/cmd/root
- journal/cmd
- importer
- lock
- obsidian
- site
- source
- sync
- unlock
- learning/cmd/reindex
- load/cmd/root
- loop/cmd/root
- mcp
- memory/cmd
- diff
- importer
- publish
- status
- sync
- unpublish
- notify/cmd
- setup
- test
- pad/cmd
- add
- edit
- export
- merge
- mv
- resolve
- rm
- root
- show
- parent
- pause/cmd/root
- permission/cmd
- restore
- snapshot
- reindex/cmd/root
- remind/cmd
- add
- dismiss
- list
- resume/cmd/root
- serve/cmd/root
- setup/cmd/root
- site/cmd/feed
- skill/cmd
- install
- list
- remove
- status/cmd/root
- steering/cmd
- add
- initcmd
- list
- preview
- synccmd
- sync/cmd/root
- system/cmd
- backup
- block_dangerous_command
- block_non_path_ctx
- bootstrap
- check_backup_age
- check_ceremony
- check_context_size
- check_freshness
- check_journal
- check_knowledge
- check_map_staleness
- check_memory_drift
- check_persistence
- check_reminder
- check_resources
- check_skill_discovery
- check_task_completion
- check_version
- context_load_gate
- events
- heartbeat
- mark_journal
- mark_wrapped_up
- message/cmd
- edit
- list
- reset
- show
- pause
- post_commit
- prune
- qa_reminder
- resources
- resume
- session_event
- specs_nudge
- stats
- task/cmd
- archive
- complete
- snapshot
- trace/cmd
- collect
- file
- hook
- show
- tag
- trigger/cmd
- add
- disable
- enable
- list
- test
- watch/cmd/root
- why/cmd/root
- config/embed/cmd
- specs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
80 | 86 | | |
81 | 87 | | |
82 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
4 | 10 | | |
5 | 11 | | |
6 | 12 | | |
| |||
0 commit comments