Skip to content

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.

Terminal window
jiayang uninstall

It 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.

Terminal window
jiayang uninstall --yes

In order, it:

  1. 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.
  2. Ends this computer’s session, the way jiayang logout does. 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.
  3. Deletes the config directory. It only deletes files the CLI wrote there, config.json and 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.
  4. 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.
  5. Takes jiayang-cloud out of .cursor/mcp.json in 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.

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:

Terminal window
. "$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:

Terminal window
rm ~/.jiayang/bin/jiayang
rm ~/.config/jiayang/env.sh ~/.config/jiayang/env.fish ~/.config/jiayang/jiayang-receipt.json
rm ~/.config/fish/conf.d/jiayang.env.fish

Then 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.

If 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.

Sign out first, so the session ends on Jiayang Cloud and not only on this computer:

Terminal window
jiayang logout

Then 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:

Terminal window
rm -r ~/.config/jiayang

Bypass tokens your agent made are still valid until they expire. Revoke them first with jiayang token revoke, or in the dashboard.

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:

Terminal window
claude mcp remove jiayang-cloud

If you installed the plugin:

Terminal window
claude plugin uninstall jiayang-cloud@jiayang-cloud
claude plugin marketplace remove jiayang-cloud

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.