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

# Installation

> Get NikCLI up and running in minutes with our universal installer

# Installation Guide

NikCLI supports **universal installation** across all major package managers with intelligent auto-detection and fallback mechanisms.

## 🚀 Quick Install (Recommended)

### Universal Installer

The universal installer automatically detects your system and uses the best available package manager:

<Tabs>
  <Tab title="Unix/macOS">
    ```bash theme={null}
    # Universal installer with auto-detection
    curl -fsSL https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.sh | bash
    ```
  </Tab>

  <Tab title="Windows PowerShell">
    ```powershell theme={null}
    # Windows PowerShell installer
    iwr -useb https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.ps1 | iex
    ```
  </Tab>

  <Tab title="Windows CMD">
    ```cmd theme={null}
    # Windows CMD installer
    powershell -Command "iwr -useb https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.ps1 | iex"
    ```
  </Tab>
</Tabs>

### Specify Package Manager

Force a specific package manager if needed:

```bash theme={null}
# Force specific package manager
curl -fsSL https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.sh | bash -s pnpm

# Windows PowerShell with specific manager
iwr -useb https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.ps1 | iex -PackageManager yarn
```

## 📦 Manual Installation

Choose your preferred package manager:

<AccordionGroup>
  <Accordion title="npm">
    ```bash theme={null}
    # Install globally
    npm install -g @nicomatt69/nikcli

    # Verify installation
    nikcli --version
    ```

    **Requirements:**

    * Node.js 18+
    * npm 8+
  </Accordion>

  <Accordion title="yarn">
    ```bash theme={null}
    # Install globally
    yarn global add @nicomatt69/nikcli

    # Verify installation
    nikcli --version
    ```

    **Requirements:**

    * Node.js 18+
    * Yarn 1.22+ or Yarn 3+
  </Accordion>

  <Accordion title="pnpm">
    ```bash theme={null}
    # Install globally
    pnpm install -g @nicomatt69/nikcli

    # Verify installation
    nikcli --version
    ```

    **Requirements:**

    * Node.js 18+
    * pnpm 7+
  </Accordion>

  <Accordion title="bun">
    ```bash theme={null}
    # Install globally
    bun install -g @nicomatt69/nikcli

    # Verify installation
    nikcli --version
    ```

    **Requirements:**

    * Bun 1.0+
  </Accordion>
</AccordionGroup>

## 🔧 Development Setup

For contributing to NikCLI or running from source:

```bash theme={null}
# Clone repository
git clone https://github.com/nikomatt69/nikcli-main
cd nikcli-main

# Install dependencies (uses pnpm for optimal performance)
pnpm install

# Build and start
pnpm run build
pnpm start
```

**Development Scripts:**

<CardGroup cols={2}>
  <Card title="Development" icon="code">
    ```bash theme={null}
    pnpm start          # Start in development mode
    pnpm run dev        # Development with watch mode
    ```
  </Card>

  <Card title="Building" icon="hammer">
    ```bash theme={null}
    pnpm run build      # Compile TypeScript
    pnpm run build:binary # Create binary distribution
    ```
  </Card>

  <Card title="Testing" icon="flask">
    ```bash theme={null}
    pnpm test           # Run test suite
    pnpm run test:watch # Watch mode testing
    ```
  </Card>

  <Card title="Quality" icon="check">
    ```bash theme={null}
    pnpm run lint       # Run linter
    pnpm run format     # Format code
    ```
  </Card>
</CardGroup>

## ✅ Verification

After installation, verify everything is working:

```bash theme={null}
# Check version
nikcli --version

# Start NikCLI
nikcli

# Check available commands
/help

# Test basic functionality
/read package.json
```

<Note>
  The first run will create configuration files in `~/.nikcli/` and guide you through initial setup.
</Note>

## 🔐 Security Features

Our installers include built-in security measures:

<CardGroup cols={2}>
  <Card title="Verification" icon="shield-check">
    * Automatic Node.js version validation
    * Package manager detection and validation
    * Source verification from official npm registry
  </Card>

  <Card title="Safety" icon="lock">
    * No elevated privileges required
    * Fallback mechanisms for failed installations
    * No data collection or telemetry
  </Card>
</CardGroup>

## 🐛 Troubleshooting

### Common Issues

<AccordionGroup>
  <Accordion title="Permission Errors">
    **Problem:** Permission denied during global installation

    **Solutions:**

    ```bash theme={null}
    # Option 1: Use npm with --unsafe-perm
    npm install -g @nicomatt69/nikcli --unsafe-perm

    # Option 2: Use npx instead of global install
    npx @nicomatt69/nikcli

    # Option 3: Use local installation
    npm install @nicomatt69/nikcli
    npx nikcli
    ```
  </Accordion>

  <Accordion title="Node.js Version Issues">
    **Problem:** Node.js version too old

    **Solutions:**

    ```bash theme={null}
    # Check Node.js version
    node --version

    # Update Node.js (using nvm)
    nvm install 18
    nvm use 18

    # Or download from nodejs.org
    # https://nodejs.org/
    ```
  </Accordion>

  <Accordion title="Package Manager Conflicts">
    **Problem:** Multiple package managers causing conflicts

    **Solutions:**

    ```bash theme={null}
    # Clear npm cache
    npm cache clean --force

    # Clear yarn cache
    yarn cache clean

    # Clear pnpm cache
    pnpm store prune

    # Try with specific package manager
    curl -fsSL https://raw.githubusercontent.com/nikomatt69/nikcli-main/main/installer/install.sh | bash -s npm
    ```
  </Accordion>

  <Accordion title="Network Issues">
    **Problem:** Installation fails due to network issues

    **Solutions:**

    ```bash theme={null}
    # Use different registry
    npm install -g @nicomatt69/nikcli --registry https://registry.npmjs.org/

    # Use proxy if needed
    npm install -g @nicomatt69/nikcli --proxy http://proxy.company.com:8080

    # Try offline installation
    npm pack @nicomatt69/nikcli
    npm install -g nikcli-*.tgz
    ```
  </Accordion>
</AccordionGroup>

### Getting Help

If you encounter issues not covered here:

<CardGroup cols={2}>
  <Card title="GitHub Issues" icon="github">
    [Report bugs and request features](https://github.com/nikomatt69/nikcli-main/issues)
  </Card>

  <Card title="Documentation" icon="book">
    [Complete documentation](https://nikcli.mintlify.app)
  </Card>

  <Card title="Discord Community" icon="message-circle">
    [Join our community](https://discord.gg/nikcli)
  </Card>

  <Card title="Email Support" icon="mail">
    [support@nikcli.dev](mailto:support@nikcli.dev)
  </Card>
</CardGroup>

## 🎯 Next Steps

Once installation is complete:

<Steps>
  <Step title="Configure API Keys">
    Set up your AI provider API keys for full functionality
  </Step>

  <Step title="Try Your First Command">
    Start with simple file operations to get familiar
  </Step>

  <Step title="Explore Agent System">
    Learn about the Universal Agent and VM Agent
  </Step>

  <Step title="Master Advanced Features">
    Discover planning mode, parallel execution, and more
  </Step>
</Steps>

<CardGroup cols={2}>
  <Card title="First Steps" icon="play" href="/quickstart/first-steps">
    Learn basic commands and workflows
  </Card>

  <Card title="Configuration" icon="settings" href="/quickstart/configuration">
    Set up API keys and preferences
  </Card>
</CardGroup>
