Infrastructure as Code command line utility designed for cloudops engineers
Project description
iac
iac is a deterministic, serial runbook CLI for infrastructure and operations automation.
Current release: 0.1.0a1 (alpha).
Core Commands
iac init book <name>iac list books|steps|modules --output table|json|yamliac get book <ref> --output table|json|yamliac get step <book@step> --output table|json|yamliac get module <module> --output table|json|yamliac check module <module> --output table|json|yamliac check modules --output table|json|yamliac run fn <module@function> --output table|json|yamliac check book <ref> --output table|json|yamliac deps install <ref> [--apply] --output table|json|yamliac run cmd <command>iac run book <ref>iac run step <book@step>
Run execution supports:
- one-off command execution with stdin helpers:
--stdin-file,--stdin-text,--stdin-json,--stdin-env - command argv mode:
--no-shellwith repeatable--arg - stdout/stderr file management:
--stdout-file,--stderr-file,--file-mode - step selection controls:
--from-step,--to-step,--only-step,--skip-step,--tag - timeout override:
--timeout - retry overrides:
--retries,--retry-delay
Runbook Schema (kind: pyplines.runbook.v1)
Top-level keys:
kind(must bepyplines.runbook.v1)nametitledescriptiontagsinputspackageshooksstepsoutputs
Runbooks use CEL expressions for dynamic references in:
steps[].whensteps[].vars.*steps[].outputs.*outputs.*.whenoutputs.*.value
Run with typed input overrides:
iac run book runbook_spec_draft --input month=2026-03 --output yaml
iac run step runbook_spec_draft@export_csv --input month=2026-03
Inputs
inputs defines typed run parameters. Use iac run book ... --input key=value to override defaults.
inputs:
month:
type: string
regex: '^\d{4}-(0[1-9]|1[0-2])$'
accounts:
type: array
default: ["prod"]
minItems: 1
include_pdf:
type: boolean
default: false
Supported types: string, boolean, array, integer, number.
Packages
packages declares runbook dependencies:
packages:
os:
- name: bash
min_version: ">=3.2.0"
check: "bash --version"
py:
- name: requests
min_version: ">=2.32.5"
Install hints are derived automatically:
os->dnf install -y <name>py->python3 -m pip install <name>[constraint]
Steps
Each step must define exactly one executor:
sh(safe argv-style command list)fn(module@function)
Both executors support:
vars(CEL-evaluated bindings)when(CEL condition)outputs(CEL projection forsteps.<name>.outputs.*)timeout,retries,retry_delay,on_fail
Example:
steps:
- name: export_csv
sh: ["python3", "-m", "reporting.export", "--month", "$MONTH"]
vars:
MONTH: inputs.month
outputs:
csv_url: json(result.stdout).csv_url
Failure Policy
Step on_fail and hook on_fail are both standardized to:
halt: stop execution immediatelywarn: continue, emit warningpass: continue quietly (non-blocking failure)
Step Execution Controls
Each step can define:
timeout(seconds,> 0)retries(integer,>= 0)retry_delay(seconds,>= 0)
iac run reports include attempt counts (ATTEMPTS) and prints a failure summary with a rerun hint when a hard failure occurs.
Packaging
pyproject.toml is configured for explicit package discovery with:
[tool.setuptools.packages.find]
include = ["iac*"]
This avoids accidental inclusion of books/ as a Python package.
PyPI Publishing
This project is configured for release publishing with GitHub Actions in:
.github/workflows/publish-pypi.yml
Release flow:
- Create/publish a GitHub release.
- Workflow runs tests, builds sdist/wheel, validates with
twine check. - On release events, package is published to PyPI via trusted publishing.
Prerequisite:
- Configure PyPI trusted publisher for this GitHub repository and workflow in the PyPI project settings.
Known Limitations (Alpha)
- Coverage gate is enforced at 100% for the alpha-tested scope defined in
pyproject.tomlcoverage omit rules. iac run cmdJSON/YAML output is structured, but command stdout/stderr still stream unless--quietis set.- Dependency install commands are advisory;
iac deps install --applyexecutes derived package install hints.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file iac-0.1.0a5.tar.gz.
File metadata
- Download URL: iac-0.1.0a5.tar.gz
- Upload date:
- Size: 56.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f151eed0692735f00a02cb5dc20a2accbd0ab5e8751def15a76568938eaaa817
|
|
| MD5 |
b080b5f7580abf7b307135754a523cab
|
|
| BLAKE2b-256 |
391ee54c591b44880f8cd5e957e21341da85ec1de4e0c4f32f205ee48e77ccb4
|
Provenance
The following attestation bundles were made for iac-0.1.0a5.tar.gz:
Publisher:
publish-pypi.yml on pyplines/iac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iac-0.1.0a5.tar.gz -
Subject digest:
f151eed0692735f00a02cb5dc20a2accbd0ab5e8751def15a76568938eaaa817 - Sigstore transparency entry: 1012970795
- Sigstore integration time:
-
Permalink:
pyplines/iac@31569ebf3d237d287b94961232fef02aa3d1f4ee -
Branch / Tag:
refs/tags/0.1.0a5 - Owner: https://github.com/pyplines
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@31569ebf3d237d287b94961232fef02aa3d1f4ee -
Trigger Event:
release
-
Statement type:
File details
Details for the file iac-0.1.0a5-py3-none-any.whl.
File metadata
- Download URL: iac-0.1.0a5-py3-none-any.whl
- Upload date:
- Size: 56.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8540c8c268a356261af5065d15148a9c89fa432d3c4d2c25b801edefc97f496e
|
|
| MD5 |
74aab3fc4e4931b0a62e120f917de6c8
|
|
| BLAKE2b-256 |
b03453221a82f00a30fde181dd27f1abf2a6543840af6a53522f5a12b600900f
|
Provenance
The following attestation bundles were made for iac-0.1.0a5-py3-none-any.whl:
Publisher:
publish-pypi.yml on pyplines/iac
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
iac-0.1.0a5-py3-none-any.whl -
Subject digest:
8540c8c268a356261af5065d15148a9c89fa432d3c4d2c25b801edefc97f496e - Sigstore transparency entry: 1012970854
- Sigstore integration time:
-
Permalink:
pyplines/iac@31569ebf3d237d287b94961232fef02aa3d1f4ee -
Branch / Tag:
refs/tags/0.1.0a5 - Owner: https://github.com/pyplines
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@31569ebf3d237d287b94961232fef02aa3d1f4ee -
Trigger Event:
release
-
Statement type: