Skip to content
/ Athena Public

Athena CLI lets you define your entire project with a simple DSL. Why Athena Exists? Because your time is worth more than YAML.

License

Notifications You must be signed in to change notification settings

Jeck0v/Athena

Repository files navigation

Athena - Declarative DevOps Toolkit

Rust License: MIT Version

Athena is an open source CLI tool for back-end developers and DevOps engineers that turns a COBOL-inspired DSL into clean, consistent Docker Compose configurations.

The goal is simple: reduce YAML noise, enforce sane defaults, and make infrastructure definitions easier to read, validate and evolve.

Athena focuses on correctness, clarity and automation first. Production hardening is intentionally progressive and opinionated, not magic.

Why Athena DSL?

Writing infrastructure directly in YAML often leads to repetitive, fragile and hard to review configurations.

Athena introduces a DSL designed to be explicit, readable and tooling-friendly, while remaining close to Docker concepts.

Example

Instead of writing verbose YAML:

services:
  backend:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "8000:8000"
    environment:
      - DATABASE_URL=${DATABASE_URL}
  database:
    image: postgres:15
    restart: always
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 10s
      retries: 5

You write:

DEPLOYMENT-ID MY_APP

SERVICES SECTION

SERVICE backend
PORT-MAPPING 8000 TO 8000
ENV-VARIABLE {{DATABASE_URL}}
END SERVICE

SERVICE database
IMAGE-ID postgres:15
END SERVICE

Athena expands this into a complete Docker Compose file with validated structure and consistent defaults.

Quick Start

git clone https://github.com/Jeck0v/Athena
cd athena
cargo install --path .

athena build deploy.ath

Usage

athena build deploy.ath                 # Generate docker-compose.yml
athena build deploy.ath -o custom.yml   # Custom output file
athena validate deploy.ath              # Validate syntax only
athena info                             # Show DSL information
athena info --examples                  # Show usage examples
athena info --directives                # Show all directives

If no file is specified, Athena looks for a .ath file in the current directory.

What Athena Handles

  • Service type detection - recognizes Database, Cache, WebApp and Proxy patterns from the image name
  • Healthchecks - generates appropriate healthchecks per service type with tuned intervals
  • Restart policies - always for databases and caches, unless-stopped for applications
  • Network isolation - automatic bridge network shared across services
  • Dependency ordering - services are sorted topologically in the output
  • Dockerfile fallback - no image specified means Athena looks for a Dockerfile
  • Resource limits - CPU and memory constraints via RESOURCE-LIMITS
  • Metadata labels - every service is tagged with project, type and generation date
  • Docker Swarm - replicas, update config and overlay networks when needed

Everything Athena adds is visible in the generated output. No hidden behavior.

Error Handling

Athena provides precise parser errors with line and column information, visual context and actionable suggestions.

Error: Parse error at line 8, column 1: Missing 'END SERVICE' statement
   |
 8 | # Missing END SERVICE
   | ^ Error here

Suggestion: Each SERVICE block must be closed with 'END SERVICE'

Validation also catches port conflicts, invalid service references and circular dependencies before any file is generated.

See Error Handling documentation for the full reference.

DSL Reference

Directive Example
DEPLOYMENT-ID DEPLOYMENT-ID my_project
VERSION-ID VERSION-ID 1.0.0
NETWORK-NAME NETWORK-NAME app_network
IMAGE-ID IMAGE-ID postgres:15
PORT-MAPPING PORT-MAPPING 8080 TO 80
ENV-VARIABLE ENV-VARIABLE {{DATABASE_URL}}
COMMAND COMMAND "npm start"
VOLUME-MAPPING VOLUME-MAPPING "./data" TO "/app/data"
DEPENDS-ON DEPENDS-ON database
HEALTH-CHECK HEALTH-CHECK "curl -f http://localhost/health"
RESTART-POLICY RESTART-POLICY always
RESOURCE-LIMITS RESOURCE-LIMITS CPU "0.5" MEMORY "512M"
REPLICAS REPLICAS 3

Full syntax documentation: DSL Reference

Documentation

Design Principles

Athena is opinionated but transparent. Everything it adds is explicit in the generated output.

Defaults are meant to be reasonable starting points, not final production guarantees. You are expected to review and adapt the output to your actual deployment constraints.

Athena does not hide Docker. It reduces friction around it.

License

MIT License. See LICENSE for details.


Built with ❤️ using Rust | Make DevOps great again.

About

Athena CLI lets you define your entire project with a simple DSL. Why Athena Exists? Because your time is worth more than YAML.

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors