CLI and APIs
Use the gh commands that you know
You know gh, and you want to do the same work on the forge. These gh commands work in src with the flags of gh: find your task, then type the command.
6 min read
Without -R, a command acts on the repository of your clone. Without a terminal, src never asks a question, so the commands that delete, archive or rename need --yes.
Issues and pull requests
| You want to | Command |
|---|---|
| See what needs you, new comments on your items, and what the people you follow did | src status, src issue status, src pr status. See Catch up on your home page |
| Edit your newest comment | src issue comment 12 --edit-last --body "Fixed in 1.2.0.", src pr comment 7 --edit-last -F note.md |
| Lock, pin or delete an issue | src issue lock 12 --reason spam, src issue pin 12, src issue delete 12 --yes |
| Move an issue, or make a branch for it | src issue transfer 12 acme/docs, src issue develop 12 --checkout |
| Mark a draft ready, or make it a draft again | src pr ready 7, src pr ready 7 --undo |
| Revert a merged pull request, or bring the base branch into one | src pr revert 7, src pr update-branch 7 --rebase |
| Lock the conversation of a pull request | src pr lock 7, src pr unlock 7 |
- A lock reason is
off_topic,resolved,spamortoo_heated. --edit-lastedits your newest comment in the conversation, not a review or a line comment.- If you have no comment there,
--edit-lastfails withno comments found for current user.
Read the Community tab
src discussion list and src discussion view have the shape of gh, for the Community tab of a repository. They only read: people post, vote and answer on the web.
| You want to | Command |
|---|---|
| List the feature requests, with the most votes first | src discussion list |
| List the shipped feature requests | src discussion list --state shipped |
| List the questions with no accepted answer | src discussion list -c question --filter unanswered |
| Read one post, with its replies | src discussion view 12 |
See the roadmap (gh has no roadmap command) | src roadmap view |
-cisrequest(the default) orquestion.--sortistop,neworactivefor feature requests, andneworactivefor questions.--filteris for questions only:unanswered,answeredorall(the default).- Add
--json <fields>to get JSON, for a script or an agent.
Repositories
| You want to | Command |
|---|---|
Pick the repository that src uses in this clone | src repo set-default acme/app |
| Update a fork from its parent, or your clone from its remote | src repo sync acme-fork/app, src repo sync |
Push when git push fails with HTTP 413: the same push, sent in parts | src repo push origin main. See Push a large repository |
Run git pull, then write the vault files and the MCP config | src pull, src pull -- --rebase |
| Rename, archive or delete a repository | src repo rename app2 --yes, src repo archive --yes, src repo delete acme/old --yes |
Link text like JIRA-123 to another tool | src repo autolink create JIRA- "https://jira.example.com/browse/JIRA-<num>" |
| Find a gitignore or license template | src repo gitignore list, src repo license list |
| Make a repository with topics | src repo create acme/api --public --topic api --topic cli |
| Say what you know, or find who knows a part of the code | src expert set --about "the CI images" --path 'ci/**', src expert list |
| Read the rules and the errors of the CODEOWNERS file | src codeowners list, src codeowners errors |
| Copy labels, find repositories, list your organizations | src label clone acme/app, src search repos cli --owner acme, src org list |
CI from the terminal
The run, workflow, cache, secret and variable commands of gh work on the CI of the forge.
| You want to | Command |
|---|---|
| See the runs, and watch one until it ends | src run list, src run watch <run> |
| Watch the checks of a pull request until they end | src pr checks 7 --watch |
| Read the log of the failed steps | src run view <run> --log-failed |
| Start a workflow, or turn one off | src workflow run deploy.ts -f env=preview, src workflow disable nightly.ts |
| Set a secret or a variable | src secret set NPM_TOKEN --host registry.npmjs.org < token.txt, src variable set REGION --body eu-west |
| Give a task to an agent | src agent-task create "Fix the flaky login test" -a <agent> |
src run watchandsrc pr checks --watchfollow the live event stream of the forge, and draw the table again at each change of the run or the checks. On a forge that has no event stream, they read again every--intervalseconds.- To follow the log of one job while it runs, use
src watch job <job> --run <run> --log. See Wait for CI, merges and pushes with src. - A workflow is its file name, like
nightly.ts, or its name. src agent-task createneeds-a, because the forge has no default agent.- The CI reference has every flag. CI variables shows how a job reads a variable.
Skills
src skill has the install, list, preview, publish, search and update commands of gh skill, for skills on the forge:
src skill search "write e2e tests"
src skill install acme/changelog
src skill update --all
It also has commands that gh does not have, such as add-to-repo, update-in-repo, create, share and suggest. See Add a skill to your agents and Add skills to a repository.
gh commands that src does not have
These gh commands will not come to src. When you run one, src prints the reason and exits with 1.
| gh command | Why |
|---|---|
codespace | TanStack Source has no codespaces or other hosted dev environments. |
extension | src has no extension system, so it does not install or run gh extensions. |
copilot | TanStack Source does not have GitHub Copilot. |
attestation | TanStack Source does not make build provenance attestations. |
ssh-key, repo deploy-key | git on TanStack Source takes tokens only, and the forge serves no SSH. |
gpg-key | TanStack Source does not check commit signatures, so an account has no GPG keys. |
Other gh commands, such as release and gist, are not supported yet. src help support lists each command and flag, and tells you whether it works now. The support page has the same list.
For the features that gh has no command for, see Use the commands that gh does not have. To wait for CI, a merge or a push in a script or an agent, see Wait for CI, merges and pushes with src.