| name | github |
| description | Git commits, pushes, and GitHub operations using tokenlean. Covers tl push (with multi-file safety guard), tl commit-prep, tl gh (bulk issue/PR/release operations). Use when committing, pushing, creating/closing/viewing issues, managing PRs, creating releases, or any git/GitHub workflow. |
| compatibility | Codex CLI with terminal access, git, gh CLI, tokenlean CLI (npm i -g tokenlean) |
GitHub & Git Operations (Codex)
Token-efficient git and GitHub workflows via tl push, tl commit-prep, and tl gh.
Committing & Pushing
tl push
Stages, commits, and pushes in one call.
Critical: multi-file safety guard. When multiple files are modified and no explicit files are given, tl push refuses to proceed — prints the modified file list and exits 1. You must specify which files to include.
tl push "feat: add caching"
tl push "fix: resolve race" src/worker.mjs src/queue.mjs
tl push "feat: new tool" bin/tl-new.mjs -A
tl push "wip: checkpoint" src/foo.mjs --no-push
tl push "test" --dry-run
tl commit-prep
Pre-commit context: git status + diff stat + recent log. Use before tl push to decide which files to include.
tl commit-prep
tl push "fix: typo" README.md
GitHub Operations — tl gh
Wraps multi-step GitHub API calls into single commands. Always pass -R owner/repo.
Issue commands
tl gh issue read -R owner/repo 434
tl gh issue read -R owner/repo 434 --no-body
echo '[{"title":"A"},{"title":"B"}]' | tl gh issue create-batch -R owner/repo
tl gh issue add-sub -R owner/repo --parent 10 42 43
tl gh issue close -R owner/repo 1 2 3 -c "Done"
tl gh issue label-batch -R owner/repo --add "bug" 1 2 3
PR commands
tl gh pr digest -R owner/repo 123
tl gh pr comments -R owner/repo 123 --unresolved
tl gh pr land -R owner/repo 123
Release commands
tl gh release notes -R owner/repo --tag v1.2.0
When to use which
- Issue read with sub-issues or issue close with comment:
tl gh issue read / tl gh issue close
- Bulk operations:
tl gh (create-batch, close, label-batch)
- Full PR readiness check:
tl gh pr digest
- Merge + cleanup:
tl gh pr land
Tips
- Always use
tl push instead of raw git sequences
- Run
tl commit-prep first when unsure what changed
- Use
--dry-run on tl push and tl gh pr land to preview safely