Skip to content

An AI-powered DevOps learning CLI that helps developers understand concepts, safely experiment with commands, design architectures, and debug workflows while learning by doing.

License

Notifications You must be signed in to change notification settings

CloudFay/clioraOps

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

13 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

ClioraOps - DevOps Learning Companion

CI/CD Pipeline codecov License: MIT Python 3.10+

Transform your terminal into an intelligent, safety-conscious DevOps mentor powered by multi-provider AI (Gemini, OpenAI, Anthropic, and Ollama).

๐Ÿš€ Quick Start (v0.3.1)

What's New in v0.3.1 โœจ

Smart Intent Classification - ClioraOps now understands what you really want:

> show me running containers          # COMMAND: Generates docker ps -a
> what is docker?                      # REQUEST: Explains what Docker is
> list the benefits of microservices   # AMBIGUOUS: Asks what you need
  • ๐ŸŽฏ Intent Classification - Distinguishes commands vs requests automatically
  • ๐Ÿ’ฌ Better NL Understanding - Question words โ†’ explanations, action verbs โ†’ commands
  • ๐Ÿ”€ Smart Routing - Commands go to generator, questions go to explain
  • ๐Ÿค– Production Ready - 149 tests, 100% pass rate (104 NL tests + 48 intent tests)

Full release notes โ†’

Prerequisites

  1. Python 3.10+
  2. One AI Provider (choose one):

Installation

# Clone the repository
git clone https://github.com/CloudFay/clioraOps.git
cd clioraOps

# Create virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate

# Install in editable mode
pip install -e .

# Run interactive setup
python scripts/setup_ai.py

Verify Installation

# Test clioraops
clioraops start

# You'll see:
# ๐Ÿš€ ClioraOps Session Started (beginner mode)
# ๐Ÿ’ฌ Conversational mode: ENABLED
# Type 'exit' to quit

โœจ Features

  • ๐Ÿ’ฌ Natural Language Commands:

    • Smart intent classification: Commands vs Requests vs Ambiguous
    • Ask questions naturally in plain English
    • Automatic detection of dangerous patterns
    • Confidence scoring for generated commands
    • All commands reviewed for safety before execution
    • Learn more โ†’
  • ๐ŸŽ“ Dual Modes:

    • Beginner: Analogies, simple explanations, and safety warnings.
    • Architect: Technical depth, production best practices, and trade-offs.
  • ๐Ÿ›ก๏ธ Safety First:

    • Intelligent try command checks for dangerous operations (e.g., rm -rf /, kubectl delete in prod).
    • Risk analysis and safe alternative suggestions.
    • 15+ dangerous pattern detection
  • ๐Ÿค– AI-Powered:

    • Explain: Deep dive into concepts or commands.
    • Generate: Create Dockerfiles, K8s manifests, and CI pipelines tailored to your stack.
    • Debug: Analyze error messages to find root causes and fixes.
  • ๐Ÿ“Š Visualizer:

    • Generate ASCII architecture diagrams for mental models (Microservices, K8s, etc.).
  • ๐Ÿ“ Code Review:

    • Scan scripts for security risks and bad practices before running them.

๐ŸŽฎ Interactive Commands

Once inside the session (clioraops start), try these:

Natural Language Mode - Intent-Aware Examples (v0.3.1)

ClioraOps automatically classifies what you need:

COMMAND Intent (Generates shell commands):

๐ŸŒฑ beginner > show me running containers
๐ŸŽฏ Intent: COMMAND (90% confidence)
๐Ÿ’ก Generated: docker ps -a
โœ… Safety: SAFE

๐ŸŒฑ beginner > find all python files in src
๐ŸŽฏ Intent: COMMAND (90% confidence)
๐Ÿ’ก Generated: find ./src -name '*.py' -type f
โœ… Safety: SAFE

REQUEST Intent (Provides explanations):

๐ŸŒฑ beginner > what is docker?
๐ŸŽฏ Intent: REQUEST (95% confidence)
๐Ÿ“š Docker is a containerization platform that packages applications...

