v2.1.5 · Go · AGPL-3.0 License

Search commands.
Ask AI.
Ship faster.

An AI-powered command knowledge base with interactive CLI, web UI, and semantic vector search. Store, find, and understand commands — your way.

Download Binary Quick Start →
scmd --cli
scmd> show me postgresql replication examples
⟳ Extracting keywords: postgresql replication
⟳ Searching database... found 3 results (score: 85%)
━━━ AI-Enhanced Results ━━━━━━━━━━━━━━━━━━━━━━━━━
ID:42 - PostgreSQL streaming replication setup
pg_basebackup -h master -D /var/lib/postgresql/data -U replicator -Fp -Xs -P
scmd>
🌍

Our Mission: A Greener Developer Ecosystem

Today's IDEs are overwhelmingly heavy. They come packed with massive dependencies, require constant background interpreters, and consume excessive amounts of memory, CPU, and storage. All of this translates directly to a colossal, often ignored, carbon footprint.

The primary goal of SCMD-CLI is to change this paradigm. We believe developers shouldn't have to sacrifice our planet to write great code. By building a lightning-fast, dependency-free binary in Go, we deliver all the advanced agentic features you expect from a modern CLI AI Assistant, but with a drastically smaller environmental impact.

Beyond just a lightweight runtime, we are building local intelligence directly into the application to minimize reliance on heavy cloud AI models where possible. And because we believe in transparency and community-driven impact, the entire project is 100% open source.

Let's write incredible code, while leaving a smaller footprint behind.

3
Interfaces
2
AI Providers
2
Database Backends
13
Slash Commands
5
Platforms
1
Single Binary

Why SCMD?

A single binary that replaces bookmarks, wikis, and scattered notes for your command-line knowledge.

🔍

Smart Search Pipeline

Keyword search → intelligent scoring → vector similarity → AI fallback. Always finds what you need, even with vague queries.

🤖

Dual AI Providers

Ollama for local/private inference, Google Gemini for cloud power. Automatic fallback between providers. Separate chat and embedding models.

🧠

Semantic Vector Search

pgvector embeddings for PostgreSQL, cosine similarity for SQLite. Understands meaning, not just keywords. Configurable dimensions (384, 768+).

💻

Three Interfaces

Interactive CLI with slash commands, traditional scriptable CLI with JSON output, and a full web UI with syntax highlighting and auth.

🗄️

PostgreSQL + SQLite

Enterprise PostgreSQL with pgvector for teams, or lightweight SQLite for personal use. Interactive setup wizards for both.

🔒

Secure by Default

SSL/TLS, session-based auth with 24h expiry, HTTP-only cookies, read-only mode, and SameSite protection for the web UI.

AI-Powered Search Pipeline

Every query flows through an intelligent multi-stage pipeline that always finds the best answer.

01 User Query ───────────────────────────────────
02 → NLP Keyword Extraction (stop-word removal)
03 → PostgreSQL ILIKE Search (AND/OR pattern matching)
04 → Score & Rank Results (word-match percentage)
05 → Score ≥ 60%? ✓ Return ranked results
06 → Score < 60%? → Vector Similarity Search (pgvector/cosine)
07 → Still low? → Pure AI Chat Response (Ollama/Gemini)
🦙

Ollama

LOCAL
  • ✦ Self-hosted, privacy-first
  • ✦ No API costs
  • ✦ Chat + embedding models
  • ✦ Configurable host & port

Google Gemini

CLOUD
  • ✦ High-quality responses
  • ✦ Free tier: 1,500 req/day
  • ✦ Chat + embedding models
  • ✦ Automatic fallback

Three Ways to Search

Pick the interface that fits your workflow.

01

Interactive CLI

scmd --cli
# Natural language queries
scmd> show me docker compose examples
# Slash commands
scmd> /search kubernetes deployment
scmd> /add "git stash pop" "Restore stashed changes"
scmd> /ai
✓ Ollama (host: localhost, model: ministral-3:3b)
scmd> /import ./runbook.md
✓ Imported: "Production Runbook" (with embeddings)
/search /add /list /count /delete /show /help /import /run /ai /config /embeddings /generate
02

Traditional CLI

scmd --search
# AND logic — all words must match
$ scmd --search "postgresql replication slave"
# OR logic — any pattern matches
$ scmd --search "docker,kubernetes,terraform"
# Save a new command
$ scmd --save "docker ps -a" "List all containers"
# Import markdown docs
$ scmd --import ./disaster-recovery.md
# Export to JSON
$ scmd --copydb backup.json
03

