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

# CLI Installation

> Install and set up the VibeHub command-line interface

## Overview

The VibeHub CLI (`vibe`) lets you push commits, sync code, and manage projects directly from your terminal. It's the primary way to send commits from your local development environment to VibeHub.

## Requirements

* **Node.js** version 18.0.0 or higher
* **npm** or **yarn** package manager
* A VibeHub account

## Installation

### Using npm (Recommended)

```bash theme={null}
npm install -g @vibehub/cli
```

### Using yarn

```bash theme={null}
yarn global add @vibehub/cli
```

### Verify Installation

After installation, verify it worked:

```bash theme={null}
vibe --version
```

You should see the version number printed.

## First-Time Setup

After installing, you need to authenticate:

```bash theme={null}
vibe login
```

This opens your browser to sign in with your VibeHub account. Once authenticated, you're ready to use the CLI.

See [Authentication](/cli/authentication) for more details.

## Basic Commands

Here are the most common commands to get started:

| Command          | Description                      |
| ---------------- | -------------------------------- |
| `vibe login`     | Authenticate with VibeHub        |
| `vibe init`      | Initialize a new VibeHub project |
| `vibe set <url>` | Connect to an existing project   |
| `vibe push`      | Push commits to VibeHub          |
| `vibe pull`      | Pull commits from VibeHub        |
| `vibe status`    | Check sync status                |

## Quick Start Example

```bash theme={null}
# 1. Login to VibeHub
vibe login

# 2. Navigate to your project
cd my-project

# 3. Connect to a VibeHub project
vibe set https://vibehub.co.in/username/my-project

# 4. Push your code
vibe push
```

## Getting Help

### Command Help

Get help for any command:

```bash theme={null}
vibe --help
vibe push --help
vibe login --help
```

### List All Commands

```bash theme={null}
vibe --help
```

## Updating the CLI

To update to the latest version:

### npm

```bash theme={null}
npm update -g @vibehub/cli
```

### yarn

```bash theme={null}
yarn global upgrade @vibehub/cli
```

## Uninstalling

To remove the CLI:

### npm

```bash theme={null}
npm uninstall -g @vibehub/cli
```

### yarn

```bash theme={null}
yarn global remove @vibehub/cli
```

## Troubleshooting

### Command Not Found

If `vibe` is not recognized:

1. Check that npm's global bin is in your PATH
2. Try running `npm bin -g` to find the path
3. Add that path to your shell configuration

### Permission Errors

If you get permission errors during installation:

```bash theme={null}
# Option 1: Use sudo (Linux/Mac)
sudo npm install -g @vibehub/cli

# Option 2: Fix npm permissions (recommended)
# See: https://docs.npmjs.com/resolving-eacces-permissions-errors-when-installing-packages-globally
```

### Node Version Too Old

If you see Node version errors:

1. Check your Node version: `node --version`
2. Update Node to version 18 or higher
3. Consider using [nvm](https://github.com/nvm-sh/nvm) to manage Node versions

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/cli/authentication">
    Set up your VibeHub credentials
  </Card>

  <Card title="Initialize a Project" icon="folder-plus" href="/cli/commands/init">
    Start using VibeHub in your project
  </Card>
</CardGroup>
