Skip to content

feat(cli): add --json to slm runs list - #17

Merged
sandeeps85 merged 1 commit into
m87techlabs:mainfrom
kukirin-ui:feat/13-runs-list-json
Oct 15, 2026
Merged

sandeeps85 merged 1 commit into
m87techlabs:mainfrom
kukirin-ui:feat/13-runs-list-json

Conversation

@kukirin-ui

Copy link
Copy Markdown
Contributor

Adds a --json flag to slm runs list. It prints only a JSON array, one object per run with the run ID and everything from its status.json, so uv run slm runs list --json | python3 -m json.tool works. It goes through the same --project filter as the table, and an empty result is just [].

Tests in tests/unit/test_runs.py parse the output with json.loads, check both runs are there and that --project filters. Also added a CHANGELOG line under Unreleased.

ruff check/format are clean and the new tests pass. Locally the only failures in make test are the abc_music grader tests, which need abc2midi installed.

Closes #13

@sandeeps85 sandeeps85 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kukirin-ui, and thanks for asking on #13 first and laying out your plan. That's exactly how we'd like issues picked up. Sorry nobody answered you in time; that's on us.

What I checked

  • make lint, and make test with abc2midi installed: everything passes, including your three tests. The grader failures you saw were only the missing tool.
  • On real runs: slm runs list --json --project shakespeare_char gives the 3 reference runs, each with its full status.json fields, and | python3 -m json.tool works.
  • Setting run_id from the directory name is a nice touch. Current runs already write it into status.json, but this way the output never depends on that.

I'll add the --json example to the command list in CONTRIBUTING.md on our side. Approving; merging once CI is green.

@sandeeps85
sandeeps85 merged commit 8dcc1e0 into m87techlabs:main Oct 15, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

slm runs list --json for scripts

2 participants