feat(cli): implement full CLI interface and symlink resolution #99
No reviewers
Labels
No labels
Compat/Breaking
Kind/Bug
Kind/Documentation
Kind/Enhancement
Kind/Feature
Kind/Security
Kind/Testing
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Reviewed
Confirmed
Reviewed
Duplicate
Reviewed
Invalid
Reviewed
Won't Fix
Status
Abandoned
Status
Blocked
Status
Need More Info
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
thwap/kronai!99
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/0040-implement-cli-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implement the
kronaiCLI with list/run/interval commands, and symlink resolution for job lookup by name.Why
Users can now interact with kronai via the command line — list jobs, run by ID or name, and execute intervals.
Testing
Breaking Changes
None.
Notes
kronai listshows all jobs with IDs, names (fromnamefile or dir name), intervals, types, and symlinks.kronai run <id|symlink>resolves by either.kronai hourly|daily|weekly|monthlyruns all jobs in an interval.Closes #0031
Closes #0032
Closes #0033
Closes #0034
Closes #0035
Closes #0036
Closes #0037
Closes #0038
Closes #0039
Closes #0040
Closes #0041
Closes #0042
Closes #0043
Closes #0044
Automated Review — PR #99
Result: APPROVED
Completes Phase 3 — full CLI with
list,run <id|name>, and<interval>shorthand, plus symlink resolution and job name support.find_jobresolves by numeric ID first, then falls back to symlink name search.find_job_symlinkscorrectly discovers symlinks pointing to a job and ignores broken ones.T201suppressed appropriately for CLI prints.sys.exit(1)on job not found, run failure, and partial interval failure. Broken symlinks silently ignored infind_job_symlinks._cmd_list,_cmd_run,_cmd_interval. Discovery helpers are well-factored.Suggestions (non-blocking)
src/kronai/discovery.py:155-170—find_job()callsdiscover_jobs(jobs_dir)then manually re-iterates the filesystem for symlink search. It could reuse the already-discovered job paths for the symlink search instead of re-scanning, avoiding redundant I/O.src/kronai/cli.py:56-60—_cmd_list()readsget_job_name(job)which re-reads thenamefile from disk each time. For large job lists, consider caching names or collecting them in bulk. Minor.src/kronai/cli.py:81-83—_cmd_interval()prints "No jobs found" but still returns exit code 0._cmd_run()exits 1 on not-found. Consider consistent behavior (exit 1 on "nothing to do" is debatable either way).