ai-cmd
AI-powered command-line interface for natural language command execution
Version: 9.8.4 | Size: 64.9MB | Author: Warith Al Maawali
License: Proprietary | Website: https://www.digi77.com
File Information
| Property | Value |
|---|---|
| Binary Name | ai-cmd |
| Version | 9.8.4 |
| Build Date | REDACTED-BUILD-TIME |
| Rust Version | 1.82.0 |
| File Size | 64.9MB |
| Author | Warith Al Maawali |
| License | Proprietary |
| Category | Kodachi Binary |
| Description | AI-powered command-line interface for natural language command execution |
| Git Commit | unknown |
| Metadata Generated | 2026-06-28T11:16:43Z |
| Binary Timestamp | Unknown |
| JSON Data | View Raw JSON |
SHA256 Checksum
395cb5ae0f48cb7d87ac7e4952421e441d88ce25c886ab3007b4d8a9e4087e75
Features
| # | Feature |
|---|---|
| 1 | Advanced functionality for Kodachi OS |
Security Features
| Feature | Description |
|---|---|
| Input Validation | Argument parsing via clap; per-command validation is the consumer's responsibility |
| Rate Limiting | Not provided by cli-core |
| Authentication | Not provided by cli-core (see online-auth) |
| Encryption | Not provided by cli-core |
System Requirements
| Requirement | Value |
|---|---|
| OS | Linux (Debian-based) |
| Privileges | root/sudo for system operations |
| Dependencies | OpenSSL, libcurl |
Global Options
| Flag | Description |
|---|---|
-h, --help |
Print help information |
-v, --version |
Print version information |
-n, --info |
Display detailed information |
-e, --examples |
Show usage examples |
--json |
Output in JSON format |
-o, --output-format <FORMAT> |
Force output format (text|json) |
--json-pretty |
Pretty-print JSON output with indentation |
--json-human |
Enhanced JSON output with improved formatting (like jq) |
--fields <FIELD_LIST> |
Select specific fields to include in output (comma-separated) |
--limit <NUMBER> |
Limit number of results returned |
--offset <NUMBER> |
Skip first N results (for pagination) |
-d, --work-dir <PATH> |
Working directory (defaults to auto-detected base directory) |
--port <PORT> |
Set custom port number (1024-65535) |
--log-level <LEVEL> |
Set log level (error|warn|info|debug) |
--verbose |
Enable verbose output |
--quiet |
Suppress non-essential output |
--no-color |
Disable colored output |
--config <FILE> |
Use custom configuration file |
--timeout <SECS> |
Set operation timeout in seconds (optional; no default applied) |
--retry <COUNT> |
Retry attempts (optional; no default applied) |
Commands
Commands
query
Process a natural language query and execute the matching command
Usage:
ai-cmd query "<natural language query>"
Options:
--threshold: Confidence threshold for execution--dry-run: Preview without execution--auto-execute: Auto-execute high confidence matches--engine: AI engine tier: auto, tfidf, onnx, onnx-classifier, llm, mistral, genai, claude--model-path: Path to GGUF model for local LLM tier--stream: Stream response tokens in real-time--temperature: Sampling temperature 0.0-2.0 (default: 0.7)--model: Model name for GenAI tier (supports local, OpenAI/Codex, Claude, Gemini, OpenRouter routing)--tor-proxy: Route cloud providers through Tor proxy--use: Use a specific GGUF model file from models/ directory--no-gateway, --skip-gateway: Bypass gateway validation (dry-run only; rejected for live execution)
Examples:
ai-cmd query "check network connectivity"
ai-cmd query "start tor service" --dry-run
ai-cmd query "get my ip address" --json
ai-cmd query "block internet" --threshold 0.8
ai-cmd query "check tor" --engine onnx
ai-cmd query "check tor" --engine mistral
ai-cmd query "check tor" --engine mistral --json
ai-cmd query "check tor status" --no-gateway --dry-run
ai-cmd query "check tor status" --skip-gateway --dry-run
ai-cmd query "check tor status" --engine genai --model gpt-4o-mini --dry-run
ai-cmd query "check tor status" --engine genai --model claude-sonnet-4-5 --tor-proxy --dry-run
interactive
Start interactive REPL mode for continuous queries
Usage:
ai-cmd interactive
Options:
--threshold: Confidence threshold for execution--engine: AI engine tier: auto, tfidf, onnx, llm, claude--model-path: Path to GGUF model for local LLM tier
Examples:
ai-cmd interactive
ai-cmd interactive --threshold 0.8
ai-cmd interactive --engine onnx
ai-cmd interactive --engine claude --threshold 0.7
ai-cmd interactive --engine llm --model-path ./models/phi.gguf
ai-cmd interactive --engine genai
feedback
Submit feedback to improve intent classification
Usage:
ai-cmd feedback "<query>" [OPTIONS]
Options:
--correct-intent: Specify the correct intent ID--correct-command: Specify the correct command--comment: Add a comment
Examples:
ai-cmd feedback "check network" --correct-intent network_check
ai-cmd feedback "test internet" --correct-command "health-control net-check"
ai-cmd feedback "my ip" --comment "Should show IP address"
preview
Preview intent classification without execution
Usage:
ai-cmd preview "<query>"
Options:
--alternatives: Number of alternative matches to show
Examples:
ai-cmd preview "check network"
ai-cmd preview "stop tor" --alternatives 5
ai-cmd preview "block internet" --json
voice
Voice input mode for natural language queries
Usage:
ai-cmd voice [OPTIONS]
Options:
--continuous: Enable continuous listening mode--timeout: Timeout for voice input in seconds--provider: STT provider: whisper-cpp, vosk, placeholder, auto--voice: TTS voice name--speed: Speech speed (words per minute)--list-devices: List available audio devices--check-deps: Check voice engine dependencies
Examples:
ai-cmd voice
ai-cmd voice --continuous
ai-cmd voice --timeout 60
ai-cmd voice --provider whisper-cpp
ai-cmd voice --voice en-us --speed 200
ai-cmd voice --list-devices
ai-cmd voice --check-deps
suggest
Get proactive command suggestions based on usage patterns
Usage:
ai-cmd suggest [OPTIONS]
Options:
--limit: Number of suggestions to show--proactive: Show proactive suggestions
Examples:
ai-cmd suggest
ai-cmd suggest --limit 10
ai-cmd suggest --proactive
workflow
Execute workflow profiles via natural language queries
Usage:
ai-cmd workflow [OPTIONS]
tiers
List all AI engine tiers and their availability status
Usage:
ai-cmd tiers [--json]
Examples:
ai-cmd tiers
ai-cmd tiers --json
tools
List all callable AI tools with parameter schemas
Usage:
ai-cmd tools [--json]
Examples:
ai-cmd tools
ai-cmd tools --json
providers
List available GenAI providers and model configuration
Usage:
ai-cmd providers [--json]
Examples:
ai-cmd providers
ai-cmd providers --json
model-info
Show loaded AI model details and configuration
Usage:
ai-cmd model-info [--json]
Examples:
ai-cmd model-info
ai-cmd model-info --json
policy
Show current AI policy (intent thresholds, tool allowlist, risk mode)
Usage:
ai-cmd policy [--json]
Examples:
ai-cmd policy
ai-cmd policy --json
export-intents
Export all intents as JSON catalog for shared libraries
Usage:
ai-cmd export-intents [--output FILE] [--json]
Examples:
ai-cmd export-intents
ai-cmd export-intents --output intent-catalog.json
ai-cmd export-intents --json
Operational Scenarios
Scenario-oriented workflows generated from the binary's built-in -e --json examples.
Scenario 1: Basic Usage
Basic natural language queries (safe mode examples)
Step 1: Check network status using natural language
ai-cmd query "check network connectivity" --dry-run
Step 2: Get IP address query result with JSON output
ai-cmd query "what is my ip address" --dry-run --json
Scenario 2: Advanced Features
Advanced query options and preview workflows
Step 1: Preview command execution without running
ai-cmd query "start tor service" --dry-run
Step 2: Show interactive mode usage
ai-cmd interactive --help
Step 3: Preview intent matching with alternatives
ai-cmd preview "block internet" --alternatives 5
Step 4: Use custom confidence threshold with dry-run
ai-cmd query "test dns leak" --threshold 0.8 --dry-run
Scenario 3: Feedback System
Feedback command syntax and usage patterns
Step 1: Show feedback syntax for intent correction
ai-cmd feedback "check network" --correct-intent network_check --help
Step 2: Show feedback syntax for command correction
ai-cmd feedback "check tor" --correct-command "tor-switch tor-status" --help
Step 3: Show feedback syntax for comments
ai-cmd feedback "check tor" --comment "Should use tor-status subcommand" --help
Scenario 4: Voice Input
Voice command usage, diagnostics, and device checks
Step 1: Show voice mode usage and options
ai-cmd voice --help
Step 2: Show continuous voice mode usage
ai-cmd voice --continuous --help
Step 3: Show timeout option usage
ai-cmd voice --timeout 10 --help
Step 4: Show provider selection usage
ai-cmd voice --provider vosk --help
Step 5: List available audio input devices
ai-cmd voice --list-devices
Step 6: Check voice dependencies
ai-cmd voice --check-deps
Scenario 5: AI Suggestions
Get command suggestions based on usage patterns
Step 1: Get recent command suggestions
ai-cmd suggest
Step 2: Get proactive suggestions
ai-cmd suggest --proactive
Step 3: Limit number of suggestions
ai-cmd suggest --limit 5
Scenario 6: Interactive Mode
Interactive REPL usage and configuration options
Step 1: Show interactive mode usage
ai-cmd interactive --help
Step 2: Show threshold usage in interactive mode
ai-cmd interactive --threshold 0.8 --help
Step 3: Show ONNX engine interactive usage
ai-cmd interactive --engine onnx --help
Step 4: Show Claude interactive syntax
ai-cmd interactive --engine claude --threshold 0.7 --help
Step 5: Show local LLM interactive syntax
ai-cmd interactive --engine llm --model-path ./models/phi.gguf --help
Scenario 7: AI Engine Tiers
Select specific AI engine tiers for query processing
Step 1: Auto-select best available engine tier
ai-cmd query "check tor" --engine auto --dry-run
Step 2: Use TF-IDF keyword matching tier
ai-cmd query "check tor" --engine tfidf --dry-run
Step 3: Use ONNX semantic matching tier
ai-cmd query "check tor" --engine onnx --dry-run
Step 4: Show Mistral tier syntax and options
ai-cmd query "check tor" --engine mistral --help
Step 5: Show GenAI tier syntax and options
ai-cmd query "check tor" --engine genai --help
Step 6: Show legacy LLM tier syntax
ai-cmd query "check tor" --engine llm --help
Step 7: Show custom model-path syntax
ai-cmd query "check tor" --engine llm --model-path ./models/phi.gguf --help
Step 8: Show Claude tier syntax and options
ai-cmd query "check tor" --engine claude --help
Step 9: ONNX engine with dry-run preview
ai-cmd query "check tor status" --engine onnx --dry-run
Step 10: ONNX engine dry-run validation
ai-cmd query "test dns leak" --engine onnx --dry-run
Step 11: Show all available AI tiers and status
ai-cmd tiers
Scenario 8: Mistral.rs Local LLM
Mistral tier command syntax and diagnostics
Step 1: Show local mistral query syntax
ai-cmd query "is my system secure?" --engine mistral --help
Step 2: Show mistral streaming syntax
ai-cmd query "check all services" --engine mistral --stream --help
Step 3: Show mistral temperature option usage
ai-cmd query "run dns leak test" --engine mistral --temperature 0.3 --help
Step 4: Show loaded model details and tier metadata
ai-cmd model-info --json
Scenario 9: Ollama / GenAI Provider
GenAI tier syntax and provider discovery
Step 1: Show genai query syntax
ai-cmd query "analyze my network" --engine genai --help
Step 2: Show genai model override syntax
ai-cmd query "security audit" --engine genai --model llama3:8b --help
Step 3: List available providers and models
ai-cmd providers --json
Step 4: Show OpenAI/Codex model syntax with tor-proxy flag
ai-cmd query "detailed analysis" --engine genai --model gpt-4o-mini --tor-proxy --help
Step 5: Show Claude model syntax (direct key or OpenRouter fallback)
ai-cmd query "check tor status" --engine genai --model claude-sonnet-4-5 --dry-run
Step 6: Show Gemini model syntax (direct key or OpenRouter fallback)
ai-cmd query "check dns status" --engine genai --model gemini-2.0-flash --dry-run
Scenario 10: Tool Calling
Tool-calling queries and tool catalog inspection
Step 1: Tool-calling query in safe dry-run mode
ai-cmd query "what's my tor status and dns config?" --dry-run
Step 2: List all callable tools with JSON metadata
ai-cmd tools --json
Step 3: Show tools grouped by domain
ai-cmd tools
Step 4: Export the full intent catalog to a JSON file for shared libraries
ai-cmd export-intents --output intent-catalog.json
Note
Output path is relative to the current directory; absolute paths and '..' are rejected. Omit --output to print to stdout, or add --json for an envelope summary.
Scenario 11: Security-First Routing
Fast-path and fallback-path routing examples
Step 1: Fast-path style query with dry-run
ai-cmd query "check tor status" --dry-run
Step 2: Show slow-path mistral syntax
ai-cmd query "explain tor routing in detail" --engine mistral --help
Step 3: Configuration change flow with safety preview
ai-cmd query "change dns to cloudflare" --dry-run
Scenario 12: AI Policy
View and manage AI policy configuration including intent thresholds, tool allowlists, and risk mode.
Step 1: Show current AI policy (thresholds, tools, risk mode)
ai-cmd policy
Step 2: AI policy as JSON for programmatic use
ai-cmd policy --json
Scenario 13: Model Management
Download, list, and select GGUF models for local LLM inference
Step 1: Show syntax for selecting a specific GGUF model file
ai-cmd query "check tor" --use Qwen3-1.7B-Q4_K_M.gguf --help
Note
Use --use without --help when the model file exists in models/
Step 2: Show details of loaded model
ai-cmd model-info --json
Step 3: Show all AI tiers including model availability
ai-cmd tiers --json
Scenario 14: Linux System Commands
General-purpose Linux system commands via natural language
Step 1: Disk usage request preview
ai-cmd query "how much disk space" --dry-run
Step 2: Process listing request preview
ai-cmd query "list running processes" --dry-run
Step 3: Network port check request preview
ai-cmd query "check if port 80 is open" --dry-run
Step 4: Safe preview of package update flow
ai-cmd query "update system packages" --dry-run
Note
Remove --dry-run to execute after authentication
Step 5: Network diagnostic request preview
ai-cmd query "ping google" --dry-run
Step 6: Log viewing with explicit TF-IDF engine
ai-cmd query "show system logs" --engine tfidf --dry-run
Step 7: Service management query with strict confidence threshold
ai-cmd query "restart nginx service" --threshold 0.9 --dry-run
Step 8: Firewall inspection query preview
ai-cmd query "check firewall rules" --dry-run
Scenario 15: Confidence Threshold Reference
The --threshold flag controls minimum confidence required for a match. Range: 0.3 to 1.0. Default: 0.6.
Step 1: Minimum threshold for broad matching
ai-cmd query "check tor" --threshold 0.3 --dry-run
Step 2: Default threshold balance
ai-cmd query "check tor" --threshold 0.6 --dry-run
Step 3: Higher threshold for sensitive operations
ai-cmd query "block internet" --threshold 0.8 --dry-run
Step 4: Very strict threshold for near-exact matching
ai-cmd query "check tor" --threshold 0.95 --dry-run
Scenario 16: Workflow Profiles
Execute multi-step workflow profiles for complete operations
Step 1: List all available workflow profiles
ai-cmd workflow --list
Step 2: Preview privacy workflow profile
ai-cmd workflow "maximum privacy setup" --preview
Note
Use without --preview to execute after review
Step 3: Preview emergency recovery workflow
ai-cmd workflow "emergency recovery" --preview
Step 4: Dry-run workflow execution
ai-cmd workflow "setup network" --dry-run
Step 5: Preview with custom confidence threshold
ai-cmd workflow "tor setup" --threshold 0.7 --preview
Step 6: Show workflow registry statistics
ai-cmd workflow --stats
Step 7: Preview workflow with custom parameters
ai-cmd workflow "complete anonymity" --param country=us --preview
Note
Pass key=value pairs for profile parameters
Scenario 17: Setup & Model Management
Download AI models and manage engine tiers (via ai-trainer)
Step 1: List all AI engine tiers and their availability
ai-cmd tiers
Note
Shows setup hints for unavailable tiers
Step 2: Show active model paths and availability across AI tiers
ai-cmd model-info
Note
Useful before running complex queries
Step 3: Get model inventory in JSON format
ai-cmd model-info --json
Note
Suitable for automation checks
Step 4: List available provider backends
ai-cmd providers
Step 5: List providers in JSON format
ai-cmd providers --json
Note
Includes fields useful for health checks
Step 6: Show AI tier readiness in JSON format
ai-cmd tiers --json
Scenario 18: Gateway Core Integration
ai-cmd and ai-gateway share the same registry/policy/executor core for consistent behavior
Step 1: Service-style queries now validate through shared gateway core
ai-cmd query "check tor status" --dry-run --json
Step 2: Bypass gateway validation and execute directly (primary flag)
ai-cmd query "check tor status" --no-gateway --dry-run
Step 3: Same bypass behavior using alias flag
ai-cmd query "check tor status" --skip-gateway --dry-run
Note
`--skip-gateway` is an alias of `--no-gateway`
Step 4: Skip gateway for commands with long execution times
ai-cmd query "test dns leak" --skip-gateway --dry-run
Step 5: Display policy guard configuration used by shared gateway core
ai-cmd policy --json
Note
Confirms deny/allow behavior used during execution
Step 6: List tool metadata exposed through the shared core
ai-cmd tools --json
Note
Use this to verify command availability before query execution
Environment Variables
| Variable | Description | Default | Values |
|---|---|---|---|
RUST_LOG |
Set logging level | info | error|warn|info|debug|trace |
NO_COLOR |
Disable all colored output when set | unset | 1|true|yes (any value disables color) |
Exit Codes
| Code | Description |
|---|---|
| 2 | Invalid arguments |
| 4 | Network error |
| 5 | File not found |
| 1 | General error |
| 0 | Success |
| 3 | Permission denied |