Web UI

scmd --web
$ scmd --web # port 3333, opens browser
$ scmd --web -port 8080 # custom port
$ scmd --web -port 8080 -service # headless mode
$ scmd --web -block # read-only mode
$ scmd --ssl cert.pem key.pem # HTTPS

Real-time search, syntax highlighting, AI explanations, session auth, duplicate detection, and markdown rendering — all in the browser.

Pick Your Database

🐘 PostgreSQL

Type Client-server
Vector Search pgvector
Multi-user ✓ Yes
Setup --create-db-postgresql
Best for Teams & enterprise

📦 SQLite

Type File-based
Vector Search Go cosine sim
Multi-user ✗ Single
Setup --create-db-sqlite
Best for Personal & offline

Built For Real Workflows

devops
Command Library
Docker, K8s, Terraform, Ansible — all searchable in one place.
team
Knowledge Base
Shared PostgreSQL backend for team-wide command reference and onboarding.
docs
Documentation Hub
Import markdown runbooks and SOPs, search with natural language.
ai
AI-Assisted Learning
Ask natural language questions, get AI explanations with real command context.
incident
Incident Response
Quickly find recovery commands during outages. Seconds matter.
offline
Air-Gapped Environments
SQLite + Ollama for fully offline, private, zero-dependency operation.
automation
CI/CD Integration
Script-friendly CLI with JSON output for pipeline automation.
snippets
Code Snippet Manager
Store reusable code blocks for any language with syntax highlighting.

Get Started in 60 Seconds

1

Download or build

# Download pre-built binary (Linux example)
$ curl -LO https://github.com/gcclinux/scmd/releases/latest/download/scmd-Linux-x86_64
$ chmod +x scmd-Linux-x86_64
# Or build from source
$ git clone https://github.com/gcclinux/scmd.git && cd scmd
$ go build -o scmd ./cmd/scmd/
# Or use Docker
$ docker run -p 8080:8080 gcclinux/scmd:latest --web -port 8080 -service
2

Configure

$ mkdir -p ~/.scmd
$ cp config.json.example ~/.scmd/config.json
# Or use the interactive setup wizards:
$ scmd --create-db-postgresql # or --create-db-sqlite
$ scmd --server-ollama # or --server-gemini
3

Search

$ scmd --cli # interactive mode
$ scmd --search "docker,kubernetes" # quick search
$ scmd --web # web UI
4

Interactive

1
Search Command
Type a natural language query or use keywords to find commands
2
AI Identifies
AI persona analyzes results and provides recommendations
3
Select Code Block
Pick from numbered options [1] [2] [3] to execute
4
Execute & Output
Loads user profile and displays the command output
search AI match select [1,2,3] output
scmd --cli (execute)
SCMD interactive CLI executing a command with AI-powered code block selection
scmd --help
SCMD CLI help menu showing available commands and options

Search → AI identifies the best match → select a code block to run → see the output with your profile loaded.

Available Platforms

🪟 Windows AMD64
🐧 Linux AMD64
🐧 Linux ARM64
🍎 macOS Intel
🍎 macOS ARM64
🐳 Docker

Architecture

┌─────────────────────────────────────────────────┐
                 SCMD v2.1.5                   
├─────────────┬──────────────┬────────────────────┤
 Interactive   Traditional       Web UI         
 CLI           CLI            (HTTP/HTTPS)      
├─────────────┴──────────────┴────────────────────┤
              Core Engine                        
  ┌──────────┐ ┌──────────┐ ┌──────────────────┐ 
   Search   │ │ Scoring  │ │ Keyword Extract   
   Engine   │ │ System   │ │ (NLP)             
  └──────────┘ └──────────┘ └──────────────────┘ 
├──────────────────────────────────────────────────┤
              AI Layer                           
  ┌──────────────────┐ ┌───────────────────────┐ 
   Ollama (Local)   │ │ Gemini (Cloud)         
   Chat + Embedding │ │ Chat + Embedding       
  └──────────────────┘ └───────────────────────┘ 
├──────────────────────────────────────────────────┤
              Data Layer                         
  ┌──────────────────┐ ┌───────────────────────┐ 
   PostgreSQL       │ │ SQLite                 
   + pgvector       │ │ + cosine similarity    
  └──────────────────┘ └───────────────────────┘ 
└──────────────────────────────────────────────────┘