Architecture as Code - Define C4 Models in YAML | Archyl

Declare your entire C4 architecture model in a single archyl.yaml file. Version-controlled, CI/CD-synced, and fully declarative.

Define Your Architecture in YAML, Sync via CI/CD

Store your architecture model as an archyl.yaml file in Git. Review architecture changes in PRs, sync via GitHub Actions, and treat your architecture with the same rigor as your code.

Architecture as Code | YAML + Git + CI/CD | Archyl

Define your architecture as code in YAML, store it in Git, review changes in PRs, and sync via GitHub Actions. Treat architecture with the same rigor as code.

architecture as code, architecture as code tool, architecture YAML, architecture Git, architecture CI/CD, GitOps architecture

Architecture lives outside version control

Your code is in Git, but your architecture model is in a diagramming tool or wiki. There's no history, no diffs, no pull requests for architecture changes.

No review process for architecture

Code changes get reviewed in PRs, but architecture changes happen ad-hoc. There's no formal process to catch risky structural decisions.

Manual sync is error-prone

Keeping your architecture tool in sync with reality requires manual updates. People forget, make mistakes, or simply skip the step.

Export or write your archyl.yaml

Define your C4 model in a clean YAML format. Export from the Archyl UI or write it from scratch. Commit it to your repo.

Review in pull requests

When architecture changes, the YAML diff shows exactly what changed. Reviewers can approve or request changes just like code.

Sync via GitHub Action

On merge, Archyl's GitHub Action syncs the YAML file to your Archyl project. Your visual model updates automatically.

Bidirectional updates

Changes made in the Archyl UI can be exported back to YAML. The flow works in both directions.

Human-readable YAML schema for your entire C4 model: systems, containers, components, relationships, technologies, and metadata.

Every architecture change is a Git commit. See who changed what, when, and why. Roll back to any previous state.

PR-based architecture reviews

Architecture changes go through the same review process as code. YAML diffs make structural changes visible and reviewable.

Archyl's official GitHub Action syncs your YAML on push or merge. Zero manual steps after initial setup.

Edit in the UI, export to YAML. Edit the YAML, sync to the UI. Both workflows are fully supported.

Run conformance checks as part of the PR pipeline. Block architecture changes that violate your defined rules.

GitOps for architecture

Teams that practice GitOps can extend the same workflow to architecture. One YAML file, one repo, one review process.

Multi-team architecture governance

Each team owns their section of the YAML. Changes are reviewed by architecture leads. Merge conflicts surface structural disagreements.

Architecture change tracking

Need to know when a dependency was added or a component was renamed? Git blame and git log on your archyl.yaml tell the full story.

Treat architecture like code

Put your architecture in Git, review it in PRs, and sync it via CI/CD. The same rigor you apply to code, applied to architecture.