Skip to main content

Xerxes

An intelligent DevOps agent with unrestricted CLI access and free-form reasoning

License: MIT Python 3.10+ Code style: black

Features • Installation • Quick Start • Documentation • Contributing


Overview

Xerxes is an intelligent DevOps assistant that transforms natural language into bash commands. Unlike traditional tools with predefined commands, Xerxes leverages full bash capabilities with intelligent resource discovery to execute complex operations across your entire infrastructure.

Features

Core Capabilities

  • Full Bash Shell Access: Execute ANY command with complete shell features
    • Pipes, redirection, chaining (|, >, >>, &&, ||)
    • Variables, loops, conditionals, subshells
    • Process substitution and command expansion
  • Intelligent Resource Discovery: Automatic fuzzy matching and pattern-based discovery
    • Never assumes exact names - always discovers first
    • Pattern: SEARCH → MATCH → OPERATE
    • Works with files, pods, containers, instances, and more
  • Token-Efficient Operations: Minimal output formatting for faster responses
    • Uses -o name, --format, --query flags
    • Field projection to reduce token usage
  • Interactive Approval: See command + reasoning before execution
    • [R]un - Execute this command
    • [S]kip - Skip and continue
    • [A]lways - Auto-approve for session
  • Multi-Cloud & Multi-Tool: kubectl, docker, aws, gcloud, helm, jq, ffmpeg, git, and more
  • Safety First: Automatic detection of destructive operations with confirmation prompts

Installation

uv tool install xerxes

To update to the latest version:

uv tool upgrade xerxes

From Source

git clone https://github.com/shammianand/xerxes.git
cd xerxes
uv sync

Quick Start

1. Prerequisites

  • Python 3.10+
  • GCP Project with Vertex AI API enabled
  • Service Account or API key for Vertex AI
  • Optional: Install CLI tools you want to use (kubectl, docker, aws, gcloud)

2. Configuration

Create a .env file:

XERXES_VERTEX_PROJECT_ID=your-gcp-project-id
XERXES_VERTEX_LOCATION=us-central1
XERXES_VERTEX_MODEL=gemini-2.0-flash
XERXES_GOOGLE_APPLICATION_CREDENTIALS=/path/to/service-account.json

Or use the CLI:

xerxes config set vertex_project_id your-gcp-project-id
xerxes config set google_application_credentials /path/to/sa.json

3. Start Chatting

xerxes chat

Usage

Example Session

https://github.com/user-attachments/assets/350d91eb-b999-4c18-aba3-52d4e430bb8e

Operations:

"Scale the api deployment to 5 replicas"
"Delete all pods in failed state"
"Create a new GCS bucket for backups"

CLI Commands

# Start interactive chat
xerxes chat

# Manage configuration
xerxes config show
xerxes config set <key> <value>

# List available tools
xerxes tools

# Show version
xerxes version

Configuration Options

Variable Description Default
XERXES_VERTEX_PROJECT_ID GCP project ID (required) -
XERXES_VERTEX_LOCATION GCP region us-central1
XERXES_VERTEX_MODEL Model name claude-3-5-sonnet@20240620
XERXES_GOOGLE_APPLICATION_CREDENTIALS Path to service account JSON -
XERXES_MAX_TOKENS Max tokens per response 4096
XERXES_TEMPERATURE LLM temperature 0.0

Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests and linters:
    uv run pytest
    uv run black src/
    uv run ruff check src/
    
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. Open a Pull Request

Development Setup

# Clone the repo
git clone https://github.com/shammianand/xerxes.git
cd xerxes

# Install dependencies
uv sync --all-extras

# Run in development mode
uv run xerxes chat

Roadmap

  • Additional LLM providers (Anthropic direct, OpenAI, Ollama)
  • Terraform integration
  • Ansible playbook execution
  • Multi-step workflow automation
  • Session history save/replay
  • Web dashboard for monitoring
  • Plugin system for custom tools
  • One-shot command mode (xerxes run "list all pods")

License

MIT License - see LICENSE for details

Support


Built with ❤️ by Shammi Anand

Metadata

Release files for xerxes 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xerxes 0.3.1
File Size Uploaded Provenance
xerxes-0.3.1.tar.gz 97.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for xerxes 0.3.1
File Interpreter ABI Platform
xerxes-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 121.4 kB

Release files / xerxes-0.3.1.tar.gz

Download URL xerxes-0.3.1.tar.gz
Size 97.9 kB
Tags Source
SHA-256 checksum
How to use checksums
03193b82002a4b77b0437cc9dbbe2507bc612a766df5de6817dd5e1005476b9c
BLAKE2b-256 checksum
How to use checksums
ecd980cb5b394acd9c3c144787983c037588134848275255691b6c9a05368c40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.5

Release files / xerxes-0.3.1-py3-none-any.whl

Download URL xerxes-0.3.1-py3-none-any.whl
Size 23.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f414bb69338157d6df660e4fdf54880a1965d5ea5cac10acfb4ee14c4e97fc89
BLAKE2b-256 checksum
How to use checksums
6a66f813855144402e253f4279785fc4e9c90b05cdde2987de4eb7e084059e05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.9.5

Security for xerxes 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page