Skip to Content
Introduction

ArchLex Documentation

ArchLex turns text architecture definitions into accessible SVG diagrams. One language covers AWS, Google Cloud, Kubernetes, and Cloudflare. Agents write it. Humans can still read it.

Start here

  1. Use with AI agents — install the skill, connect MCP, ask for a diagram.
  2. Open the playground  to edit the source yourself.
  3. Getting Started walks through the TypeScript API when you want to embed ArchLex.

Supported Providers

ProviderDirectivePackageExample resources
AWSprovider aws@archlex/awsLambda, ECS, RDS, S3
Cloudflareprovider cloudflare@archlex/cloudflareWorkers, R2, DNS, Tunnel
Google Cloudprovider gcp@archlex/gcpCloud Run, GKE, Cloud SQL, BigQuery
Kubernetesprovider k8s@archlex/k8sDeployment, Service, Ingress, StatefulSet

Cloudflare includes 92 resources with bundled artwork and root/account containment validation. See the Cloudflare pack guide for aliases, connectors and mixed-provider examples. Validation does not establish runtime connectivity, security-policy effectiveness or failover health.

First Render

Install the core and provider packages:

npm install @archlex/core @archlex/aws @archlex/cloudflare @archlex/gcp @archlex/k8s

Register one shared provider set. Each source selects a default with the provider directive; qualified kinds can combine registered providers.

import { awsProvider, cloudflareProvider, createArchLex, gcpProvider, k8sProvider, } from "@archlex/core"; const archlex = createArchLex({ providers: [awsProvider(), cloudflareProvider(), gcpProvider(), k8sProvider()], }); const result = await archlex.render(` direction LR provider aws validation normal alb -[routes]-> ecs ecs -[writes]-> rds `); console.log(result.svg);

Choose Your Next Page

  • Use with AI agents: skill, MCP, and a first prompt for Claude, Cursor, and Codex.
  • Getting Started walks through setup, provider examples, rendering, and diagnostics.
  • Language Specification defines directives, scopes, resources, containment, and relationships.
  • Public API covers parsing, analysis, icon preparation, rendering, and catalog access.
  • AWS, Google Cloud, and Kubernetes pages list provider contracts and rules.
  • Cloudflare Pack covers Cloudflare usage, aliases, containment, artwork and four complete examples.
  • Error Reference explains diagnostic families, severity, validation modes, and remediation.

Use the interactive playground  when you want to edit an example and inspect the SVG beside its diagnostics.

Last updated on