AI-assisted structural engineering workspace for AEC workflows.
Quick Start · Try It · Why · Engines · Architecture · Docs · 中文
StructureClaw-demo.mp4
Use the bootstrap installer when the machine does not already have Node.js 20+ and npm:
curl -fsSL https://raw.githubusercontent.com/structureclaw/structureclaw/master/scripts/install.sh | bashWindows PowerShell:
irm https://raw.githubusercontent.com/structureclaw/structureclaw/master/scripts/install.ps1 | iexThe installer lets interactive users confirm or edit StructureClaw Home before it prints the final install plan. Press Enter to keep ~/.structureclaw, or type another path to change the workspace/runtime directory. It reuses existing Node.js 20+ installations and prepares a user-local Node.js 24 runtime when needed, installs @structureclaw/structureclaw@latest, adds the user-local npm bin directory to PATH, and runs sclaw doctor. On Windows, the bootstrap Node runtime is installed under %LOCALAPPDATA%\Programs\nodejs; on Linux, it is installed under ${XDG_DATA_HOME:-~/.local/share}/nodejs.
If Node.js 20+ and npm are already installed:
npm install -g @structureclaw/structureclaw
sclaw doctor
sclaw startOpen the local workspace printed by sclaw start. sclaw doctor creates the runtime workspace, checks LLM settings, prepares SQLite, and installs the Python analysis environment when needed.
git clone https://github.com/structureclaw/structureclaw.git
cd structureclaw
./sclaw doctor
./sclaw start
./sclaw statusWindows PowerShell from source:
node .\sclaw doctor
node .\sclaw start
node .\sclaw statusChina mirror entrypoint:
sclaw_cn doctor
sclaw_cn startAfter the workspace opens, try:
Model a two-story steel frame, 6 m by 4 m bay, 3.6 m story height, Q355 steel columns and beams, dead load 5 kN/m2 and live load 2 kN/m2. Build the model, run static analysis, check GB50017, and generate a short report.
Expected flow:
draft model -> validate -> run analysis -> code-check -> report
Use OpenSees for a fully open local run. Select PKPM or YJK only when the corresponding commercial software and authorization are available on the machine.
StructureClaw turns a natural-language structural description into a traceable engineering workflow:
describe -> draft model -> validate -> analyze -> code-check -> report
What makes it useful:
- Chat-first modeling: describe a frame, truss, portal frame, or generic structure and let the agent build a computable model.
- Real analysis handoff: run OpenSees, PKPM SATWE, or YJK through the same backend-hosted analysis contract.
- Traceable engineering artifacts: keep model drafts, validation results, tool calls, analysis outputs, checks, and reports visible.
- Local-first runtime: installed mode stores data in the user runtime directory instead of the package directory.
- Extensible skills and tools: combine built-in skills with user-local skills/tools under the runtime workspace.
| Engine | Skill | Best for | Requirements |
|---|---|---|---|
| OpenSees | opensees-* |
Open, repeatable static/dynamic/seismic/nonlinear analysis | Python analysis environment prepared by sclaw doctor |
| PKPM SATWE | pkpm-static |
Commercial-engine static checks and SATWE comparison | Local PKPM installation, JWSCYCLE.exe, valid license |
| YJK 8.0 | yjk-static |
YDB conversion, YJK static calculation, structured result extraction | Local YJK 8.0 installation, bundled Python 3.10, valid authorization |
Commercial engines are explicit selections and require local software installation. StructureClaw does not bundle PKPM or YJK.
flowchart LR
User[Engineer in chat UI] --> Web[Next.js workspace]
Web --> API[Fastify backend]
API --> Agent[LangGraph agent runtime]
Agent --> Skills[Skill layer]
Agent --> Tools[Tool layer]
Tools --> Analysis[Python analysis runtime]
Analysis --> OpenSees[OpenSees]
Analysis --> PKPM[PKPM SATWE]
Analysis --> YJK[YJK 8.0]
Tools --> Reports[Reports and artifacts]
Main directories:
frontend/: Next.js 14 applicationbackend/: Fastify API, agent/chat flows, Prisma integration, and analysis execution hostscripts/: startup helpers and thesclaw/sclaw_cnCLI implementationtests/: regression runner (node tests/runner.mjs ...), install smoke, and CI-covered frontend checks (type-check, Vitest, lint) after native smokedocs/: user handbook and protocol references
| Mode | Command | Data directory | Process model |
|---|---|---|---|
| bootstrap installer | scripts/install.sh / scripts/install.ps1 |
user runtime directory plus user-local Node/npm prefix | installs Node if missing, then installs the npm package |
| npm install | sclaw start |
user runtime directory, defaulting to ~/.structureclaw/ |
backend serves the exported frontend in one process |
| source checkout | ./sclaw start |
user runtime directory, defaulting to ~/.structureclaw/ |
backend and frontend run as development processes |
Recommended local flow:
./sclaw doctor
./sclaw start
./sclaw statusChina mirror flow (same subcommands, mirror defaults enabled):
./sclaw_cn doctor
./sclaw_cn start
./sclaw_cn statusBootstrap installer mirror flow:
curl -fsSL https://raw.githubusercontent.com/structureclaw/structureclaw/master/scripts/install.sh | bash -s -- --cn& ([scriptblock]::Create((irm https://raw.githubusercontent.com/structureclaw/structureclaw/master/scripts/install.ps1))) -CnNotes:
scripts/install.shandscripts/install.ps1are intended for first-time users. They reuse existing Node.js 20+ installations and install Node.js 24 into a generic user-level Node.js directory ifnode/npmare missing or too old, then runnpm install -g @structureclaw/structureclaw@latest.- The bootstrap installers use a user-local npm prefix by default (
~/.structureclaw/npm-global), avoiding root/admin global npm writes. - SQLite is now the default local database.
./sclaw startuses~/.structureclaw/data/structureclaw.start.db, and./sclaw doctoruses~/.structureclaw/data/structureclaw.doctor.dbso preflight checks do not touch the active local runtime database. ./sclaw doctorno longer requires a preinstalled system Python 3.12. It will ensureuvand prepare a virtual environment with Python 3.12 automatically when needed. On Windows, this automatic setup currently requireswinget; ifwingetis unavailable, installuvmanually before running./sclaw doctor.- If your old local
.envstill pointsDATABASE_URLat a local PostgreSQL instance,./sclaw doctorand./sclaw startwill auto-migrate that data into SQLite, rewrite.envto the SQLite default, and keep the original PostgreSQL URL inPOSTGRES_SOURCE_DATABASE_URL. - That first auto-migration also creates a local backup file like
.env.pre-sqlite-migration.<timestamp>.bak. sclaw_cndefaults to China mirror settings when unset:PIP_INDEX_URL=https://pypi.tuna.tsinghua.edu.cn/simple,NPM_CONFIG_REGISTRY=https://registry.npmmirror.com.- You can override mirror values in
.envor shell environment (PIP_INDEX_URL,NPM_CONFIG_REGISTRY,APT_MIRROR).
Useful follow-up commands for source checkouts:
./sclaw logs
./sclaw stop
# Requires a source checkout:
node tests/runner.mjs backend-regression
node tests/runner.mjs analysis-regressionUse the built-in CLI batch convert command to transform structure model JSON files and write a summary report:
./sclaw convert-batch --input-dir tmp/input --output-dir tmp/output --report tmp/report.json --target-format compact-1Windows PowerShell:
node .\sclaw doctor
node .\sclaw start
node .\sclaw status
node .\sclaw logs all --follow
node .\sclaw stopStructureClaw 1.0 uses settings.json as the user-facing configuration file. sclaw doctor creates it, and the General Settings panel writes the same settings through the backend admin API.
Configuration resolution:
- Runtime
settings.json - Built-in defaults
Selected environment variables still participate as runtime fallbacks or directory controls. PORT, FRONTEND_PORT, and NODE_ENV are read when the corresponding setting is absent, and SCLAW_DATA_DIR changes the runtime directory used to locate settings.json and data files.
Important settings.json fields and sections:
server: ports, host, request body limitllm: OpenAI-compatible base URL, model, API key, timeout, retriesdatabase.url: SQLite connection URLlogging: application log level, LLM logging, log rotationanalysis: Python runtime path, timeout, engine manifest pathstorage: reports directory and upload sizeagent: workspace root, checkpoints, shell-tool policypkpm: SATWE/JWSCYCLE path and work directoryyjk: install root, executable, bundled Python, work directory, version, timeout, headless mode
By default, settings.json lives in ~/.structureclaw/. The SCLAW_DATA_DIR environment variable can override that runtime directory for tests or controlled deployments.
Backend:
POST /api/v1/agent/runPOST /api/v1/chat/messagePOST /api/v1/chat/stream
Backend-hosted analysis:
POST /validatePOST /convertPOST /analyzePOST /code-checkGET /engines
- Skills are enhancement layers, not the only execution path.
- Unmatched selected skills fall back to generic no-skill modeling.
- User-visible content must support both English and Chinese.
- Keep module boundaries explicit across frontend/backend/analysis skills.
- English handbook: docs/handbook.md
- Chinese handbook: docs/handbook_CN.md
- Documentation hub: docs/README.md
- English reference: docs/reference.md
- Chinese reference: docs/reference_CN.md
- Chinese overview: README_CN.md
- Contribution guide: CONTRIBUTING.md
- Roadmap: ROADMAP.md
- Security policy: SECURITY.md
Please read CONTRIBUTING.md and the organization-level Code of Conduct before opening a PR.
MIT. See LICENSE.