Skip to content
Source
Sign inSign up

Use commands gh does not have

CLI and APIs

Use the commands that gh does not have

Some features of the forge have no gh command, and you want them in your terminal too. src has commands for your profile, MCP servers, apps, monorepos, assignees, shares of private pull requests, artifacts, architecture and impact, the software factory, and to wait for changes.

11 min read

Without -R, a command acts on the repository of your clone.

Wait for changes

src watch follows the live event stream of the forge, and prints each change as one JSON line. It replaces a poll loop in a script or an agent.

You want toCommand
Wait until the checks of a pull request are donesrc watch checks 7 --exit-status
Wait until a CI run completessrc watch run <run> --exit-status
Follow the log of a CI job until it completessrc watch job <job> --run <run> --log
Wait for a push to a branchsrc watch --events push --branch main
Follow a pull request: its changes, checks and pushessrc watch pr 7

See Wait for CI, merges and pushes with src for the events, the flags and the exit codes.

Your profile

Use your own token: an agent token cannot change a profile.

You want toCommand
Change your profile fields, like your timezonesrc profile edit --timezone Europe/Berlin
Change your imagesrc profile set-image avatar.png
Read the README of your profilesrc profile readme view
Write the README of your profilesrc profile readme set --file README.md

Add --org <org> to act on an organization. Your profile and image has the details.

Agent memories

src memory reads and saves the agent memories of a repository: the notes that the agents of a team share, outside git.

You want toCommand
List the memories, newest firstsrc memory list, or --type feedback
Read one memorysrc memory view merge-window
Save a memory, or a new version of itsrc memory save merge-window --type feedback --description "<one line>" --body-file notes.md
Save a memory file with front matter, such as one of Claude Codesrc memory save --file merge-window.md
List the versions of a memory, and make an older one currentsrc memory versions merge-window, src memory restore merge-window 2
Delete a memory with all its versionssrc memory delete merge-window --yes
See or change who reads the memories (admins change it)src memory readers, src memory readers read

MCP servers

src mcp connects remote MCP servers to the factory agents of a repository, and writes them into the config of your local agents. With --org <name>, the connection commands act on an organization.

You want toCommand
List the servers of the repositorysrc mcp list
Connect a server with a header tokensrc mcp connect linear --url <url> --header Authorization < key.txt
Pick the agents and the tools of a serversrc mcp tools linear --agent triage --enable list_issues
List the tools of a server againsrc mcp tools linear --refresh
Delete a server and its credentialsrc mcp disconnect linear
Write the servers into .mcp.json and the other agent filessrc mcp pull
Find, view or publish a server in the marketplacesrc mcp server search, src mcp server view, src mcp server create
  • connect reads the header values from standard input, one line for each --header, in order. A value never goes into your shell history.
  • In the example, key.txt holds the full value, for example Bearer lin_api_....
  • A server that signs in with OAuth needs a browser. For such a listing, connect prints the web page that connects it.
  • See Use the servers in your local agent for src mcp pull.

Apps

src app manages the apps installed on a repository.

You want toCommand
List the app installs that cover the repositorysrc app list
Take the repository out of an install that picked itsrc app remove-repo <install-id> --yes
Uninstall an app from its accountsrc app uninstall <install-id> --yes
  • src app list shows each install id. Add --json installId,app,repos,actions,events for a script.
  • remove-repo needs admin rights on the repository. uninstall needs you to own the account.
  • You register and install apps on the web. See Install an app.

Monorepos

src monorepo works with a monorepo: a repository whose members are other repositories of the same owner.

You want toCommand
Clone the monorepo and every membersrc monorepo clone acme/platform
Fetch every member, and clone new memberssrc monorepo sync
See the branch of each folder, ahead and behindsrc monorepo status
List, add or remove memberssrc monorepo member list, src monorepo member add acme/docs, src monorepo member remove acme/docs
Search issues and pull requests in all memberssrc monorepo search issues "login fails"
Search code in all memberssrc monorepo search code "createRouter"
Open, view, list, merge, retry or close a monorepo pull requestsrc monorepo pr create --title "Add the field", src monorepo pr merge 12
  • Run sync, status and pr create at the root of the checkout.
  • member add takes --folder for a folder other than the name of the repository.
  • Without -R, the member commands act on the repository of your clone.

See Clone and sync a monorepo and Change several members in one pull request.

Assignees

You want toCommand
List the people that the web assignee picker shows (triage role or more)src repo assignees

Add --json login,name for a script or an agent. See Assign people to issues and pull requests.

Share a private pull request

Show one private pull request of a public repository to a person outside the team, read only. You need write access.

You want toCommand
Make a link that works for 1, 7 or 30 days (7 by default)src pr share 12 --link --days 30
Give the link a label, so that you can find it in the list latersrc pr share 12 --link --label "Ana's review"
Share with people, until you stop itsrc pr share 12 --user ana --user ben, or --user ana,ben
Also show the CI logs, the artifacts and the agent run logsAdd --level everything. The default is page
List the shares, with their statesrc pr share 12 --list
Stop a sharesrc pr share 12 --revoke <id>
  • Give exactly one of --link, --user, --list or --revoke.
  • src pr share also takes a URL or a branch. Without one, it uses the pull request of the current branch.
  • --label works only with --link, with at most 100 characters. You cannot change it later. --list shows it in the Label column.
  • --link prints the URL once. Add --json url,expiresAt,label to get it in a script.

