Skip to content

Latest commit

 

History

382 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ArchLex

Ask Claude, Cursor, or Codex to diagram your cloud. ArchLex validates AWS, GCP, and Kubernetes — then renders official-icon SVG you can read, diff, and share.

10 seconds

npx skills add baires/archlex
claude mcp add --transport http archlex https://mcp.archlex.dev/mcp

Then ask:

Diagram a serverless API on AWS with API Gateway, Lambda, and DynamoDB.

You get a validated diagram, the exact ArchLex source, and a playground link. No API key.

More clients: Use with AI agents.

Visual output

Serverless API

Serverless API architecture diagram

direction LR
provider aws

api-gateway -[invokes]-> lambda -[writes]-> dynamodb

Multi-region infrastructure

Multi-region architecture diagram

direction LR
provider aws

account global-core {
  region us-east-1 {
    vpc primary-vpc {
      subnet app-subnet-1 {
        app_primary: ecs
        db_primary: rds
        cache_primary: elasticache
        app_primary > cache_primary
        app_primary > db_primary
      }
    }
  }
  region us-west-2 {
    vpc failover-vpc {
      subnet app-subnet-2 {
        app_secondary: ecs
        db_replica: rds
        app_secondary > db_replica
      }
    }
  }
}

global_dns: route53
global_dns -[routes]->|primary| app_primary
global_dns -[routes]->|failover| app_secondary
db_primary -[replicates]-> db_replica

The source stays reviewable. The renderer stays deterministic.

Language

direction LR
provider aws

vpc production {
  subnet public {
    api-gateway["API Gateway"] > lambda["Auth Service"]
  }
  subnet private {
    lambda["Auth Service"] -[writes]->|SQL| dynamodb["Users Table"]
  }
}
  • Directives: provider aws|gcp|k8s, direction LR|RL|TB|BT, validation normal|strict|off, theme light|dark
  • Resources: rds, primary: rds, primary: rds["Primary DB"]
  • Edges: a > b, a -> b, a -[writes]-> b, a -[writes]->|SQL| b

Language specification · Playground

MCP

Remote server: https://mcp.archlex.dev/mcp

Client Setup
Claude Code claude mcp add --transport http archlex https://mcp.archlex.dev/mcp
Codex codex mcp add archlex --url https://mcp.archlex.dev/mcp
Cursor { "mcpServers": { "archlex": { "url": "https://mcp.archlex.dev/mcp" } } }

Tools: render_diagram, validate_diagram, get_cloud_catalog, generate_playground_url.

Embed in an app

npm install @archlex/core @archlex/aws @archlex/gcp @archlex/k8s
import {
  awsProvider,
  createArchLex,
  gcpProvider,
  k8sProvider,
} from "@archlex/core";

const archlex = createArchLex({
  providers: [awsProvider(), gcpProvider(), k8sProvider()],
});

const result = await archlex.render(`
direction LR
provider aws

alb -[routes]-> ecs
ecs -[writes]-> rds
`);

console.log(result.svg);

Getting started · Public API

Providers

Provider ID Package Example resources
AWS aws @archlex/aws Lambda, ECS, RDS, S3
Google Cloud gcp @archlex/gcp Cloud Run, GKE, Cloud SQL, BigQuery
Kubernetes k8s @archlex/k8s Deployment, Service, Ingress, StatefulSet

Documentation

License

MIT. Icons from AWS, Google Cloud, and Kubernetes. Layout by ELK.

About

Ask Claude to diagram AWS, GCP, or Kubernetes. Semantic DSL → validated official-icon SVG. MCP + agent skill. No API key.

Topics

Resources

Code of conduct

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages