AI Assistant

Delta CLI's AI Assistant transforms how you interact with the command line, providing intelligent suggestions, automated workflows, and context-aware assistance for all your terminal tasks.

Key Features

Natural Language Commands
Describe what you want to do in plain English, and Delta CLI translates it into the right commands.
Smart Suggestions
Get intelligent command suggestions based on your current context, history, and common patterns.
Safety First
Every command is analyzed for potential risks before execution, with warnings for dangerous operations.
Learning Assistant
The AI learns from your patterns and preferences to provide increasingly personalized assistance.

Getting Started with AI Assistant

Enable AI Assistant

The AI Assistant is enabled by default. You can check its status with:

bash
delta :ai status

Basic Usage

Simply describe what you want to do after the `:` command:

bash
# Find large files
delta :find files larger than 100MB in my home directory

# Git operations
delta :show me all my recent commits with their diffs

# System maintenance
delta :clean up docker containers and images that aren't being used

# File operations
delta :compress all png files in this directory

Natural Language Examples

The AI Assistant understands context and intent, translating your requests into appropriate commands:

You say:

bash
delta :backup my project to the external drive

AI generates:

bash
rsync -avz --progress ./ /Volumes/External/backups/project-$(date +%Y%m%d)

You say:

bash
delta :kill whatever is using port 3000

AI generates:

bash
lsof -ti:3000 | xargs kill -9

You say:

bash
delta :set up a new react project with typescript and tailwind

AI generates:

bash
npx create-react-app my-app --template typescript && cd my-app && npm install tailwindcss postcss autoprefixer && npx tailwindcss init -p

Interactive Mode

For complex tasks, use interactive mode to have a conversation with the AI:

bash
delta :chat
Delta AI: Hello! I'm here to help with your command line tasks. What would you like to do?

You: I need to find and remove all node_modules directories

Delta AI: I can help you find and remove node_modules directories. Let me break this down:

1. First, let's find all node_modules directories:
   find . -name "node_modules" -type d

2. To see the total size:
   find . -name "node_modules" -type d -exec du -sh {} +

3. To remove them (⚠️ This will delete all node_modules):
   find . -name "node_modules" -type d -exec rm -rf {} +

Would you like me to run any of these commands?

You: Show me the sizes first

Delta AI: Running: find . -name "node_modules" -type d -exec du -sh {} +

Output:
 245M    ./project1/node_modules
 389M    ./project2/node_modules
 156M    ./old-stuff/node_modules
 790M    total

You: Remove the one in old-stuff only

Delta AI: Running: rm -rf ./old-stuff/node_modules
✓ Successfully removed ./old-stuff/node_modules (freed 156M)

Command Explanation

Get detailed explanations of any command before running it:

bash
# Explain a command
delta :explain "tar -czvf archive.tar.gz --exclude='*.log' /path/to/directory"

# Get alternative approaches
delta :alternatives "find . -name '*.txt' -exec grep 'pattern' {} \;"

Workflow Automation

Create and save complex workflows that can be reused:

Save a Workflow

bash
# Create a deployment workflow
delta :workflow create deploy "build the project, run tests, and deploy to production"

# The AI will generate:
# 1. npm run build
# 2. npm test
# 3. npm run deploy:prod

Run Saved Workflows

bash
# Execute the workflow
delta :workflow run deploy

# List all workflows
delta :workflow list

# Edit a workflow
delta :workflow edit deploy

Configuration

Customize the AI Assistant to match your preferences:

bash
# Set verbosity level
delta :config ai.verbosity detailed

# Enable/disable safety checks
delta :config ai.safety strict

# Set preferred shell
delta :config ai.shell zsh

# Configure AI model
delta :config ai.model advanced

Configuration Options

OptionValuesDescription
ai.verbosityminimal, normal, detailedControl output detail level
ai.safetyoff, normal, strictSafety check sensitivity
ai.shellbash, zsh, fish, pwshPreferred shell syntax
ai.modelfast, balanced, advancedAI model selection

Privacy & Security

Local Processing

By default, all AI processing happens on your machine. For enhanced capabilities, you can optionally enable cloud processing:

bash
# Check processing mode
delta :config ai.processing

# Enable cloud processing (optional)
delta :config ai.processing cloud

# Return to local processing
delta :config ai.processing local

Data Handling

  • Commands are analyzed locally before execution
  • No command history is sent to external servers
  • Sensitive patterns (passwords, keys) are automatically redacted
  • You control what data can be used for AI training

Next Steps

Ready to supercharge your command line experience? Here's what to explore next:

  1. Learn about Command Safety to understand how Delta CLI protects you
  2. Explore Workflow Learning to automate repetitive tasks
  3. Follow AI Workflow Tutorials for practical examples