See Share a private pull request.

Artifacts

src issue artifact and src pr artifact work as in gh. src artifact acts on the artifacts of the repository or of an account, by their number in the repository.

You want toCommand
Put a page on the repository, and list the artifactssrc artifact create notes.md, src artifact list
Share an artifact on its target, or make it privatesrc artifact share 3, src artifact unshare 3
Make, list or revoke a share linksrc artifact link create 3, src artifact link list 3, src artifact link revoke 3 <link-id>
Read and write commentssrc artifact comment list 3, src artifact comment add 3 --body "<text>"
Change the share links and the allowed hostssrc artifact settings set --link-sharing on --allowed-hosts cdn.example.com
  • Add --owner <name> for the artifacts of an account: src artifact create --owner acme report.md.
  • src artifact link create prints the link once.

See Keep plans and pages next to your work.

Change one file without a clone

You want toCommand
Write a file from the local file at the same pathsrc repo write-file docs/guide.md
Write a file from another local file, on a branch, with a messagesrc repo write-file config.json --from ./new.json --branch dev -m "Raise the timeout"
Delete a filesrc repo delete-file old/notes.md
  • Each command makes one commit, as your push, through the checks of a push. --from - reads standard input.
  • The commit is refused when the file changed between the read and the commit. Run the command again.

See Edit files in the browser.

Architecture and impact

You want toCommand
See the architecture of the repositorysrc repo architecture
Make the architecture now (write access)src repo architecture --generate
See the impact of a pull requestsrc pr impact 12
Find the pull requests to handle firstsrc pr list --ease easy --sort impact
Read or change the stack of a pull requestsrc pr stack view 12, src pr stack unlink 12, src pr stack link 12, src pr stack break 12
  • src pr impact also takes a URL or a branch. Without one, it uses the pull request of the current branch.
  • Add --json <fields> to get the fields of the REST answer, for a script or an agent.

Traffic and npm downloads

You want toCommand
See who clones and visits the repository (write access)src repo insights --range 30d
See the npm downloads of the packages of the repositorysrc repo npm
See the npm downloads of the public repositories of an organizationsrc org npm <org>
  • src repo npm prints one line for each package: the name, verified, the latest version, the weekly downloads and the change.
  • src org npm <org> prints the same lines, with the repository of each package.
  • Add --json packages to get the downloads of each day of the last 540 full days, up to yesterday.

The factory and bans

src factory runs the software factory, src deps runs its dependency agent, and src ban manages bans. With --org <name>, the settings, keys and ban commands act on an organization.

Settings and keys

You want toCommand
See the factory settingssrc factory settings
See what the forge-paid models cost this month, and the capsrc factory settings --org <org> --json spend
Turn on agents, or change the factory settingssrc factory configure --file change.json
Save a model keysrc factory set-key anthropic < key.txt
  • set-key reads the key from standard input, so the key does not go into your shell history.
  • src factory keys lists the providers that have a key. It never shows a key.

A change file holds only the fields that you change. This file turns on the review and its fixes:

{ "agents": { "review": { "enabled": true, "steps": { "fix": true } } } }
  • agents takes the agent ids: audit, spam, review, keep-green, summary, triage, assign, issue-fix, deps, architecture and ci-cache.
  • Every agent is off by default. When summary is on, its steps impact and classify are on.
  • The switches of an agent are in steps. See Models, keys and triggers.

Runs and custom agents

You want toCommand
See the runs on an issue or a pull requestsrc factory runs 12
See the newest runs of the repository (write access)src factory runs -L 20
See only the failed runs of one agent, all its steps (write access)src factory runs --agent review --status failed
Read one run and its logsrc factory run <run id> --log
Add a custom agentsrc factory upload-agent docs-check docs-check.ts
List the custom agent files, and the errors of the filessrc factory agents
  • src factory runs shows each run as its agent and its step, for example review/fixer. For the main step of an agent, it shows the agent alone, for example audit.
  • --json agent,step gives the agent id and the step id. --agent takes an agent id (all its steps) or a step id.
  • src factory agents prints the errors of the custom agent files on stderr, and exits 0. See Fix an error in the file.

Dependencies

You want toCommand
See the dependencies and the pull requests of the dependency agentsrc deps list
Check the dependencies now (write access)src deps check
Set or remove the rule of a dependency (write access)src deps rule set react --no-major, src deps rule remove react

src deps rule set takes one of --ignore, --no-major or --ignore-version <version>. A scoped name such as @types/node works as it is.

Bans

You want toCommand
Ban an account, or lift its bansrc ban add <user>, src ban remove <user>
See the spam signals of an accountsrc ban signals <user>
See the bans that the spam agent suggestssrc ban suggestions
Ban the account of a suggested ban, or dismiss itsrc ban accept <id>, src ban dismiss <id>

src ban suggestions lists the open suggested bans. Add --state banned or --state dismissed for the decided ones.