Skip to content

marcofortina/automax

πŸ€– Automax

CI License: MIT Python Version

Automax is a modular, YAML-driven automation framework for executing steps and sub-steps from CLI or Python code.


🧩 Features

  • Step/sub-step in YAML
  • CLI discovery dinamica
  • Fail-fast, logging (file/console)
  • Dry-run
  • Config YAML (SSH, paths, logging, steps_dir)
  • Validazione YAML/parametri
  • Plugin estensibili (local cmd, SSH, HTTP, etc.)
  • Retry, context output, hook pre/post
  • Installable package + programmatic API
  • Offline step validation utility

πŸ“ Project Structure

automax/
β”œβ”€β”€ .github/
β”‚   β”œβ”€β”€ workflows/           # CI/CD workflows
β”‚   β”‚   β”œβ”€β”€ ci.yml
β”‚   β”‚   β”œβ”€β”€ docs.yml
β”‚   β”‚   └── publish.yml
β”‚   └── pull_request_template.md
β”œβ”€β”€ docs/                    # Comprehensive documentation
β”‚   β”œβ”€β”€ CONTRIBUTING.md      # Contribution guidelines
β”‚   β”œβ”€β”€ DEVELOPER-NOTES.md   # Internal developer guide
β”‚   β”œβ”€β”€ guides/              # Usage guides
β”‚   β”œβ”€β”€ plugins/             # Plugin documentation
β”‚   └── reference/           # API reference
β”œβ”€β”€ examples/                # Example configurations
β”œβ”€β”€ src/automax/             # Core package
β”‚   β”œβ”€β”€ cli/                 # Command Line Interface
β”‚   β”œβ”€β”€ core/                # Core logic and managers
β”‚   β”‚   β”œβ”€β”€ managers/        # Config, plugin, step managers
β”‚   β”‚   └── utils/           # Common utilities
β”‚   └── plugins/             # Extensible plugin system (15+ plugins)
β”œβ”€β”€ tests/                   # Test suite
β”‚   β”œβ”€β”€ test_cli/            # CLI tests
β”‚   β”œβ”€β”€ test_core/           # Core component tests
β”‚   β”œβ”€β”€ test_plugins/        # Plugin tests
β”‚   └── test_steps/          # Step execution tests
β”œβ”€β”€ utils/                   # Developer utilities
β”œβ”€β”€ pyproject.toml           # Build configuration
β”œβ”€β”€ requirements.txt         # Dependencies
β”œβ”€β”€ setup.py                 # Installation script
└── README.md                # Project overview

βš™οΈ Installation

pip install .
# Or
python setup.py install

βš™οΈ CLI Usage

Automax provides a modern command-line interface:

List available plugins

automax plugins list

List available steps

automax list-steps --config examples/config/config.yaml

Validate configuration file

automax validate --config examples/config/config.yaml

Execute steps

automax run --config examples/config/config.yaml --steps 1,2

Execute specific sub-steps

# Execute step 1 with all sub-steps, step 2 with all sub-steps, and only sub-step 8 of step 4
automax run --config examples/config/config.yaml --steps 1,2,4:8

# Execute only sub-step 3 of step 1 and sub-step 5 of step 2
automax run --config examples/config/config.yaml --steps 1:3,2:5

Execute steps with variables

automax run --config examples/config/config.yaml --steps 1 --var timeout=10

Dry-run execution

automax run --config examples/config/config.yaml --steps 1,2 --dry-run

Help

automax --help

Version

automax --version

πŸ“š Examples

Automax comes with comprehensive examples to help you get started:

Basic Examples (examples/basic/)

  • Local Commands: Execute system commands and check system info
  • File Operations: Read, write, and manage files
  • HTTP Requests: Make API calls and web requests
  • Network Checks: Test connectivity and ports

Advanced Examples (examples/advanced/)

  • Multi-Cloud Secrets: Manage secrets across AWS, Azure, GCP, and HashiCorp Vault
  • CI/CD Pipeline: Complete testing and deployment workflow
  • Data Processing: ETL workflows with database integration
  • Monitoring Alerts: System health checks with conditional notifications

Running Examples

# List available examples
find examples/ -name "*.yaml" | sort

# Run a basic example
automax run --config examples/config/config.yaml --steps basic/local-commands

# Run an advanced example
automax run --config examples/config/config.yaml --steps advanced/ci-cd-pipeline

See the Using Examples Guide for detailed instructions.


🧩 Programmatic Usage

from automax import run_automax

rc = run_automax(
    steps=["1", "2:1"],
    config_path="examples/config/config.yaml",
    dry_run=True,
)
print("Exit code:", rc)

πŸ’» Development: Running without installation

During development (without 'pip install .'):

# Option 1: Python module
python -m automax list-steps --config examples/config/config.yaml

# Option 2: Direct script
python src/automax/cli/cli.py list-steps --config examples/config/config.yaml

πŸ› οΈ Offline Utilities

Automax provides standalone Python utilities for offline validation:

  • validate_step.py: Validate a single step YAML file using config and plugin schemas.
  • validate_plugin.py: Validate all plugins in the plugins directory.
  • check_step_deps.py: Verify step dependencies and plugin references.
  • check_config.py: Validate config YAML structure and required keys.
  • dry_run_validate.py: Execute steps in dry-run mode programmatically.
  • lint_yaml.py: Check YAML files for syntax errors.

🧩 Extending Steps

  1. Copy examples/steps/ to your project.
  2. Add stepX/ folder with:
    • stepX.yaml (required)
    • stepX.py (optional hooks)
  3. Update your config.yaml:
    steps_dir: "path/to/your/steps"

Example stepX.yaml:

description: "My custom step"
substeps:
  - id: "1"
    description: "Run command"
    plugin: "run_local_command"
    params:
      command: "echo hello world"

πŸ§ͺ Running Tests

export PYTHONPATH=$(pwd)/src
pytest -v

πŸ‘₯ Contributing

We welcome contributions from the community! Whether you're fixing bugs, adding new features, or improving documentation, your help is appreciated.

Getting Started

Quick Contribution

  1. Fork the repository
  2. Create a feature branch: git checkout -b feat/amazing-feature
  3. Make your changes and test: pytest
  4. Ensure code quality: isort . && black . && flake8 && docformatter -r .
  5. Commit your changes: git commit -m "feat: add amazing feature"
  6. Push and open a Pull Request

Development Tools

We use modern Python tooling:

  • Code formatting: isort . && black .
  • Linting: flake8
  • Docstring formatting: docformatter -r .
  • Testing: pytest with 90%+ coverage goal

See the development utilities guide for more details.


πŸ’ Support & Donations

If you find Automax useful and would like to support its ongoing development β€” including new features, security updates, long-term maintenance and documentation β€” you can support the project in several ways:

β˜• GitHub Sponsors

Ideal for recurring monthly support.

β‚Ώ Bitcoin Donations (one-time)

If you prefer crypto donations, you can support the project via Bitcoin:

Bitcoin Address: 36jDV57roGb4o59TwK1CB7viPrXToQHGiP

πŸ’¬ Commercial Support / Custom Integrations

If your organization needs custom features, support SLAs, or dedicated development, please contact the maintainer for commercial licensing options.


🧾 License

This project is distributed under a Modified License: MIT License (with Commercial Use Clause).

You are free to use, copy, modify, and distribute the software for non-commercial purposes under the terms of the MIT License.

Commercial use β€” including integration into products, services, or projects that generate revenue β€” requires a separate commercial license.

About

Modular YAML-driven automation framework with CLI, plugins, and offline validation utilities.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages