Install the CLI
jiayang is one program. You use it to deploy apps, share them and read the audit log. Your AI agent can use it too.
It runs on macOS (Apple silicon and Intel), Linux (arm64 and x86-64) and Windows (arm64 and x86-64).
Install it
Section titled “Install it”-
Run the install script.
Terminal window curl -fsSL https://jiayang.cloud/install.sh | shThe script puts
jiayangin~/.jiayang/bin. It adds that directory to yourPATHin your shell’s startup files (.profile,.bashrc,.zshrcand fish’sconf.d). If~/.config/jiayang/env.shis left from an install somewhere else, it writes it again for this one.In PowerShell:
Terminal window irm https://jiayang.cloud/install.ps1 | iexThe script puts
jiayangin.jiayang\binin your user profile, and adds that directory to your userPath.On a Windows on Arm PC, such as a Snapdragon laptop, it installs the arm64 build. Windows PowerShell on Windows 11 before version 22H2 can report the PC as x86-64, and then the script installs the x86-64 build, which runs under emulation. Run the line in PowerShell 7.3 or later to get the arm64 one. Windows on Arm is supported on Windows 11 only. Windows 10 on Arm can’t run x86-64 programs, and we don’t test the arm64 build there.
-
Open a new terminal, so it picks up the new
PATH. To usejiayangin the terminal you ran the script in, run the line it prints instead. In zsh, bash or sh that’s:Terminal window . "$HOME/.config/jiayang/env.sh"In fish, it’s
source "$HOME/.config/jiayang/env.fish". On Windows, open a new terminal. -
Check that it works. Run
jiayang --version, and it prints the version you have.
Or use Homebrew or npm
Section titled “Or use Homebrew or npm”On macOS or Linux, with Homebrew:
brew install ss2d22/tap/jiayangWith npm:
npm install -g jiayangThe npm package downloads the build for your machine while it installs, so it needs to reach GitHub. It picks the build that matches Node: on Windows on Arm, the arm64 build if you have the arm64 Node, and the x86-64 build if you have the x86-64 Node.
Update
Section titled “Update”The CLI doesn’t update itself. Update it the way you installed it:
curl -fsSL https://jiayang.cloud/install.sh | sh # the script, run againbrew upgrade ss2d22/tap/jiayang # Homebrewnpm install -g jiayang@latest # npmOn Windows, run the PowerShell line again.
To take the CLI off your computer, run jiayang uninstall. See Uninstall the CLI.
Change where the script installs
Section titled “Change where the script installs”Two environment variables change what the install script does:
| Variable | Effect |
|---|---|
JIAYANG_HOME |
Install into $JIAYANG_HOME/bin instead of ~/.jiayang/bin. |
JIAYANG_NO_MODIFY_PATH=1 |
Leave your shell’s startup files and PATH alone. |
Use it behind a proxy that inspects TLS
Section titled “Use it behind a proxy that inspects TLS”Some company networks send all traffic through a proxy that re-signs TLS with its own certificate authority. Zscaler and Netskope do this.
The CLI trusts what your operating system trusts, the way your browser does. IT usually puts the proxy’s certificate authority there, so on most managed laptops the CLI works wherever your browser does, with nothing to set.
If the proxy’s certificate authority isn’t in your system’s store, every command that talks to Jiayang Cloud fails with a certificate error. To fix it, point JIAYANG_CA_FILE at the proxy’s CA bundle, in PEM:
export JIAYANG_CA_FILE=/etc/ssl/certs/corp-ca.pemIf JIAYANG_CA_FILE isn’t set, the CLI uses SSL_CERT_FILE, which your IT team may have set already for other tools. The CLI trusts the certificates in the file as well as your system’s.
If the CLI can’t use the file, the command stops before it connects, and names the file:
error: Reading /etc/ssl/certs/corp-ca.pem, set in JIAYANG_CA_FILE: No such file or directory (os error 2).error: /etc/ssl/certs/corp-ca.pem, set in JIAYANG_CA_FILE, has no certificates in it.error: /etc/ssl/certs/corp-ca.pem, set in JIAYANG_CA_FILE, isn't a PEM certificate bundle: base64 decode error: InvalidCharacter(33).error: /etc/ssl/certs/corp-ca.pem, set in JIAYANG_CA_FILE, has a certificate we can't read: invalid peer certificate: BadEncoding.You get the second when the file has no PEM certificate in it, for example a certificate saved as DER. You get the third when a certificate block’s base64 is broken, and the fourth when a block decodes but doesn’t hold a certificate.
Turn off Yun
Section titled “Turn off Yun”Yun, our cloud, says hi over jiayang --help and turns up at a few other moments: when you sign in, when jiayang init writes a template, and at an app’s first deploy. Yun naps when you sign out, or when nobody is signed in, and looks a little sad when a deploy is turned down.
Yun only shows when you’re at a terminal. It never shows with --json, when the output goes to a pipe or a file, or when NO_COLOR or CI is set, so scripts and agents never see it. To turn Yun off everywhere else too:
export JIAYANG_NO_MASCOT=1Next steps
Section titled “Next steps”- Sign in to connect the CLI to your account.
- Deploy your first app.