lmgh
lmgh is a native lmcode host that turns the GitHub CLI (gh) into a type-checked API for repositories, issues, pull requests, workflow runs, and reviews.
Quick reference
lmscript install github:lmctl-ai/lmgh@v0.3.2
lmgh --version
lmgh --lmcode-schema --json
lmgh --lmcode-signatures
lmscript examples/open-prs.lms lmctl-ai lmgh
| Item | Kind | Purpose |
|---|---|---|
| --lmcode FILE | CLI flag | Execute compiled lmcode bytecode against the gh CLI (repeatable). |
| gh.repo_view / pr_list / pr_triage | Host methods | Inspect repository metadata, open pull requests, and CI/review triage status. |
| gh.run_list / run_failed_log | Host methods | List GitHub Actions runs and extract failed-job logs. |
| gh.pr_prepare / pr_submit | Host methods | Two-step human-reviewed TOML pull-request creation workflow. |
| gh.pr_review_prepare / pr_review_submit | Host methods | Two-step human-reviewed TOML pull-request review workflow. |
| report.add / write_json / fail_if_any | Report context | Record audit findings, export reports, and gate CI with exit code 4. |
p = _lmcode_ cli="lmgh" install="github:lmctl-ai/lmgh@v0.3.2";
let prs = gh.pr_list("lmctl-ai", "lmgh", "open", 10);
for (i in range(0, prs.len())) {
let pr = prs.at(i);
print("#" + str(pr.number()) + ": " + pr.title());
}
end _lmcode_
r = run_lmcode(p);
assert(r.ok);