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

# Installation

> How to install 60db CLI globally or locally

# Installation

**Source code:** [github.com/60db-ai/cli](https://github.com/60db-ai/cli) · **npm:** [`60db-cli`](https://www.npmjs.com/package/60db-cli)

## Prerequisites

* Node.js 16 or higher
* npm or yarn package manager

## Global Installation

Install globally to use the `60db` command anywhere:

```bash theme={null}
npm install -g 60db-cli
```

Verify installation:

```bash theme={null}
60db --version
```

## Local Installation

Install as a dependency in your project:

```bash theme={null}
npm install 60db-cli
```

Use with npx:

```bash theme={null}
npx 60db users --list
```

## Install from Source

Clone the public GitHub repo and link the binary locally — useful when you want to build from a specific branch or commit:

```bash theme={null}
git clone https://github.com/60db-ai/cli.git
cd cli
npm install
npm link         # exposes the `60db` binary on your PATH
60db --version
```

## Post-Installation

After installation, configure your API credentials:

```bash theme={null}
# Set API URL
60db config --set apiBaseUrl=https://api.60db.ai

# Set API key
60db config --set apiKey=your_api_key_here

# Or login with email/password
60db auth:login --email your@email.com --password yourpassword
```

## Troubleshooting

### Command not found

If you get `command not found` after global installation:

1. Check npm global bin directory:
   ```bash theme={null}
   npm config get prefix
   ```

2. Add it to your PATH (if not already):
   ```bash theme={null}
   export PATH=$(npm config get prefix)/bin:$PATH
   ```

3. Or reinstall with sudo (Linux/Mac):
   ```bash theme={null}
   sudo npm install -g 60db-cli
   ```
