Uninstall the CLI
jiayang uninstall takes the CLI off this computer: its session, its files and the program. It doesn’t touch anything on Jiayang Cloud. Your apps, workspaces and account stay as they are. To delete those too, see Delete your apps, workspaces or account.
Run jiayang uninstall
Section titled “Run jiayang uninstall”jiayang uninstallIt lists what it’s going to remove and asks before it removes anything. To go ahead without the question, in a script for example, add --yes. With no terminal to ask at, it stops unless you pass --yes.
jiayang uninstall --yesIn order, it:
- Revokes the bypass tokens your agent made on this computer, and deletes the files in
tokens/that hold their secrets. A token it can’t revoke, because nobody is signed in or it was made on another platform, still loses its file, and the CLI names it so you can revoke it in the dashboard. - Ends this computer’s session, the way
jiayang logoutdoes. If it can’t reach Jiayang Cloud, it says so and carries on. The session then works until it expires, or until you revoke it in the dashboard: open the account menu and choose Sessions. - Deletes the config directory. It only deletes files the CLI wrote there,
config.jsonand the token files, and then the directory if nothing else is in it. Anything else stays where it is, and so does the directory, and the CLI lists what’s left. A config directory that’s a symlink isn’t touched. - Removes the program, if the install script put it there, along with the lines the script added to your shell’s startup files. For Homebrew, npm, cargo and Windows, it prints the command to run instead. See What it does for each install.
- Takes
jiayang-cloudout of.cursor/mcp.jsonin the directory you run it from, keeping every other server in the file. It prints how to take it out of your other agents. See Remove it from your agents.
To keep your settings, for example because you’re about to install again a different way, add --keep-config. The tokens are still revoked and the session still ends.
With --json, it prints what it did as one JSON object, with session, tokens, config, binary and agents.
When it’s done, it says what it removed:
Signed out, and ended this computer's session.Revoked 1 bypass token your agent made here.Deleted 1 secret file from /Users/ada/.config/jiayang/tokens.Removed the config directory, /Users/ada/.config/jiayang.Deleted /Users/ada/.jiayang/bin/jiayang.Took the line the install script added out of /Users/ada/.profile, /Users/ada/.zshrc.Open a new terminal afterwards, so your shell stops looking for jiayang on the old PATH.
What it does for each install
Section titled “What it does for each install”The CLI tells how it was installed from where the program is.
On macOS and Linux, jiayang uninstall does all of this itself.
The script put the program in ~/.jiayang/bin, or $JIAYANG_HOME/bin if you set JIAYANG_HOME. jiayang uninstall deletes it, and the directory once it’s empty.
The script also added this line to your shell’s startup files, .profile, .bashrc, .bash_profile, .bash_login, .zshrc and .zshenv:
. "$HOME/.config/jiayang/env.sh"and made ~/.config/fish/conf.d/jiayang.env.fish for fish. jiayang uninstall takes out only lines exactly like that one, along with the blank line the script put before each, and leaves the rest of each file as it was. It deletes fish’s file if nothing else is in it.
It deletes the files the script wrote in ~/.config/jiayang: env.sh, env.fish and jiayang-receipt.json. An env script you’ve changed since is yours, so it stays. A startup file that’s a symlink, into a dotfiles repository say, isn’t changed, and the CLI prints the line for you to take out.
To do it by hand instead:
rm ~/.jiayang/bin/jiayangrm ~/.config/jiayang/env.sh ~/.config/jiayang/env.fish ~/.config/jiayang/jiayang-receipt.jsonrm ~/.config/fish/conf.d/jiayang.env.fishThen delete the . "$HOME/.config/jiayang/env.sh" line from your startup files. An older install script ran $HOME/.jiayang/bin/env instead, from the same files.
Windows can’t delete a program while it’s running, so jiayang uninstall prints the PowerShell commands that finish the job. Run them once it’s done. They delete the program, take its directory off your user Path, and delete the receipt the install script left:
Remove-Item "$HOME\.jiayang\bin\jiayang.exe"$p = [Environment]::GetEnvironmentVariable('Path', 'User'); [Environment]::SetEnvironmentVariable('Path', (($p -split ';') | Where-Object { $_ -and ($_ -replace '/', '\').TrimEnd('\') -ne "$HOME\.jiayang\bin" }) -join ';', 'User')Remove-Item "$env:LOCALAPPDATA\jiayang\jiayang-receipt.json"The config directory is %APPDATA%\jiayang, which jiayang uninstall deletes.
Homebrew keeps its own record of what it installed, so jiayang uninstall leaves the program and tells you to run:
brew uninstall jiayangTo stop Homebrew checking our tap for updates too, run brew untap ss2d22/tap.
npm keeps its own record of what it installed, so jiayang uninstall leaves the program and tells you to run:
npm uninstall -g jiayangIf you built the CLI from source with cargo install --path crates/cli, jiayang uninstall leaves the program and tells you to run:
cargo uninstall jiayang-cliIf the program is somewhere none of these put it, jiayang uninstall prints its path and asks you to delete it, along with anything you added to your PATH for it.
Remove the config directory by hand
Section titled “Remove the config directory by hand”Sign out first, so the session ends on Jiayang Cloud and not only on this computer:
jiayang logoutThen delete the directory. It’s $JIAYANG_CONFIG_DIR if you set that, then $XDG_CONFIG_HOME/jiayang, then ~/.config/jiayang, and %APPDATA%\jiayang on Windows:
rm -r ~/.config/jiayangBypass tokens your agent made are still valid until they expire. Revoke them first with jiayang token revoke, or in the dashboard.
Remove it from your agents
Section titled “Remove it from your agents”jiayang uninstall takes jiayang-cloud out of the Cursor config in the directory you run it from. Wherever else you added it, take it out there:
claude mcp remove jiayang-cloudIf you installed the plugin:
claude plugin uninstall jiayang-cloud@jiayang-cloudclaude plugin marketplace remove jiayang-cloudcodex mcp remove jiayang-cloudOr delete the [mcp_servers.jiayang-cloud] section from ~/.codex/config.toml. If you installed the plugin:
codex plugin remove jiayang-cloud@jiayang-cloudcodex plugin marketplace remove jiayang-cloudjiayang mcp install cursor wrote jiayang-cloud into each project’s .cursor/mcp.json. Run jiayang uninstall from one of those projects and it takes it out of that one. For the others, delete the jiayang-cloud entry from the file, and leave the rest of it.
Delete your apps, workspaces or account
Section titled “Delete your apps, workspaces or account”Uninstalling the CLI leaves everything on Jiayang Cloud running. To delete it too, do that before you uninstall, or in the dashboard afterwards:
- An app:
jiayang app delete acme/hello --yes, or in the dashboard, under the app’s Settings, then Danger zone. Its versions, data, secrets and tokens go with it. See Delete an app. - A workspace: in the dashboard, under the workspace’s Settings, then Danger zone. Only an owner can, and the CLI can’t. See Workspace roles.
- Your account: in the dashboard, open the account menu and choose Delete account. If you’re the only owner of a workspace or an app, hand it to another owner or delete it first.