Skip to main content

AI-Native Developer Operating Layer

Project description

DevOS - AI-Native Developer Operating Layer

╔══════════════════════════════════════════════════════════╗
║                                                          ║
║   ██████╗ ███████╗██╗   ██╗ ██████╗ ███████╗           ║
║   ██╔══██╗██╔════╝██║   ██║██╔═══██╗██╔════╝           ║
║   ██║  ██║█████╗  ██║   ██║██║   ██║███████╗           ║
║   ██║  ██║██╔══╝  ╚██╗ ██╔╝██║   ██║╚════██║           ║
║   ██████╔╝███████╗ ╚████╔╝ ╚██████╔╝███████║           ║
║   ╚═════╝ ╚══════╝  ╚═══╝   ╚═════╝ ╚══════╝           ║
║                                                          ║
╚══════════════════════════════════════════════════════════╝

Cross-Platform AI-Native Developer Orchestration Layer

License: MIT Python 3.8+ Go 1.21+

🌟 What is DevOS?

DevOS is NOT a kernel - it's a system-level intelligent orchestration layer that sits on top of your existing OS. Think of it as an AI-powered command center that understands natural language and translates your intentions into safe, validated system operations.

Key Features

  • 🧠 Natural Language Interface: Describe what you want, not how to do it
  • 🔒 Security First: Built-in command validation and sandboxing
  • 🌐 Cross-Platform: Runs on Windows, macOS, and Linux
  • 🤖 Multi-LLM Support: OpenAI, Anthropic Claude, Google Gemini, or local Ollama
  • 🔌 Plugin System: Extensible architecture for custom functionality
  • 💾 Context Memory: SQLite-based persistent memory across sessions
  • 📊 Project Scaffolding: Intelligent project setup and management
  • 🔍 Error Analysis: Automatic error detection and fixing suggestions

🚀 Quick Start

Prerequisites

  • Python 3.8+ (required)
  • Go 1.21+ (optional, for CLI)
  • Ollama (optional, for local LLM)

Installation

Unix/Linux/macOS

git clone https://github.com/devos-ai/devos.git
cd devos
chmod +x installer/install.sh
./installer/install.sh

Windows

git clone https://github.com/devos-ai/devos.git
cd devos
PowerShell -ExecutionPolicy Bypass -File installer\install.ps1

Via pip (Python only)

pip install devos-ai

📖 Usage

Interactive Mode

devos

Example Commands

# Project Setup
devos> setup fastapi project with docker
devos> create react app with typescript

# System Analysis
devos> analyze system performance
devos> check disk usage

# Debugging
devos> fix build error in current directory
devos> analyze error logs

# Git Operations
devos> commit changes with smart message
devos> safe push to origin

# Package Management
devos> install dependencies from requirements.txt
devos> update all npm packages

🏗️ Architecture

devos/
├── core-cli/              # Go-based CLI control engine
│   ├── main.go           # Entry point
│   └── internal/
│       ├── config/       # Configuration management
│       ├── executor/     # Command execution
│       └── logger/       # Structured logging
│
├── ai-engine/            # Python-based AI reasoning core
│   ├── core/
│   │   └── processor.py  # Natural language processing
│   ├── adapters/
│   │   └── llm_adapter.py # Multi-LLM support
│   ├── security/
│   │   └── validator.py  # Command validation
│   └── plugins/
│       └── plugin_manager.py # Plugin system
│
├── adapters/             # OS-specific adapters
│   ├── windows/
│   ├── macos/
│   └── linux/
│
├── memory/               # Context persistence
│   └── store.py         # SQLite memory store
│
└── plugins/              # Plugin ecosystem
    └── community/
        └── git-helper/   # Example plugin

🔧 Configuration

DevOS stores configuration in platform-specific locations:

  • Windows: %APPDATA%\devos\config.json
  • macOS: ~/Library/Application Support/devos/config.json
  • Linux: ~/.config/devos/config.json

Example Configuration

{
  "ai_provider": "ollama",
  "model": "llama3.2",
  "confirmation_mode": true,
  "sandbox_mode": true,
  "log_level": "info"
}

Supported AI Providers

  1. Ollama (Local, Free)

    {
      "ai_provider": "ollama",
      "model": "llama3.2",
      "base_url": "http://localhost:11434"
    }
    
  2. OpenAI

    {
      "ai_provider": "openai",
      "model": "gpt-4",
      "api_key": "your-api-key"
    }
    
  3. Anthropic Claude

    {
      "ai_provider": "anthropic",
      "model": "claude-3-5-sonnet-20241022",
      "api_key": "your-api-key"
    }
    
  4. Google Gemini

    {
      "ai_provider": "gemini",
      "model": "gemini-pro",
      "api_key": "your-api-key"
    }
    

🔒 Security Features

