Skip to main content
Glama
README.md
<div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="./brand/archlang-wordmark.svg" />
  <img src="./brand/archlang-wordmark-black.svg" alt="ArchLang" width="440" />
</picture>

### Floor plans as code.

Write a floor plan as text. Get a precise, dimensioned drawing back.

<a href="https://playground.archlang.uk"><img src="./.github/readme/pill-playground.svg" height="40" alt="Playground"></a> <a href="https://archlang.uk"><img src="./.github/readme/pill-docs.svg" height="40" alt="Docs"></a> <a href="https://archlang.uk/gallery"><img src="./.github/readme/pill-gallery.svg" height="40" alt="Gallery"></a> <a href="https://www.npmjs.com/package/@chanmeng666/archlang"><img src="./.github/readme/pill-npm.svg" height="40" alt="npm"></a>

No install: [ArchLang app in ChatGPT](https://chatgpt.com/plugins/plugin_asdk_app_6acf8381cca08191bfb3eb7305fb6970) or add `https://mcp.archlang.uk/mcp` as a claude.ai connector.

</div>

<br>

## Send this to your agent
Paste this into any coding agent. The skills are listed on skills.sh: https://skills.sh/ChanMeng666/archlang
```text
1. Run: npx -y skills add ChanMeng666/archlang --yes
2. Run: npx -y @chanmeng666/archlang spec   (read it before writing anything)
3. Write my floor plan as plan.arch from this brief: <describe rooms, areas, adjacencies>
4. Run: npx -y @chanmeng666/archlang compile plan.arch -o plan.svg --json
   then describe plan.arch --json, validate plan.arch --strict --json (same prefix); fix, recompile
5. Run: npx -y @chanmeng666/archlang finish plan.arch, then compile again to export.
```
For MCP clients: `claude mcp add archlang -- npx -y @chanmeng666/archlang-mcp`.

<a href="https://playground.archlang.uk"><img src="./.github/readme/card.svg" width="100%" alt="ArchLang compiles plain-text source into floor plans. The card shows source being typed and the drawing compiling beside it: five example plans, one constant changed, and a lint finding raised and cleared."></a>

<br>



https://github.com/user-attachments/assets/a60f3174-6a8c-4a42-b24a-fac030d39627



## Try it

```bash
npx skills add ChanMeng666/archlang
```

Then ask your coding agent:

> *Design a one-bedroom flat of about 54 m², with the front door on the north wall.*

It writes the plan, compiles it and checks it. This one is 57 lines of text:

<div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Vy7eXb969Lof7sttudtMrjvvqz_fE79BOe8VY7Zrs0M6k5Pp4m-uRUnfstjWRknR26gG78dl4g3dyz67dSRRxON7EFbMCmK28NWmRzrzRc27X8N7Xp2XuZrPAEUdSbGO3DbaFCNFddwgPQYjmL0C0s3oZjL16CGKkvggxdSsb2X-VhdRgD6KPtxXDr9KNgCzevf7h5ZuLF78OoD01FhOeOc-5Cw3nDx5FGT2rJdMmSuPmrpyR9FUCjTSpWb48uDbBTOobsY1uCU-xYi8gFlWeSRPTTSdfBfKFRPBkQwxQm6tMM90z8i2H68DpqjOAlWMQps55bSxFHu7lRYTtCO7uGxMXo1scpHE1tktMXnZnSq2PjlNDbXGynh2gKUu-WWenwyOl1ufbdfdWzHv7fSLp-QqV9JlvCY3GLaFzpdap8h34L25G-9jtfurqnrbOMI1jS2_cYWzX8T6CdxPu2CW0ll10y0xNfnv0unzJ3lyf7NB7T14L3B35lWvYtwFkr-wEyEw3ATaqz-8UoZnijkyK1TAnsGvw0y5tx0qtT-8ATCgYi_sk2hpkHjskTpRaH4_Tzogm1nKLWnr3G0_jvVtempbLyQ16L_y0uiA770FTZPRGanRyoM4ODk96uC1ui_8A"><img src="./examples/laneway-house.svg" alt="A one-bedroom laneway house, compiled from 57 lines of ArchLang. Click to open it in the playground." width="620" /></a>

<sub>Click the drawing to open this exact plan in the playground. Change a number and it redraws.</sub>
</div>

## Why text

- **Change one number, and one thing moves.** Nothing else is redrawn.
- **The same source gives the same drawing**, byte for byte.
- **An agent can check its own plan** without ever looking at an image.

```mermaid
flowchart LR
    B([Brief]) --> W[Write .arch]
    W --> C{Compiles?}
    C -->|no| F[Apply the fix<br/>the error carries] --> C
    C -->|yes| V{Matches<br/>the brief?}
    V -->|no| W
    V -->|yes| O([SVG · DXF · PDF · PNG])
```

## Change one room without moving the others

Name the elements you want to keep with an `id=`, then ask the compiler whether an edit touched them. It exits 2 if one moved:

```bash
npx -y @chanmeng666/archlang impact new.arch --against old.arch --lock r_main,d_front,w_main
```

A worked example is on [archlang.uk/edit-one-room](https://archlang.uk/edit-one-room). Starting from a photo or PDF? ArchLang does not read images, but your own assistant can: [archlang.uk/from-an-image](https://archlang.uk/from-an-image).

## Recently added

Each links to a short section with an example, on [archlang.uk/whats-new](https://archlang.uk/whats-new), which also lists the version that brought it.

- [Quantities and takeoff](https://archlang.uk/whats-new#quantities-and-takeoff): `archlang takeoff plan.arch --format csv`
- [Locked elements](https://archlang.uk/whats-new#locked-elements): `archlang impact new.arch --against old.arch --lock shell,front`
- [Wall status](https://archlang.uk/whats-new#wall-status): `status existing|demolish|new`, demolition drawn dashed
- [Imperial lengths](https://archlang.uk/whats-new#imperial-lengths): `12ft6in`
- [Review sheet](https://archlang.uk/whats-new#review-sheet): `archlang preview plan.arch --review`
- [Circulation overlay](https://archlang.uk/whats-new#circulation-overlay): `archlang compile plan.arch --overlay circulation`
- [Stacked storeys](https://archlang.uk/whats-new#stacked-storeys): `keep stacked core on levels 1 2`
- [Intent across storeys](https://archlang.uk/whats-new#intent-across-storeys): `archlang validate plan.arch --intent intent.json`
- [What Plan JSON leaves out](https://archlang.uk/whats-new#what-plan-json-leaves-out): `archlang compile plan.arch -f json`
- [More lint reports](https://archlang.uk/whats-new#more-lint-reports): `W_WALL_END_SHORT`, `W_FURNITURE_ON_STAIR`
- [L-shaped rooms](https://archlang.uk/whats-new#l-shaped-rooms): a rectilinear `room polygon` in `walls from rooms`
- [Turning stairs](https://archlang.uk/whats-new#turning-stairs): `stair id=s dir up width 1000 { flight … landing … flight … }`
- [Window kinds](https://archlang.uk/whats-new#window-kinds): `window fixed|casement|tilt|tilt_turn|sliding`, `door glazed_sliding`
- [Corner windows](https://archlang.uk/whats-new#corner-windows): `window on r.top at corner r.right width 1800`
- [Furnishing every storey](https://archlang.uk/whats-new#furnishing-every-storey): `archlang finish` on a plan with `level` blocks
- [Labels in small rooms](https://archlang.uk/whats-new#labels-in-small-rooms): a name that does not fit shrinks
- [Net area in the stamp](https://archlang.uk/whats-new#net-area-in-the-stamp): `schedule rooms net`
- [Sheet text](https://archlang.uk/whats-new#sheet-text): `sheet text { total "SUMME" decimal "," }`
- [Hidden sheet marks](https://archlang.uk/whats-new#hidden-sheet-marks): `north hidden`, `scale hidden`, `title hidden`
- [One mirrored piece](https://archlang.uk/whats-new#one-mirrored-piece): `furniture … mirror`
- [Room floors](https://archlang.uk/whats-new#room-floors): `room … floor tile|paving|deck|concrete`
- [More furniture](https://archlang.uk/whats-new#more-furniture): twenty new catalogued families
- [The rendered theme](https://archlang.uk/whats-new#the-rendered-theme): `theme rendered` fills furniture symbols in a tint of their material

## For your agent

This page is all a person needs. Everything else is written for agents: clone the repo and point yours at [`AGENTS.md`](AGENTS.md), or give it the whole language in one call:

```bash
npx -y @chanmeng666/archlang context
```

<sub>[Full overview](docs/overview.md) · [Language reference](docs/language-reference.md) · [Release notes](https://github.com/ChanMeng666/archlang/blob/main/CHANGELOG.md) (installed: `node_modules/@chanmeng666/archlang/CHANGELOG.md`) · [Contributing](CONTRIBUTING.md) · [MIT](LICENSE)</sub>

<sub>[ArchCanvas](https://github.com/archcanvas/archcanvas) is a hosted app built on ArchLang. Built by [Chan Meng](https://github.com/ChanMeng666).</sub>

TDQS

A4.1/5.0

Scored across 11 tools

Disambiguation4/5

Most tools have clearly distinct purposes, but a few pairs require careful reading: fix vs repair both edit source, lint vs validate both report diagnostics, and score vs validate both check intent. The descriptions explicitly delineate these boundaries, so misselection is unlikely but not impossible.

Naming Consistency5/5

All tool names are single lowercase imperative verbs with no mixed conventions or underscores. The pattern is predictable throughout the set.

Tool Count5/5

Eleven tools is well within the appropriate range for a language tooling server covering authoring, validation, repair, finishing, and sharing. Each tool appears to earn its place without obvious redundancy.

Completeness4/5

The surface covers the full lifecycle: completion, compile, validate, lint, fix, repair, suggest, finish, describe, score, and link. Minor gaps like a dedicated format/explain tool are not critical, as compile and diagnostics cover those needs.

Maintenance

ActivityActive
ResponsivenessSyncing