okami.mom/albedo
git clone https://git.nkp.pet/okami.mom/albedo
9c81489
main
name: tg description: Use the tg CLI for Tangled tasks, including repositories, issues, pull requests, and CI.
tg
Use tg for Tangled operations. Consult tg <command> --help for other flags. Prefer boolean --json for structured results.
Replace the example repository with the task's target. Replace <key> with an issue or PR record key, the final segment of its at:// URI.
Find and clone a repository
Search, inspect, or clone with these commands:
tg repo search'project' --json tg repo view alice.example.com/project--json tg repo clone alice.example.com/projectcd project
Run the following recipes inside the checkout. tg detects the repository from Git remotes, checking origin first.
Authenticate for writes
If the account is uncertain, check tg auth status --json. If login is needed, run tg auth login <handle>. Select an existing login per command with --account <handle-or-did>.
Read and file issues
List open issues, then inspect a returned key:
tg issue list--state open--json tg issue view< key> --json
To file an issue or comment on one, supply the text explicitly:
tg issue create'Clone fails' --body 'Steps to reproduce...' --json tg issue comment< key> --body'Reproduced on Linux.' --json
For multiline create or comment bodies, use --body-file <path>. Pass a real file path. --body-file - reads a file named -.
Review and submit pull requests
Find a PR and inspect its patch:
tg pr list--state open--json tg pr view< key> --jsontg pr diff< key>
To submit local commits, write the description to body.md, then create the PR:
tg pr create--title 'Fix clone failure' --body-file body.md--json
tg uploads a patch of committed changes. For forks, set --repo to the target and --source-repo to the fork. Fetch the target branch, then pass that remote-tracking branch as --base.
To submit revised commits, run tg pr update <key>. It appends a patch round from the PR's recorded source branch. For forks, pass --base again.
Issue edits, PR edits, and PR updates address the selected account's records and do not accept --repo. For edits, use --title or --body.
Inspect CI
Find the pipeline for the intended commit, then inspect its status or logs:
tg pipeline list--json tg pipeline view< id> --jsontg pipeline logs< id> --json
Parse logs as one JSON event per line. Without an ID, logs select the default branch's latest pipeline. Use tg pipeline status --json for that pipeline. Failed or timed-out workflows produce output and an unsuccessful exit.
If a write loses its connection, inspect remote state before retrying. The server may have accepted the request.
1--- 2name : tg 3description : Use the tg CLI for Tangled tasks, including repositories, issues, pull requests, and CI. 4--- 5 6# tg 7 8Use `tg` for Tangled operations. Consult `tg <command> --help` for other flags. Prefer boolean `--json` for structured results. 9 10Replace the example repository with the task's target. Replace `<key>` with an issue or PR record key, the final segment of its `at://` URI. 11 12## Find and clone a repository 13 14Search, inspect, or clone with these commands: 15 16``` bash 17tg repo search 'project' --json 18tg repo view alice.example.com/project --json 19tg repo clone alice.example.com/project 20cd project 21``` 22 23Run the following recipes inside the checkout. tg detects the repository from Git remotes, checking `origin` first. 24 25## Authenticate for writes 26 27If the account is uncertain, check `tg auth status --json`. If login is needed, run `tg auth login <handle>`. Select an existing login per command with `--account <handle-or-did>`. 28 29## Read and file issues 30 31List open issues, then inspect a returned key: 32 33``` bash 34tg issue list --state open --json 35tg issue view < key > --json 36``` 37 38To file an issue or comment on one, supply the text explicitly: 39 40``` bash 41tg issue create 'Clone fails' --body 'Steps to reproduce...' --json 42tg issue comment < key > --body 'Reproduced on Linux.' --json 43``` 44 45For multiline create or comment bodies, use `--body-file <path>`. Pass a real file path. `--body-file -` reads a file named `-`. 46 47## Review and submit pull requests 48 49Find a PR and inspect its patch: 50 51``` bash 52tg pr list --state open --json 53tg pr view < key > --json 54tg pr diff < key > 55``` 56 57To submit local commits, write the description to `body.md`, then create the PR: 58 59``` bash 60tg pr create --title 'Fix clone failure' --body-file body.md --json 61``` 62 63tg uploads a patch of committed changes. For forks, set `--repo` to the target and `--source-repo` to the fork. Fetch the target branch, then pass that remote-tracking branch as `--base`. 64 65To submit revised commits, run `tg pr update <key>`. It appends a patch round from the PR's recorded source branch. For forks, pass `--base` again. 66 67Issue edits, PR edits, and PR updates address the selected account's records and do not accept `--repo`. For edits, use `--title` or `--body`. 68 69## Inspect CI 70 71Find the pipeline for the intended commit, then inspect its status or logs: 72 73``` bash 74tg pipeline list --json 75tg pipeline view < id > --json 76tg pipeline logs < id > --json 77``` 78 79Parse logs as one JSON event per line. Without an ID, logs select the default branch's latest pipeline. Use `tg pipeline status --json` for that pipeline. Failed or timed-out workflows produce output and an unsuccessful exit. 80 81If a write loses its connection, inspect remote state before retrying. The server may have accepted the request.