Command Validation

DevOS validates all commands before execution:

  • ✅ Blocked dangerous commands (rm -rf /, format, etc.)
  • ✅ Risk level assessment
  • ✅ Confirmation for destructive operations
  • ✅ Sandbox execution environment

Blocked Patterns

BLOCKED_COMMANDS = [
    r'rm\s+-rf\s+/',
    r'mkfs',
    r'dd\s+if=.*of=/dev/',
    r'format\s+[a-zA-Z]:',
    r':\(\)\{:\|:&\};:',  # Fork bomb
]

🔌 Plugin System

Creating a Plugin

  1. Create plugin directory:

    ~/.config/devos/plugins/my-plugin/
    ├── manifest.json
    └── plugin.py
    
  2. Define manifest.json:

    {
      "name": "my-plugin",
      "version": "0.1.0",
      "description": "My awesome plugin",
      "entry_point": "plugin.py",
      "permissions": ["execute_commands"]
    }
    
  3. Implement plugin.py:

    from plugins.plugin_manager import PluginInterface
    
    class Plugin(PluginInterface):
        @property
        def name(self) -> str:
            return "my-plugin"
        
        def execute(self, context):
            # Plugin logic here
            return {'success': True, 'output': 'Done!'}
    

📊 Memory & Context

DevOS maintains context across sessions using SQLite:

  • Command history
  • Project context
  • User preferences
  • Execution results

Example Context Operations

from memory.store import MemoryStore

store = MemoryStore()

# Store context
store.set_context('current_project', '/path/to/project')

# Retrieve context
project = store.get_context('current_project')

# Search history
results = store.search_history('docker')

🎯 Use Cases

1. Project Scaffolding

devos> setup fastapi project with docker, postgres, and redis

Creates:

  • Project structure
  • Dockerfile & docker-compose.yml
  • Requirements.txt
  • Main application file
  • Configuration files

2. Debugging Assistant

devos> fix build error

Analyzes:

  • Build logs
  • Error messages
  • Stack traces
  • Suggests fixes

3. System Monitoring

devos> analyze system performance

Reports:

  • CPU usage
  • Memory consumption
  • Disk space
  • Network activity

4. Dependency Management

devos> install python dependencies from requirements.txt

Handles:

  • Package manager detection
  • Dependency resolution
  • Virtual environment setup
  • Version conflicts

🛠️ Development

Building from Source

Go CLI

cd core-cli
go mod download
go build -o devos .

Python Engine

pip install -e .

Running Tests

# Python tests
pytest tests/

# Go tests
cd core-cli
go test ./...

🤝 Contributing

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

Areas for Contribution

  • 🔌 New plugins
  • 🌐 Additional LLM adapters
  • 🎨 UI improvements
  • 📚 Documentation
  • 🐛 Bug fixes

🚨 Important Notes

This is NOT:

  • ❌ A kernel or OS replacement
  • ❌ A fully autonomous agent
  • ❌ Production-ready without testing
  • ❌ A substitute for understanding commands

This IS:

  • ✅ An intelligent orchestration layer
  • ✅ A developer productivity tool
  • ✅ A learning and experimentation platform
  • ✅ Extensible and customizable

⚠️ Reality Check

"Agar tum sirf prompt deke expect kar rahe ho: 'Agent sab bana dega perfect production system' Toh nahi hoga."

You must:

  • Understand the architecture
  • Audit the code
  • Test security features
  • Iterate and improve

📄 License

MIT License - see LICENSE file for details.

🙏 Acknowledgments

Inspired by:

  • Docker's container orchestration
  • Kubernetes' declarative configuration
  • PowerShell's pipeline architecture
  • Ollama's local-first approach

📞 Support


Built with ❤️ by developers, for developers

WebsiteDocumentationGitHub

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devos_ai-0.1.0.tar.gz (30.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devos_ai-0.1.0-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file devos_ai-0.1.0.tar.gz.

File metadata

  • Download URL: devos_ai-0.1.0.tar.gz
  • Upload date:
  • Size: 30.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for devos_ai-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e97d032403c7679b05ddb837ab1a5dbf8e3f948c367785d6e6406555a605a9d1
MD5 66b6df4e73dbf62d9ce6d379507df43f
BLAKE2b-256 492e7762798e01c02e16784fdf8472879a29b90918a6678c957e0584d2843264

See more details on using hashes here.

File details

Details for the file devos_ai-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: devos_ai-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.6

File hashes

Hashes for devos_ai-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 203fd0d1f3c7c6ac3e03f7b285b0b9d43fdb98f5c59a0df867e0cbed6ec4bfa2
MD5 32d910482d64fbaa722787c96b2b1506
BLAKE2b-256 3b74516d7ed6e019ab5ae111f81b986fb4a901c814aba027659edf536a5e9382

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page