feat: OPE46-00031: QoL: Add config management commands - #14
Open
andrei-hasna wants to merge 1 commit into
Open
Conversation
OPE46-00031: QoL: Add config management commands Add config management: `monitor config edit`, `monitor config validate`, `monitor config backup`, `monitor config restore` MEASURED on origin/main: there is NO top-level `config` command in src/cli/index.ts. Config loading/writing already lives in src/config.ts. Add `monitor config edit` (open $EDITOR on the config path), `monitor config validate` (schema-check, non-zero exit on invalid), `monitor config backup` and `monitor config restore` (timestamped copies next to the config file). EXECUTION NOTES (added 2026-07-29 for autonomous execution) Repo: github.com/hasna/monitor. CLI commands are registered in src/cli/index.ts (Commander). Verified against origin/main that this surface does NOT already exist. Requirements: implement in src/ (not docs); keep existing output shapes and the -j/--json contract intact; reuse the existing helpers in that file (parseLimitOption, parseCursorOption, chalk formatting) rather than inventing new patterns. Acceptance: `bun run typecheck`, `bun run build` and `bun test` are all green, and a new/extended test under src/ exercises the new behaviour (assert on the command's JSON output and/or exit code, not on colored text). No network, no live remote machines, no credentials — tests must run offline against local collectors/fixtures. X-Factory-Run: run_eaf46d73a19c X-Factory-Task: 48df279c-6c90-44fa-8abc-f640e11ef1b4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objective
OPE46-00031: QoL: Add config management commands
Add config management:
monitor config edit,monitor config validate,monitor config backup,monitor config restoreMEASURED on origin/main: there is NO top-level
configcommand in src/cli/index.ts. Config loading/writing already lives in src/config.ts. Addmonitor config edit(open $EDITOR on the config path),monitor config validate(schema-check, non-zero exit on invalid),monitor config backupandmonitor config restore(timestamped copies next to the config file).EXECUTION NOTES (added 2026-07-29 for autonomous execution)
Repo: github.com/hasna/monitor. CLI commands are registered in src/cli/index.ts (Commander). Verified against origin/main that this surface does NOT already exist.
Requirements: implement in src/ (not docs); keep existing output shapes and the -j/--json contract intact; reuse the existing helpers in that file (parseLimitOption, parseCursorOption, chalk formatting) rather than inventing new patterns.
Acceptance:
bun run typecheck,bun run buildandbun testare all green, and a new/extended test under src/ exercises the new behaviour (assert on the command's JSON output and/or exit code, not on colored text). No network, no live remote machines, no credentials — tests must run offline against local collectors/fixtures.Verification
Run
run_eaf46d73a19c· backendcodewith· task48df279c-6c90-44fa-8abc-f640e11ef1b4🏭 Generated by @hasnaxyz/factory
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.