> ## 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.

# First Steps

> Learn the basics of NikCLI with interactive examples and hands-on tutorials

# First Steps with NikCLI

Welcome to NikCLI! This guide will walk you through the essential commands and workflows to get you productive quickly.

## 🚀 Quick Start

### 1. Launch NikCLI

```bash theme={null}
nikcli
```

You'll see the NikCLI interface with a welcome message and available commands.

### 2. Check Your Setup

```bash theme={null}
# View current configuration
/config

# List available AI models
/models

# Check agent status
/agents
```

### 3. Test Basic Functionality

```bash theme={null}
# Read a file
/read package.json

# List directory contents
/ls

# Get help
/help
```

## 📚 Essential Commands

### File Operations

<CardGroup cols={2}>
  <Card title="Read Files" icon="file-text">
    ```bash theme={null}
    /read filename.txt
    /read src/components/Button.tsx
    /read package.json
    ```
  </Card>

  <Card title="Write Files" icon="edit">
    ```bash theme={null}
    /write filename.txt "content here"
    /write src/App.tsx "import React from 'react'"
    ```
  </Card>

  <Card title="List Directory" icon="folder">
    ```bash theme={null}
    /ls
    /ls src/
    /ls --all
    ```
  </Card>

  <Card title="Search Files" icon="search">
    ```bash theme={null}
    /search "function"
    /find-files "*.tsx"
    /grep "import React"
    ```
  </Card>
</CardGroup>

### Terminal Commands

<CardGroup cols={2}>
  <Card title="Run Commands" icon="terminal">
    ```bash theme={null}
    /run npm install
    /run git status
    /run ls -la
    ```
  </Card>

  <Card title="Package Management" icon="package">
    ```bash theme={null}
    /npm install react
    /npm run build
    /install express
    ```
  </Card>

  <Card title="Git Operations" icon="git-branch">
    ```bash theme={null}
    /git status
    /git add .
    /git commit -m "message"
    ```
  </Card>

  <Card title="System Info" icon="monitor">
    ```bash theme={null}
    /ps
    /kill process-id
    /diagnostic
    ```
  </Card>
</CardGroup>

## 🤖 Working with Agents

### Universal Agent

The Universal Agent is your main development partner with 35+ capabilities:

```bash theme={null}
# Basic agent usage
/agent universal-agent "Create a simple React component"

# More complex tasks
/agent universal-agent "Build a complete authentication system with React frontend and Node.js backend"

# Code analysis
/agent universal-agent "Analyze this codebase for performance issues and suggest optimizations"
```

### Agent Capabilities

<AccordionGroup>
  <Accordion title="Frontend Development">
    ```bash theme={null}
    # React components
    /agent universal-agent "Create a responsive navigation component with TypeScript"

    # Next.js applications
    /agent universal-agent "Build a Next.js blog with MDX support and dark mode"

    # UI/UX optimization
    /agent universal-agent "Improve the accessibility and performance of this React app"
    ```
  </Accordion>

  <Accordion title="Backend Development">
    ```bash theme={null}
    # API development
    /agent universal-agent "Create a REST API for user management with JWT authentication"

    # Database integration
    /agent universal-agent "Set up PostgreSQL with Prisma ORM and create user schema"

    # Microservices
    /agent universal-agent "Design a microservices architecture for e-commerce platform"
    ```
  </Accordion>

  <Accordion title="DevOps & Deployment">
    ```bash theme={null}
    # Docker setup
    /agent universal-agent "Create Docker configuration for this Node.js application"

    # CI/CD pipeline
    /agent universal-agent "Set up GitHub Actions workflow for automated testing and deployment"

    # Kubernetes deployment
    /agent universal-agent "Create Kubernetes manifests for production deployment"
    ```
  </Accordion>
</AccordionGroup>

## 🎯 Operating Modes

NikCLI has three operating modes accessible via `Shift+Tab`:

### Default Chat Mode (💬)

Interactive conversation with manual confirmation:

```bash theme={null}
# Example: Creating a file with confirmation
/write src/components/Button.tsx
# → Shows preview
# → Asks for confirmation
# → Explains what will be created
```

### Planning Mode (📋)

Strategic planning with comprehensive execution plans:

```bash theme={null}
# Switch to planning mode
/plan

# Create a project plan
/plan "Build a complete e-commerce platform"

# View todos
/todo
```

### Auto Mode (🤖)

Autonomous execution with minimal intervention:

```bash theme={null}
# Switch to auto mode
/auto

# Execute tasks autonomously
/auto "Create a React component with tests and documentation"
```

## 🛠️ Practical Examples

### Example 1: Create a React Component

