Skip to content

Add superml CLI: low-token terminal commands with automatic experiment journaling#1

Open
BlackhatShiftey wants to merge 3 commits into
Leeroo-AI:mainfrom
BlackhatShiftey:main
Open

Add superml CLI: low-token terminal commands with automatic experiment journaling#1
BlackhatShiftey wants to merge 3 commits into
Leeroo-AI:mainfrom
BlackhatShiftey:main

Conversation

@BlackhatShiftey
Copy link
Copy Markdown

Summary

Adds cli/ — a standalone bash CLI that runs the same ML engineering workflows as direct terminal commands, without plugin session overhead or leeroopedia auth.

  • No leeroopedia key required — uses Claude Code OAuth (existing claude.ai subscription)
  • ~5-10x fewer tokens per call — compact ~300-token skill prompts vs full SKILL.md injection
  • Automatic experiment journaling — every call is logged to experiments/journal.md at the bash level, no invocation needed
  • Automatic context injection — reads MEMORY.md, experiments/lessons.md, and recent journal entries before every call
  • --ground flag — fetches official docs via WebFetch before responding (same URL registry as the plugin's web mode)
  • --no-log flag — skip journaling for throwaway queries

Usage

cd cli && bash install.sh

superml plan "fine-tune Llama 3.1 8B with QLoRA on 1xA100"
superml debug "CUDA OOM during forward pass, batch_size=8"
superml research --ground "how does vLLM chunked prefill work"
superml verify "$(cat train_config.yaml)"
superml iterate "tried rank-8 LoRA, loss 0.35, not converging"
superml experiment "compare LoRA rank 8 vs 16 on MMLU 5-shot"

Relation to the plugin

The CLI and plugin are complementary. The plugin's KB mode (with a leeroopedia key) gives richer grounded responses. The CLI is the faster path when you want a quick answer, are iterating rapidly, or don't have a key. The --ground flag closes most of the gap using WebFetch from official docs.

Files added

cli/
  superml        # main bash script
  install.sh     # links to ~/.local/bin/superml
  settings.json  # disables plugins for clean sessions
  grounding.md   # URL registry for --ground mode
  skills/
    plan.md
    debug.md
    research.md
    verify.md
    iterate.md
    experiment.md
  README.md

Adds cli/ — a standalone bash CLI that runs the same ML engineering
workflows (plan, debug, research, verify, iterate, experiment) as
direct terminal commands without the plugin session overhead.

- Uses claude -p --system-prompt with compact ~300-token prompts
  instead of injecting the full SKILL.md via session-start hooks
- No leeroopedia auth required; uses Claude Code OAuth (existing
  claude.ai subscription)
- ~5-10x fewer tokens per call vs plugin mode
- Defaults to haiku, overridable with --model or SUPERML_MODEL

Install: cd cli && bash install.sh
When --ground is passed, the CLI fetches 2-3 official doc pages for
the frameworks in the task before writing any content. Cites exact
API names, config keys, and version-specific behavior from fetched
pages inline as [Label](URL).

URL registry covers: Transformers, PEFT, TRL, Axolotl, vLLM, TGI,
SGLang, DeepSpeed, FSDP, LangChain, LangGraph, lm-eval-harness.

Usage: superml plan --ground "...", superml debug -g "..."
Every call now automatically:
- Reads MEMORY.md, experiments/lessons.md, experiments/journal.md
  (last 150 lines) and injects them into context before responding
- Captures output and appends a timestamped entry to
  experiments/journal.md after each successful call

This happens at the bash level for every skill, every call — no
invocation or instruction required. Use --no-log to skip journaling
for one-off queries.
@alirezamshi
Copy link
Copy Markdown
Contributor

Perfect, I'll run checks and come back to you!

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.

2 participants