Skip to content
Source
Sign inSign up

Install and log in

CLI and APIs

Install src and log in

You want the forge in your terminal: issues, pull requests, reviews and merges, with the gh commands that you know. Install src, log in once, and let git use the same login.

3 min read

You need Node.js 22 or later.

1. Install src

On macOS, Linux, or Git Bash on Windows:

curl -fsSL https://gitflare.t-zlak97.workers.dev/install | sh

In Windows PowerShell:

irm https://gitflare.t-zlak97.workers.dev/install.ps1 | iex

Then open a new terminal.

  • The script installs src in ~/.source/bin, or in %LOCALAPPDATA%\TanStackSource\bin on Windows.
  • On macOS and Linux, the script adds that folder to the PATH of each shell that you have: zsh (~/.zshrc), bash (~/.bashrc) and fish (~/.config/fish/config.fish).
  • The script prints each file that it changed. If it finds none of these shells, it tells you to add the folder yourself.

Note

In a terminal, the script then shows the changes of src agent setup. It asks before it gives your coding agents the TanStack Source skill and the instructions to use src. See Set up your coding agent.

2. Log in

src auth login
  1. src prints a one-time code. Press Enter to open the browser.
  2. Type the code, click Continue, then click Approve.

Tip

An agent without a terminal of its own uses src auth login --web. It prints the code and the URL.

3. Let git use the same login

src auth setup-git
src auth status

Now git clone, git pull and git push to the forge use your login. src auth status shows who you are.

4. Use your gh habits

src takes the commands of gh, so you can type gh. Add an alias.

In bash or zsh:

alias gh=src

In PowerShell:

Set-Alias gh src

To keep the alias, add the same line to ~/.bashrc, ~/.zshrc or your PowerShell $PROFILE.

Note

While the alias is on, gh runs src also in GitHub repositories. To run the real gh, type command gh in bash or zsh, or gh.exe in PowerShell.

To copy your gh aliases into src, see Bring your gh aliases.

Done

In a clone of a repository on the forge, run:

src pr list
src issue list

You see the pull requests and the issues of the repository. src help support lists each command and flag that works now.

Tip

To update src later, run src update. If your coding agents have the TanStack Source skill, it updates the skill too. Before it adds something new to your agents, it asks. See Later: update or remove.

Next: keep your private files out of git, and get them back in each new clone. Or find the command for your task.