Skip to main content
The CLI is the npm package @rubixkube/rubix. It needs Node.js 22.12 or newer and a RubixKube account.

Install

This gives you the rubix command.
Check it worked:
If your shell says rubix: command not found, the folder npm installs global commands into isn’t on your PATH. Run npm prefix -g, and add the bin folder inside it to your PATH.

Sign in

If you run rubix before you’ve signed in, it opens on this screen. Choose Login to RubixKube.
The Rubix CLI before sign-in, with setup steps, the prompt keys for commands, files and shell, and the choice to log in to RubixKube or exit
1

Get a code

The CLI prints a link and a short code, and opens the link in your browser when it can.
2

Approve it in the browser

Sign in to RubixKube if you aren’t already, check the code matches, and approve.
3

Back in the terminal

The CLI sees the approval and you’re signed in. Running rubix for the first time does the same thing if you haven’t signed in yet.
The sign-in is kept in ~/.rubix/auth.json and renews itself, so you don’t sign in every day. rubix logout removes it. Over SSH, where no browser opens, copy the link into a browser on your own machine. The code works from any device.

Trust the folder

The first time you open chat in a folder, the CLI asks whether you trust it, because Rubix can read the files you name there with @./path. Choose Trust this folder and continue, or press Ctrl+C to leave. /untrust removes the current folder from the list. One-shot commands don’t ask.

Update

The CLI checks npm once a day and tells you when a newer version is out. What’s new lists what changed.

Uninstall

The second line removes your sign-in and settings. Leave it out if you’ll install the CLI again.

Chat in the terminal

Your first chat, and the keys that help.

Troubleshooting

When install or sign-in doesn’t work.