Skip to main content

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

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

2. Check Your Setup

# View current configuration
/config

# List available AI models
/models

# Check agent status
/agents

3. Test Basic Functionality

# Read a file
/read package.json

# List directory contents
/ls

# Get help
/help

📚 Essential Commands

File Operations

Read Files

/read filename.txt
/read src/components/Button.tsx
/read package.json

Write Files

/write filename.txt "content here"
/write src/App.tsx "import React from 'react'"

List Directory

/ls
/ls src/
/ls --all

Search Files

/search "function"
/find-files "*.tsx"
/grep "import React"

Terminal Commands

Run Commands

/run npm install
/run git status
/run ls -la

Package Management

/npm install react
/npm run build
/install express

Git Operations

/git status
/git add .
/git commit -m "message"

System Info

/ps
/kill process-id
/diagnostic

🤖 Working with Agents

Universal Agent

The Universal Agent is your main development partner with 35+ capabilities:
# 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

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

🎯 Operating Modes

NikCLI has three operating modes accessible via Shift+Tab:

Default Chat Mode (💬)

Interactive conversation with manual confirmation:
# 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:
# 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:
# 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

1

Start NikCLI

nikcli
2

Create Component

/agent universal-agent "Create a reusable Button component with TypeScript, styled-components, and Jest tests"
3

Review Results

# Check what was created
/ls src/components/

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

# Check tests
/read src/components/Button.test.tsx
4

Run Tests

/run npm test Button.test.tsx

Example 2: Analyze Existing Code

1

Analyze Project

/agent universal-agent "Analyze this React project for code quality, performance issues, and security vulnerabilities"
2

Review Analysis

# The agent will provide detailed analysis including:
# - Code quality metrics
# - Performance bottlenecks
# - Security vulnerabilities
# - Improvement recommendations
3

Apply Fixes

/agent universal-agent "Fix the issues identified in the analysis and optimize the code"

Example 3: Full-Stack Development

1

Plan the Project

/plan "Create a task management app with React frontend, Node.js API, and PostgreSQL database"
2

Execute Backend

/agent universal-agent "Create the backend API with Express, PostgreSQL, and authentication"
3

Build Frontend

/agent universal-agent "Create the React frontend with task management features"
4

Integrate & Test

/agent universal-agent "Connect frontend to backend and add comprehensive testing"

🔧 Configuration

Set Up API Keys

# 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

# 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

# List all agents
/agents

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

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

Debug Issues

# Run diagnostics
/diagnostic

# Check system status
/monitor

# View logs
/logs

Performance Monitoring

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