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

# CLI Installation

> Install and set up the Ollie Shop CLI for component and function development

Quick CLI setup for Ollie Shop development. Install, authenticate, and start building in under 2 minutes.

## Install

<CodeGroup>
  ```bash npm theme={"system"}
  npm install -g @ollie-shop/cli
  ```

  ```bash yarn theme={"system"}
  yarn global add @ollie-shop/cli
  ```

  ```bash pnpm theme={"system"}
  pnpm install -g @ollie-shop/cli
  ```
</CodeGroup>

<Info>
  ```bash theme={"system"}
  ollieshop --version
  ```

  Should show version number (e.g., `2.1.4`)
</Info>

## Authenticate

<Steps>
  <Step title="Login">
    ```bash theme={"system"}
    ollieshop login
    ```

    Opens browser for OAuth authentication
  </Step>

  <Step title="Choose Provider">
    <CardGroup cols={3}>
      <Card title="GitHub" icon="github">
        Best for teams with existing GitHub workflows
      </Card>

      <Card title="Google" icon="google">
        Quick single sign-on for business users
      </Card>

      <Card title="Email" icon="envelope">
        Secure email-based authentication
      </Card>
    </CardGroup>
  </Step>
</Steps>

<Info>
  **Ready!** CLI is installed and authenticated. Start with the [Developer Quickstart](/ollie-shop/get-started/quickstart) to build your first component.
</Info>

<Info>
  Authentication tokens are stored securely in `~/.ollie-shop/credentials.json`
</Info>

## Troubleshooting

<Accordion title="Common Issues">
  <CardGroup cols={2}>
    <Card title="Permission Denied" icon="lock">
      **Problem**: `npm install -g` fails with permission errors

      **Solution**:

      ```bash theme={"system"}
      sudo npm install -g @ollie-shop/cli
      ```

      Or use a Node version manager like nvm
    </Card>

    <Card title="Command Not Found" icon="terminal">
      **Problem**: `ollieshop` command not recognized

      **Solution**: Restart terminal or check PATH:

      ```bash theme={"system"}
      echo $PATH | grep npm
      ```
    </Card>

    <Card title="Login Fails" icon="key">
      **Problem**: Browser doesn't open or authentication fails

      **Solution**: Retry the login:

      ```bash theme={"system"}
      ollieshop login
      ```
    </Card>

    <Card title="Node Version" icon="code">
      **Problem**: CLI requires newer Node.js version

      **Solution**: Update Node.js to 18+ or use nvm:

      ```bash theme={"system"}
      node --version  # Should be 18.0.0+
      ```
    </Card>
  </CardGroup>
</Accordion>