๐ŸŒฑ beginner > how does kubernetes work?
๐ŸŽฏ Intent: REQUEST (95% confidence)
๐Ÿ“š Kubernetes orchestrates container deployment across clusters...

๐ŸŒฑ beginner > explain microservices
๐ŸŽฏ Intent: REQUEST (88% confidence)
๐Ÿ“š Microservices break applications into small independent services...

AMBIGUOUS Intent (Asks for clarification):

๐ŸŒฑ beginner > show kubernetes concepts
๐ŸŽฏ Intent: AMBIGUOUS (60% confidence)
โ“ I'm not sure if you want to:
   1. Generate a shell command
   2. Get information/explanation
   Your input: "show kubernetes concepts"
   What would you like? (1/2): 2
๐Ÿ“š Kubernetes is an orchestration platform...

Command-Based Mode

Command Description Example
try <cmd> Check if a command is safe to run try docker run -it ubuntu
explain <query> Get a detailed explanation explain kubernetes pods
design <pattern> Visualize an architecture design microservices
generate <type> Generate boilerplate code generate dockerfile python fastapi
debug <error> Analyze an error message debug connection refused
review <file> Scan a script for issues review deploy.sh
learn <topic> Start a learning session learn ci/cd
switch to <mode> Change learning mode switch to architect

๐Ÿšข Deployment & Environments

Choose the environment that best fits your workflow:

Method Best For Setup Time Complexity
๐Ÿ Local CLI Development & Learning 5 min Simple
๐ŸŒ Web Interface Demos & Browser Access 5 min Simple
๐Ÿณ Docker Production & Consistency 5 min Simple
๐Ÿ“ฆ Standalone Portable Distribution 10 min Moderate
โ˜๏ธ Dev Container Cloud/Remote Dev 3 min Simple

Quick Setup Guide

Local CLI (Development):

python3 -m venv venv && source venv/bin/activate
pip install -e .
python scripts/setup_ai.py
clioraops start

Web Interface (Browser):

pip install -e .
python clioraOps_cli/web_interface.py
# Open http://localhost:7860

Docker (Production):

docker-compose up -d

Dev Container (Cloud):

  • Open in VS Code with Dev Container extension
  • Or click "Open in Codespaces" on GitHub

For detailed deployment instructions, see:


๐Ÿ’ป CLI Commands

Command Description Example
clioraops init Prepare your project and scan for secrets clioraops init .
clioraops start Enter the interactive conversational session clioraops start
clioraops review Perform a standalone safety review of a file clioraops review script.sh
clioraops generate Create Dockerfiles, K8s manifests, or workflows clioraops generate dockerfile

๐Ÿ“š Examples & Learning Paths

ClioraOps includes several example workflows demonstrating different features:

Run any example with:

python examples/basic_flow.py

See examples/README.md for detailed descriptions and learning paths.


๐Ÿ’พ Learning Summaries

Never lose progress. On every session exit, ClioraOps generates a Markdown summary in ~/.clioraops/summaries/ documenting:

  • Concepts you mastered
  • Diagrams designed
  • Critical security findings

๐Ÿ“Š Development & Testing

Running Tests Locally

# Run all tests
pytest tests/ -v

# Run with coverage report
pytest tests/ --cov=clioraOps_cli --cov-report=html --cov-report=term-missing

# Run specific test file
pytest tests/test_nl_detector.py -v

Code Quality

# Format code with black
black clioraOps_cli tests

# Lint with flake8
flake8 clioraOps_cli

# Type check with mypy
mypy clioraOps_cli --ignore-missing-imports

Current Test Status

  • Total Tests: 56+ (all passing)
  • NL Detector Tests: 33/33 passing
  • Command Generator Tests: 23/23 passing
  • Pass Rate: 100%

See docs/NL_FEATURE_TEST_SUMMARY.md for comprehensive testing details.


๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

For detailed contribution guidelines, see CONTRIBUTING.md.

For architecture details, see docs/architecture.md.


๐Ÿ“„ License

MIT ยฉ Faith Omobude

About

An AI-powered DevOps learning CLI that helps developers understand concepts, safely experiment with commands, design architectures, and debug workflows while learning by doing.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages