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 (v1)
Top-level keys:
versionnametitledescriptiontagsvarsrequiressensitivehookssteps
Step command modes are mutually exclusive:
argv(explicit tokens)shell(inline shell block/string)script(resolved script file path)
Vars
vars is the single parameter surface.
Override precedence:
book.varsIAC_VARS(k=v,k2=v2or whitespace-separated)IAC_VAR_*(example:IAC_VAR_AWS_REGION=us-east-1maps toaws_region)- repeated
--var key=value
Templating:
{{ var_name }}for vars${ENV_NAME}for host environment passthrough in any YAML string
Script resolution directories can be configured via:
IAC_SCRIPT_DIRS(preferred)IAC_SCRIPTS_DIRS(alias)IAC_MODULE_DIRS(preferred)IAC_MODULES_DIRS(alias)
Defaults include ./scripts, ./.iac/scripts, ~/.iac/scripts, and ..
Sensitive
sensitive is a list of var keys. Values for those keys are redacted from command display, console output, artifact logs, and reports.
sensitive:
- api_token
- aws_secret_access_key
Requires
requires declares executable dependencies and optional install hints.
requires:
- name: tofu
min_version: ">=1.8.0"
check: "tofu version"
install:
darwin: "brew install opentofu"
ubuntu: "apt-get update && apt-get install -y opentofu"
Supported install target keys:
darwin, ubuntu, debian, redhat, rhel, fedora, alpine, arch, amzn, windows.
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 in
requires.installare advisory; they execute exactly as declared wheniac deps install --applyis used.
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.0a4.tar.gz.
File metadata
- Download URL: iac-0.1.0a4.tar.gz
- Upload date:
- Size: 59.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3394f233811c3a90ad02027676c8b2236d484a73e701769ce9dee533f7c042dd
|
|
| MD5 |
bb93e70e3b601754d218dc31d5eecf28
|
|
| BLAKE2b-256 |
e02f3b0ea42892a029977b59ebeadf8198c39a4ec64bbccd7e4d96edc862f784
|
Provenance
The following attestation bundles were made for iac-0.1.0a4.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.0a4.tar.gz -
Subject digest:
3394f233811c3a90ad02027676c8b2236d484a73e701769ce9dee533f7c042dd - Sigstore transparency entry: 1006378237
- Sigstore integration time:
-
Permalink:
pyplines/iac@75e2cee1d932d79dfbfdd74576d0b1e52ca710f7 -
Branch / Tag:
refs/tags/0.1.0a4 - Owner: https://github.com/pyplines
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@75e2cee1d932d79dfbfdd74576d0b1e52ca710f7 -
Trigger Event:
release
-
Statement type:
File details
Details for the file iac-0.1.0a4-py3-none-any.whl.
File metadata
- Download URL: iac-0.1.0a4-py3-none-any.whl
- Upload date:
- Size: 60.5 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 |
36cdefc472169b5a2d24c0343da3529d9c0dbc2712d7fade9cb34abf2d8ed98d
|
|
| MD5 |
34a9cc9b186f028bd8d31e5c375442b3
|
|
| BLAKE2b-256 |
2f4800b1cfc8bce878d7b898ef44cdaef9ee9b25e9165410fb12838d459c3f09
|
Provenance
The following attestation bundles were made for iac-0.1.0a4-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.0a4-py3-none-any.whl -
Subject digest:
36cdefc472169b5a2d24c0343da3529d9c0dbc2712d7fade9cb34abf2d8ed98d - Sigstore transparency entry: 1006378243
- Sigstore integration time:
-
Permalink:
pyplines/iac@75e2cee1d932d79dfbfdd74576d0b1e52ca710f7 -
Branch / Tag:
refs/tags/0.1.0a4 - Owner: https://github.com/pyplines
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yml@75e2cee1d932d79dfbfdd74576d0b1e52ca710f7 -
Trigger Event:
release
-
Statement type: