# Installing the CLI

> Set up Node and the artor CLI so you can publish prototypes from your machine.
> URL: https://artor.app/docs/install-cli

To publish prototypes you need **Node** and the **artor CLI**. Artor uses the package manager
your project already uses.

### Install Node

Node is the software the Artor CLI needs to run. The recommended way to install it is through
**nvm** (Node Version Manager), which lets you switch versions easily.

  
#### Mac / Linux

Open Terminal and run:

```bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.7/install.sh | bash
```

Close and reopen Terminal, then install the current Node LTS release:

```bash
nvm install --lts
nvm use --lts
node --version   # should print v22 or newer
```

  
  
#### Windows

Download and run the installer from [nodejs.org](https://nodejs.org), choosing the
**LTS** version. Run `node --version` in PowerShell and confirm it is v22 or newer.

Alternatively, use **nvm for Windows**: [github.com/coreybutler/nvm-windows](https://github.com/coreybutler/nvm-windows).

  

### Install the artor CLI

```bash
npm install -g artor-cli@latest
artor --version   # confirms it's installed
```

**Warning:** 
  **On a work machine with a private npm registry?** If your company configures npm to use a
  private feed by default (Azure DevOps Artifacts, JFrog Artifactory, Verdaccio, …), the command
  above can fail with **`npm error code E404`** / `'artor-cli' was not found in feed`. `artor-cli`
  is published to **public npm**, not your company feed — so pin the install to public npm:

  ```bash
  npm install -g artor-cli@latest --registry=https://registry.npmjs.org/
  ```

  The `--registry` flag affects only that one command and never changes your global config.
  `artor update` and the CLI's own "install globally?" prompt already apply this flag for you — so
  once installed, updates just work. See [Troubleshooting](https://artor.app/docs/install-cli#troubleshooting) for a more permanent
  per-scope setup.

### Sign in

```bash
artor login   # opens your browser to approve access
artor whoami  # confirms you're signed in and shows the active org
```

---

## Updating the CLI

```bash
artor update      # upgrade a global install to the latest published version
artor --version
```

`artor update` upgrades a global install for you; if you run it through `npx` or a
project-local install, it prints the exact command instead and never installs anything
without you asking. It always pins the install to public npm
(`--registry=https://registry.npmjs.org/`), so it keeps working even behind a private company
registry.

It also refreshes the installed **Artor skill** in the same step — whichever way you installed it
(the Claude Code plugin, or the portable skill on any other tool) — so one command keeps both
current. See [Keeping the skill up to date](https://artor.app/docs/skills#keeping-the-skill-up-to-date).

A global or packaged install also **keeps itself current automatically**: when the server
reports a newer CLI, an interactive (non-CI) `artor` updates after your command finishes and
prints one confirmation line; in CI or a non-interactive shell it only
shows a one-line "update available" notice and does not update itself. Set `ARTOR_NO_AUTOUPDATE=1`
for one run, or `artor update --off` to turn automatic updates off for good (`--on` re-enables).

If an update is required to continue, a global or packaged install updates and retries once.
Other installations ask you to run `artor update` before trying again.

## Troubleshooting

**`npm error code E404` / `'artor-cli' was not found in feed` on install**

Your machine's default npm registry is a **private company feed** (you'll see a
`pkgs.dev.azure.com/…`, Artifactory, or similar URL in the error). `artor-cli` lives on public
npm, not that feed. Two fixes:

- **One-off:** pin public npm for just this install —
  `npm install -g artor-cli@latest --registry=https://registry.npmjs.org/`.
- **Permanent (recommended):** in your `~/.npmrc`, scope only your **company** packages to the
  private feed and leave the **default** registry on public npm, so unscoped packages like
  `artor-cli` resolve normally:

  ```ini
  # ~/.npmrc — default stays public npm…
  @yourcompany:registry=https://pkgs.dev.azure.com/…/registry/   # …only @yourcompany goes to the private feed
  ```

  If your company publishes **unscoped** package names to the private feed, you can't cleanly
  split them — use the one-off `--registry` flag whenever you install or update `artor-cli`.

**`This CLI is too old for the Artor server. Run artor update.`**

Run `artor update`, follow any installation command it prints, then retry. This can happen
with project-local or `npx` installations, automated runs, or when automatic updates are off.

**A publish stops with `boot smoke test failed …`**

Artor couldn't start the app before uploading it. Give the error to your coding agent, fix
the build, and publish again. Use `--no-smoke` only if the app needs configuration or services
available exclusively on Artor. See
[Publishing](https://artor.app/docs/publishing#broken-builds-fail-before-they-go-live).

**`artor: command not found` after installing**

Your terminal may not have picked up the new install. Try closing and reopening it, then
run `artor --version` again.

If it still doesn't work, the npm global bin folder might not be on your PATH. Run
`npm prefix -g` to find where global packages live, and check that its `bin` subfolder is
on your PATH.

**`EACCES: permission denied` on install**

Don't use `sudo`; it can cause permission issues. Instead, configure npm to use a folder
you own:

```bash
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH   # add this line to ~/.zshrc or ~/.bashrc too
npm install -g artor-cli@latest
```

**Node version is wrong**

Check with `node --version`. If it shows something older than 22, run:

```bash
nvm install --lts
nvm use --lts
nvm alias default 'lts/*'   # use the current LTS in new terminal windows
```

---

Once installed, head to [Publishing a prototype](https://artor.app/docs/publish-a-prototype) to get your first
prototype live.
