Skip to content

Install the CLI

jiayang is a single binary. You use it to deploy apps, share them and read the audit log, and your agent uses it as an MCP server. It runs on macOS (Apple silicon and Intel), Linux (arm64 and x86-64) and Windows (x86-64).

Terminal window
curl -fsSL https://jiayang.cloud/install.sh | sh

The script downloads the build for your machine into ~/.jiayang/bin and adds that directory to your PATH in your shell’s startup files (.profile, .bashrc, .zshrc and fish’s conf.d). Open a new terminal before you run jiayang.

Two environment variables change what the 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.

On macOS or Linux:

Terminal window
brew install ss2d22/tap/jiayang
Terminal window
npm install -g jiayang

The package downloads the build for your machine when it installs, so it needs network access to GitHub at that point.

Run jiayang --version. It prints the version you have.

Then sign in.

The CLI doesn’t update itself. Update it the same way you installed it:

Terminal window
curl -fsSL https://jiayang.cloud/install.sh | sh # the script, run again
brew upgrade ss2d22/tap/jiayang # Homebrew
npm install -g jiayang@latest # npm

On Windows, run the PowerShell line again.

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 carries its own list of trusted certificate authorities and doesn’t read your system’s, so every command that talks to the platform fails with a certificate error.

Point JIAYANG_CA_FILE at the proxy’s CA bundle, in PEM:

Terminal window
export JIAYANG_CA_FILE=/etc/ssl/certs/corp-ca.pem

When JIAYANG_CA_FILE isn’t set, the CLI uses SSL_CERT_FILE, which your IT team may have set already for other tools. The certificates in the file are trusted as well as the CLI’s built-in roots, not instead of them.

A file that can’t be used stops the command at once, rather than letting it fail later with an unclear certificate error:

error: reading /etc/ssl/certs/corp-ca.pem (named by JIAYANG_CA_FILE): No such file or directory (os error 2)
error: /etc/ssl/certs/corp-ca.pem (named by JIAYANG_CA_FILE) has no certificates in it
error: /etc/ssl/certs/corp-ca.pem (named by JIAYANG_CA_FILE) isn't a PEM certificate bundle: builder error: invalid certificate encoding

The second comes from a file with no PEM certificate in it at all, such as a certificate saved in DER form. The third comes from a certificate block whose PEM or base64 is broken.

A block that reads as PEM but holds a damaged certificate gets past these checks. The command still stops before it connects, but the error doesn’t name the file:

error: building the HTTP client: builder error: invalid peer certificate: BadEncoding

If you see it, check the certificates in the file that JIAYANG_CA_FILE or SSL_CERT_FILE names.