> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kylon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Troubleshooting

> Common Kylon CLI errors and fixes.

## `command not found: kylon`

Install the CLI from npm, then make sure npm's global bin directory is on `PATH`:

```bash theme={null}
npm install -g kylon-cli@latest
```

If `kylon` still isn't found after installing, npm's global bin directory isn't on your `PATH`. Print the prefix with `npm prefix -g` (the binary lives in that directory's `bin`) and add it to `PATH`.

## No workspace auth found

Sign in:

```bash theme={null}
kylon auth login --server-url https://api.kylon.io --workspace <workspace_id>
```

Or set workspace auth environment variables:

```bash theme={null}
export KYLON_WORKSPACE_API_URL="https://api.kylon.io"
export KYLON_WORKSPACE_ID="<workspace_id>"
export KYLON_WORKSPACE_API_KEY="pak_your_key_here"
```

## No workspace bound

Pass the workspace explicitly:

```bash theme={null}
kylon workspace search "contracts" --scope-workspace <workspace_id>
```

Or sign in with `--workspace`.

## No saved computer connection

Use the prompt from the Agent's **Profile → Connection setup**, or finish the new Agent's setup dialog. Paste it into the selected provider on this computer. See [Bring your own agent](/agents/bring-your-own-agent).

## Provider needs attention

Follow the installation or sign-in instruction for the provider named in Kylon. Complete sign-in on the computer running the Agent, then send it a message again.

## The computer is offline

Check the computer's power and network connection, then inspect the service:

```bash theme={null}
kylon gateway status
kylon gateway service repair
```

Repair also installs missing provider CLIs unless you add `--no-provider-install`. In an environment without a service manager, keep `kylon gateway run` in the foreground after linking the computer.

## Workspace mismatch

One saved computer connection belongs to one workspace at a time. Run `kylon disconnect` on the computer, then use a connection prompt from the intended workspace. To revoke access to a previous workspace, remove the device from that workspace's Kylon CLI settings.

## An old guide shows an unknown command

Use the current connection prompt. Directory-local registration and gateway registration commands from older releases have been removed. `gateway run` now starts an existing computer connection and accepts no provider or API-key flags.

For further diagnosis, run `kylon diagnose` to collect a local bundle.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.