# Install the CLI

**The `hlix` CLI is the local entry point** for moving a project into a hlix workspace and keeping both copies in sync.

```bash
npm install --global @hlix/cli
hlix --version
```

Run it once without installing:

```bash
npx @hlix/cli --help
```

In CI, pin the version instead of floating to `latest`:

```bash
npm install --global @hlix/cli@0.2.0
```

## Prerequisites

- macOS or Linux
- Node.js 20 or later
- Git
- A hlix API key and workspace ID — create both in **Developer tools → API keys**

## Verify the install

```bash
hlix --version
hlix --help
```

Expected result: the first prints a semantic version, the second prints the registered command table.
**Prefer the API? You do not need the CLI at all:** Everything the CLI does, the [HTTP API](/api/reference/) does — and the [dashboard](https://app.hlix.ai/) covers more, including review and approvals. The CLI exists because import, push, pull and sync are local-filesystem operations that belong on your machine.

## If installation fails

- `hlix: command not found` right after a successful install: your global `npm` bin directory is not on `PATH`. Check `npm bin -g`, add it to your shell profile, then open a new shell.
- `EACCES: permission denied` during a global install: npm is trying to write to a root-owned prefix. Set a user-writable prefix (`npm config set prefix ~/.npm-global`) rather than installing with `sudo`.
- `SyntaxError` or an engine warning on startup: confirm `node --version` is 20 or later.
- `npm error E404`: check the package name — `@hlix/cli` is the only CLI package. [Current versions](/releases/availability/) lists what the registry serves.
- `hlix --version` prints an older number than you installed: an earlier binary is still first on `PATH`. `which -a hlix` shows which one wins.
- `brew` cannot find the formula: the Homebrew tap is announced separately from npm. Use npm meanwhile.

## Next steps

[Authenticate](/getting-started/authentication/)
  [Quickstart: ship your first task](/getting-started/quickstart/)
  [CLI reference](/reference/cli/)
  [Current versions](/releases/availability/)
