Skip to content

Installation

Sagheer edited this page Dec 7, 2025 · 1 revision

Installation Guide

Get QuickCMD up and running in minutes!


πŸ“‹ Prerequisites

  • Go 1.21+ - Download
  • Docker (optional) - For sandbox execution
  • Git - For cloning repository

πŸš€ Quick Install

Linux/macOS (One-Line Install)

curl -sSL https://raw.githubusercontent.com/SagheerAkram/QuickCmd/main/install.sh | bash

This will:

  1. Download the latest release
  2. Install to /usr/local/bin
  3. Set up configuration directory
  4. Verify installation

πŸ”§ Installation Methods

Method 1: Build from Source (Recommended)

# 1. Clone repository
git clone https://github.com/SagheerAkram/QuickCmd.git
cd QuickCmd

# 2. Build CLI
make build

# 3. Build agent (optional)
make build-agent

# 4. Install globally
sudo make install

# 5. Verify
quickcmd --version

Method 2: Pre-built Binaries

# Download CLI
curl -L https://github.com/SagheerAkram/QuickCmd/releases/latest/download/quickcmd-linux-amd64 -o quickcmd
chmod +x quickcmd
sudo mv quickcmd /usr/local/bin/

# Download agent (optional)
curl -L https://github.com/SagheerAkram/QuickCmd/releases/latest/download/quickcmd-agent-linux-amd64 -o quickcmd-agent
chmod +x quickcmd-agent
sudo mv quickcmd-agent /usr/local/bin/

Method 3: Docker

# Pull image
docker pull sagheerakram/quickcmd:latest

# Create alias
echo "alias quickcmd='docker run -it --rm sagheerakram/quickcmd'" >> ~/.bashrc
source ~/.bashrc

# Use it
quickcmd "find large files"

Method 4: Go Install

go install github.com/SagheerAkram/QuickCmd/cmd/quickcmd@latest
go install github.com/SagheerAkram/QuickCmd/cmd/quickcmd-agent@latest

βœ… Verify Installation

# Check version
quickcmd --version
# QuickCMD v2.0.0

# Test basic command
quickcmd "list files"
# Should show: ls -la

# Check configuration
quickcmd config show

🎨 Web UI Installation (Optional)

# Navigate to web frontend
cd web/frontend

# Install dependencies
npm install

# Build production bundle
npm run build

# Start web server
cd ../..
./bin/quickcmd-web --port 3000

Access at: http://localhost:3000


🐳 Docker Setup (Optional)

For sandbox execution:

# Install Docker
curl -fsSL https://get.docker.com | sh

# Add user to docker group
sudo usermod -aG docker $USER

# Logout and login again

# Verify Docker
docker --version

πŸ“ Directory Structure

After installation, QuickCMD creates:

~/.quickcmd/
β”œβ”€β”€ config.yaml          # User configuration
β”œβ”€β”€ policy.yaml          # Security policies
β”œβ”€β”€ audit.db             # Command history
└── plugins/             # Custom plugins

βš™οΈ Initial Configuration

Create default configuration:

# Generate config
quickcmd init

# Edit configuration
nano ~/.quickcmd/config.yaml

Basic config.yaml:

default_mode: sandbox
auto_approve_safe: true
show_confidence: true
enable_learning_mode: true

πŸ”’ Security Setup

Create security policy:

# Generate default policy
quickcmd policy init

# Edit policy
nano ~/.quickcmd/policy.yaml

Basic policy.yaml:

denylist:
  - pattern: "rm -rf /"
    reason: "Prevents root deletion"

approval_required:
  - pattern: "kubectl.*production"
    reason: "Production needs approval"

🚦 Next Steps

  1. Quick Start Tutorial - Learn basic usage
  2. Configuration Guide - Customize QuickCMD
  3. Security Setup - Configure policies
  4. Examples - See real-world use cases

πŸ†˜ Troubleshooting

Command Not Found

# Check PATH
echo $PATH

# Add to PATH
export PATH=$PATH:/usr/local/bin

# Make permanent
echo 'export PATH=$PATH:/usr/local/bin' >> ~/.bashrc

Permission Denied

# Fix permissions
sudo chown -R $USER:$USER ~/.quickcmd

# Or run with sudo
sudo quickcmd "command"

Docker Issues

# Check Docker
docker ps

# Restart Docker
sudo systemctl restart docker

# Check user in docker group
groups $USER

πŸ“ž Need Help?