# ForgeCAD

> Code-first parametric CAD for JavaScript and TypeScript, with a browser workbench, local CLI, and agent-ready modeling workflow.

ForgeCAD turns ordinary `.forge.js` files into live CAD models. Parameters become sliders, scripts return shapes or assemblies, and the same source can be validated, rendered, inspected, and exported from the command line.

For coding agents, start with the welcome guide and AI Usage guide, then read the relevant raw Markdown docs and examples before editing model code. Work inside a dedicated ForgeCAD project folder with `forgecad.json`; do not use a home directory, downloads folder, desktop, or broad repository root as the project context. ForgeCAD models use millimeters by default, expose parameters through `Param.*`, and should be verified with `forgecad run`, `forgecad inspect <evidence>`, and `forgecad check params` when shell access is available. Project imports must include the full extension: use `require("./part.forge.js")` for model files and `require("./helpers.js")` for helper modules.

## Start Here

- [ForgeCAD browser app](https://forgecad.io/): Hosted CAD workbench for editing, previewing, sharing, and publishing parametric models.
- [Welcome guide](https://forgecad.io/docs-raw/welcome.md): Project setup, local editor, browser sync, and the first AI loop.
- [AI-native CAD workflow](https://forgecad.io/docs-raw/AI/ai-native-cad.md): Editable code, validation evidence, manufacturing feedback, and parallel product idea iteration.
- [AI Usage guide](https://forgecad.io/docs-raw/AI/usage.md): Approved models, project-first agent setup, skills, validation gates, quality prompts, and recording ideas.
- [Documentation home](https://forgecad.io/docs): Human-readable documentation with search and navigation.
- [CLI reference](https://forgecad.io/docs-raw/CLI.md): Install, login, create projects, open studios with explicit paths, run scripts, render, export, inspect, and sync.

## API Reference

- [Core API](https://forgecad.io/docs-raw/generated/core.md): Primitives, booleans, transforms, colors, materials, patterns, and core shape operations.
- [Sketch API](https://forgecad.io/docs-raw/generated/sketch.md): 2D entities, constraints, profiles, extrusion, offsets, and sketch-driven modeling.
- [Curves and surfaces](https://forgecad.io/docs-raw/generated/curves.md): Splines, sweeps, lofts, ruled surfaces, and exact surface workflows.
- [Assembly API](https://forgecad.io/docs-raw/generated/assembly.md): Parts, connectors, joints, kinematics, solving, collision checks, and exploded views.
- [Output API](https://forgecad.io/docs-raw/generated/output.md): Exports, reports, BOMs, dimensions, robot packages, G-code, and manufacturing outputs.
- [Library helpers](https://forgecad.io/docs-raw/generated/lib.md): Gears, fasteners, pipes, pulleys, belts, springs, and reusable mechanical helpers.
- [Sheet metal](https://forgecad.io/docs-raw/generated/sheet-metal.md): Bends, flanges, flat patterns, reliefs, and laser or sheet workflows.
- [Viewport and scenes](https://forgecad.io/docs-raw/generated/viewport.md): Cameras, animations, labels, views, and presentation-oriented scene controls.
- [SDF and level sets](https://forgecad.io/docs-raw/generated/sdf.md): Organic fields, TPMS structures, smooth booleans, and implicit geometry.
- [Concepts](https://forgecad.io/docs-raw/generated/concepts.md): Semantic data structures and conceptual building blocks used across the API.

## Guides

- [Coordinate system](https://forgecad.io/docs-raw/guides/coordinate-system.md): Axes, units, orientation, and workspace conventions.
- [Positioning](https://forgecad.io/docs-raw/guides/positioning.md): Translation, rotation, alignment, and placing geometry predictably.
- [Scene presentation](https://forgecad.io/docs-raw/guides/scene-presentation.md): Worked scene() lighting and camera recipes for polished renders.
- [Joint design](https://forgecad.io/docs-raw/guides/joint-design.md): Designing assemblies and moving mechanisms with connectors and joints.
- [Inspection bundles](https://forgecad.io/docs-raw/guides/inspection-bundles.md): How to use render-inspect outputs for debugging and verification.
- [Component model](https://forgecad.io/docs-raw/component-model.md): Recommended structure for multi-part assemblies and reusable parts.

## Agent Workflows

- [ForgeCAD modeling skill](https://forgecad.io/docs-raw/skills/forgecad.md): Core agent guidance for authoring, editing, debugging, and validating ForgeCAD geometry.
- [Skill library index](https://forgecad.io/docs-raw/skills/index.md): Overview of the public agent workflows shipped with ForgeCAD.
- [Make a model](https://forgecad.io/docs-raw/skills/forgecad-make-a-model.md): Workflow for creating new `.forge.js` models and validating the result.
- [Render inspect](https://forgecad.io/docs-raw/skills/forgecad-render-inspect.md): Workflow for checking collisions, wall thickness, sections, masks, depth, and normals.
- [Prepare a prompt](https://forgecad.io/docs-raw/skills/forgecad-prepare-prompt.md): Workflow for turning fuzzy physical artifact requests into concrete CAD build briefs.
- [Component modeling](https://forgecad.io/docs-raw/skills/forgecad-component-model.md): Assembly discipline for parts, connectors, and data flow.

## Examples

- [Public kit repository](https://github.com/KoStard/forgecad-public-kit): Source for examples, public issue tracking, agent skills, and release context.
- [Examples directory](https://github.com/KoStard/forgecad-public-kit/tree/mainline/examples): Ready-to-run `.forge.js` models grouped by API area, mechanisms, products, and generative workflows.
- [Boolean operations example](https://github.com/KoStard/forgecad-public-kit/blob/mainline/examples/api/boolean-operations.forge.js): Compact example of primitives and shape operations.
- [Constrained sketch basics](https://github.com/KoStard/forgecad-public-kit/blob/mainline/examples/api/constrained-sketch-basics.forge.js): Starter example for sketch constraints and extrusion.
- [Static assembly connectors](https://github.com/KoStard/forgecad-public-kit/blob/mainline/examples/api/static-assembly-connectors.forge.js): Starter example for multi-part assembly placement.

## Product

- [Pricing](https://forgecad.io/pricing): Hosted ForgeCAD plans and commercial-use details.
- [Blog](https://forgecad.io/blog): Product announcements and technical posts.
- [Sitemap](https://forgecad.io/sitemap.xml): Public route inventory for crawlers.
- [robots.txt](https://forgecad.io/robots.txt): Crawler access policy for forgecad.io.

## Legal

- [Terms of Service](https://forgecad.io/docs-raw/legal/terms.md): Account, service, commercial-use, Enterprise, automation, and AI-use terms.
- [Privacy Policy](https://forgecad.io/docs-raw/legal/privacy.md): How ForgeCAD collects, uses, stores, and protects account, project, billing, and service data.
- [Software License](https://forgecad.io/docs-raw/legal/software-license.md): License terms for Free, Pro, Enterprise, embedded, backend, and AI workflows.
- [Browser legal pages](https://forgecad.io/terms): Human-readable Terms, Privacy Policy, and Software License navigation.

## Optional

- [Wood API](https://forgecad.io/docs-raw/generated/wood.md): Wood board helpers and joinery-specific API surface.
- [License](https://github.com/KoStard/forgecad-public-kit/blob/mainline/LICENSE): Repository license terms.
- [Public README](https://github.com/KoStard/forgecad-public-kit/blob/mainline/README.md): Repository-level overview, quickstart, examples, and AI workflow notes.