<Steps>
  <Step title="Start NikCLI">
    ```bash theme={null}
    nikcli
    ```
  </Step>

  <Step title="Create Component">
    ```bash theme={null}
    /agent universal-agent "Create a reusable Button component with TypeScript, styled-components, and Jest tests"
    ```
  </Step>

  <Step title="Review Results">
    ```bash theme={null}
    # Check what was created
    /ls src/components/

    # Read the component
    /read src/components/Button.tsx

    # Check tests
    /read src/components/Button.test.tsx
    ```
  </Step>

  <Step title="Run Tests">
    ```bash theme={null}
    /run npm test Button.test.tsx
    ```
  </Step>
</Steps>

### Example 2: Analyze Existing Code

<Steps>
  <Step title="Analyze Project">
    ```bash theme={null}
    /agent universal-agent "Analyze this React project for code quality, performance issues, and security vulnerabilities"
    ```
  </Step>

  <Step title="Review Analysis">
    ```bash theme={null}
    # The agent will provide detailed analysis including:
    # - Code quality metrics
    # - Performance bottlenecks
    # - Security vulnerabilities
    # - Improvement recommendations
    ```
  </Step>

  <Step title="Apply Fixes">
    ```bash theme={null}
    /agent universal-agent "Fix the issues identified in the analysis and optimize the code"
    ```
  </Step>
</Steps>

### Example 3: Full-Stack Development

<Steps>
  <Step title="Plan the Project">
    ```bash theme={null}
    /plan "Create a task management app with React frontend, Node.js API, and PostgreSQL database"
    ```
  </Step>

  <Step title="Execute Backend">
    ```bash theme={null}
    /agent universal-agent "Create the backend API with Express, PostgreSQL, and authentication"
    ```
  </Step>

  <Step title="Build Frontend">
    ```bash theme={null}
    /agent universal-agent "Create the React frontend with task management features"
    ```
  </Step>

  <Step title="Integrate & Test">
    ```bash theme={null}
    /agent universal-agent "Connect frontend to backend and add comprehensive testing"
    ```
  </Step>
</Steps>

## 🔧 Configuration

### Set Up API Keys

```bash theme={null}
# Set Anthropic API key
/set-key anthropic sk-ant-api03-...

# Set OpenAI API key
/set-key openai sk-...

# Set Google API key
/set-key google AIza...

# Check configuration
/config
```

### Configure Agent Behavior

```bash theme={null}
# Set creativity level (0.0 = focused, 2.0 = creative)
/temp 0.7

# Set system prompt
/system "You are a senior React developer specializing in TypeScript"

# Enable/disable history
/history on
```

## 📊 Monitoring & Debugging

### View Agent Status

```bash theme={null}
# List all agents
/agents

# Check agent metrics
/agent universal-agent --metrics

# View agent capabilities
/agent universal-agent --capabilities
```

### Debug Issues

```bash theme={null}
# Run diagnostics
/diagnostic

# Check system status
/monitor

# View logs
/logs
```

### Performance Monitoring

```bash theme={null}
# View usage statistics
/stats

# Check token usage
/tokens

# Monitor memory usage
/memory
```

## 🎯 Best Practices

### 1. Start Simple

Begin with basic file operations and gradually move to complex agent tasks:

```bash theme={null}
# Start with simple commands
/read package.json
/ls src/

# Move to agent tasks
/agent universal-agent "Create a simple component"
```

### 2. Use Planning Mode for Complex Projects

For large projects, use planning mode to break down tasks:

```bash theme={null}
/plan "Build a complete application"
# → Creates detailed execution plan
# → Generates todo.md
# → Sets up approval workflow
```

### 3. Leverage Agent Capabilities

Understand what each agent can do:

```bash theme={null}
# Check agent capabilities
/agents

# Use specific capabilities
/agent universal-agent "Optimize this code for performance"
/agent universal-agent "Add comprehensive testing to this project"
```

### 4. Monitor and Learn

Use monitoring tools to understand performance:

```bash theme={null}
# Check metrics
/stats

# View agent performance
/agent universal-agent --metrics

# Learn from patterns
/agent universal-agent --learn
```

## 🚀 Next Steps

Now that you understand the basics, explore advanced features:

<CardGroup cols={2}>
  <Card title="Agent System" icon="robot" href="/agent-system/architecture">
    Deep dive into cognitive orchestration
  </Card>

  <Card title="Command Reference" icon="terminal" href="/cli-reference/commands-overview">
    Master all 70+ commands
  </Card>

  <Card title="Advanced Features" icon="zap" href="/features/vim-mode">
    Vim integration, VM operations, and more
  </Card>

  <Card title="Examples & Tutorials" icon="book" href="/examples/basic-workflows">
    Learn through practical examples
  </Card>
</CardGroup>

<Tip>
  **Pro Tip:** Use `/help` at any time to see all available commands. NikCLI is context-aware and will show relevant options based on your current project and mode.
</Tip>
