Skip to content
Source
Sign inSign up

Use the src CLI

CLI and APIs

Use the src CLI

You work in a terminal, and you want the forge there too, with the gh commands that you know. src is the CLI of TanStack Source: it takes the commands and flags of gh, and adds commands for the features that only TanStack Source has.

3 min read

Start here

Install src and log in. You install src with one command, log in once, and git uses the same login.

Find a command

Later

What every command shares

  • 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.
  • Most list and view commands have --json, for a script or an agent.
  • src help support lists each command and flag, and tells you whether it works now.

If a command fails

src prints why, and what to do next. For example:

You seeDo this
... Run src auth login.Your login stopped working. Run src auth login.
... Use a token that allows it: run src auth login, or src token create.The token cannot do this. Log in again, or make a token with the action.
... Try again in 30 seconds.You sent too many requests. Wait for the time in the message.
The forge had an error (HTTP 500). Try again in a moment. If it keeps failing, report it with the request id <id>.Try again. If it fails again, report the request id.
Could not reach source.tanstack.com: the host name was not found (ENOTFOUND). Check your connection, or the host name with src auth status.Check your network, and the host in src auth status.

If the browser login stops with The code expired before you approved it in the browser. or You denied the request in the browser., run src auth login again.