Skip to content

ops0 is an AI-powered natural language DevOps CLI native to Claude AI with ansible, terraform, kubernetes, aws, azure and docker operations in a single cli. An open-source alternative to complex DevOps workflows, manual operations, etc. πŸ€– ⚑ πŸ‘‰ Natural Language DevOps Automation & Troubleshooting Tool

License

Notifications You must be signed in to change notification settings

ops0-ai/ops0-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

98 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ops0 CLI Logo

ReadMe in Chinese β€’ ReadMe in German β€’ ReadMe in French β€’ ReadMe in Spanish β€’ ReadMe in Portuguese β€’ Discord Community

Last Commit Latest Release GitHub Stars Discord


ops0 is an intelligent CLI tool that transforms natural language into DevOps operations.
Powered by Claude AI, it simplifies complex DevOps tasks by understanding your intent
and performing the right operations, making DevOps management more accessible and efficient.

ops0 in Action

ops0 CLI Demo Watch ops0 translate natural language into powerful DevOps operations

Quick Start

Installation

Using script

curl -fsSL https://raw.githubusercontent.com/ops0-ai/ops0-cli/main/install.sh | bash

Manual compilation

export PATH=$PATH:<YOUR_GO_BINARY_PATH>
go build -o ops0 ./src/...

Basic Usage

# Interactive mode (default) - just run ops0!
ops0

# Rule-based mode (works without API key)
ops0 -m "i want to plan my iac code"

# AI-powered mode (requires API key)
export ANTHROPIC_API_KEY=your_key_here
ops0 -m "check if my kubernetes pods are running" -ai
ops0 -m "Name of the directory where this cli is running? "
ops0 -m "CPU and Memory information of the system where ops0 cli application is running? "


# Troubleshooting mode
ops0 -m "my terraform apply is failing with state lock" -troubleshoot

Simply run ops0 to enter interactive mode and start chatting with natural language requests!

Operations in Action

Here are some real-world examples of ops0 in action across different tools:

Kafka Admin Mode

Kafka Admin Mode Video

Example: Interactively manage Kafka clusters using natural language.

Interactive Mode

ops0 Interactive Mode Enter interactive mode by running 'ops0' and start chatting with natural language commands

ops0 statistics

image

AWS CLI Operations

AWS CLI Example Example: Managing AWS resources using natural language commands

Docker Container Management

Docker Example Example: Managing Docker containers and images with simple English

Ansible Automation

Ansible Example Ansible Playbook Example: Executing and validating Ansible playbooks effortlessly

Terraform Infrastructure

Terraform Example Example: Managing infrastructure as code with natural language

Kubernetes Operations

Kubernetes Example Example: Simplified Kubernetes cluster management and troubleshooting

Install All Tools at Once

CLI Install All Tools

You can now install all supported DevOps tools with a single command:

ops0 --install

This will automatically install Terraform, Ansible, kubectl, Docker, Helm, AWS CLI, gcloud, and Azure CLI, and show their versions in a summary table.

Each example demonstrates:

  • Natural language command input
  • AI-powered command translation
  • Clear command preview
  • Safe execution with confirmation
  • Detailed output formatting

Supported Tools & Features

Core Tools

  • Terraform - Infrastructure as Code
  • Ansible - Configuration Management
  • Kubernetes (kubectl) - Container Orchestration
  • Docker - Containerization
  • AWS CLI - Amazon Web Services
  • Helm - Kubernetes Package Manager
  • gcloud - Google Cloud Platform
  • Azure CLI - Microsoft Azure
  • System Admin - Linux System Administration

System Administration Examples

# Monitor system resources
ops0 -m "show memory usage on my machine"
ops0 -m "check disk space"
ops0 -m "display CPU usage"

# Manage system services
ops0 -m "restart service nginx"
ops0 -m "check service status apache2"

# Package management
ops0 -m "install package docker"
ops0 -m "update system packages"

# System logs
ops0 -m "show system logs"
ops0 -m "check journal logs"

System Administration & Log Analysis Examples

# Analyze Kubernetes pod logs and get AI-powered summary and recommendations
ops0 -m "analyze logs for pod my-app-123 in namespace prod"

# Analyze a specific log file for issues
ops0 -m "analyze /var/log/nginx/error.log"

Key Features

  • Natural language command translation
  • AI-powered troubleshooting
  • Kubernetes pod log analysis with AI summary and suggested operations
  • Log file path analysis for issues and context
  • Context-aware suggestions
  • Safe execution with confirmations
  • Dry run support for destructive operations
  • Automatic tool installation

πŸ†š AI vs Rule-Based Mode

Feature Rule-Based AI Mode
Setup No API key needed Requires ANTHROPIC_API_KEY
Speed Instant ~2-3 seconds
Understanding Pattern matching Natural language
Context Awareness Limited High
Troubleshooting Basic Advanced
Complex Scenarios Limited Excellent
Offline Usage βœ… ❌

Configuration

Environment Variables

# Required for AI features
export ANTHROPIC_API_KEY=your_api_key

# Optional: Customize AI behavior
export OPS0_AI_MODEL=claude-3-sonnet-20240229  # Default model
export OPS0_MAX_TOKENS=1024                    # Response length

Config File (Future)

# ~/.ops0/config.yaml
ai:
  provider: anthropic
  model: claude-3-sonnet-20240229
  max_tokens: 1024
  
tools:
  terraform:
    version_check: terraform version
    install_cmd: brew install terraform
  kubectl:
    version_check: kubectl version --client
    install_cmd: brew install kubectl

Privacy & Security

  • API Key: Stored locally as environment variable
  • No Data Storage: Commands and context not stored by ops0
  • Anthropic Privacy: Follows Anthropic's data handling policies
  • Local Processing: Rule-based mode works completely offline

🀝 Contributing

We welcome contributions! Please see CONTRIBUTING.md for guidelines.

Areas needing help

  • New tool integrations
  • AI prompt improvements
  • Testing across different environments
  • Documentation and examples

πŸ—ΊοΈ Roadmap

Current

  • Claude AI integration
  • Basic troubleshooting mode
  • Context awareness
  • Multi-tool support

Coming Soon

  • Custom offline-capable model for air-gapped environments
  • Interactive multi-step workflows
  • Learning from user feedback
  • Custom tool configurations
  • Multiple AI provider support
  • Advanced context analysis
  • Team collaboration features

Tips

  1. Be Specific: "my terraform plan shows 5 resources changing" vs "terraform error"
  2. Use Troubleshoot Mode: For complex issues, use -troubleshoot flag
  3. Check Context: AI works better when you're in the right directory
  4. Review Commands: Always review AI suggestions before confirming
  5. Provide Feedback: Use GitHub issues to report AI accuracy problems

About

ops0 is an AI-powered natural language DevOps CLI native to Claude AI with ansible, terraform, kubernetes, aws, azure and docker operations in a single cli. An open-source alternative to complex DevOps workflows, manual operations, etc. πŸ€– ⚑ πŸ‘‰ Natural Language DevOps Automation & Troubleshooting Tool

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •