Metadata-Version: 2.4
Name: caid-forma-core
Version: 0.3.6
Summary: Reusable generation, validation, provider, and project-object core for Forma OSS.
Author-email: "CAID TECHNOLOGIES, INC." <team@caid-technologies.com>
Maintainer-email: "CAID TECHNOLOGIES, INC." <team@caid-technologies.com>
Project-URL: Homepage, https://github.com/caid-technologies/Forma-OSS
Project-URL: Repository, https://github.com/caid-technologies/Forma-OSS
Project-URL: Documentation, https://github.com/caid-technologies/Forma-OSS#readme
Keywords: hardware,eda,llm,agents,pydantic
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Classifier: Typing :: Typed
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: google-auth>=2.29.0
Requires-Dist: json-repair>=0.30.0
Requires-Dist: keyring>=25.0.0
Requires-Dist: pydantic>=2.12.0
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: pypdf>=5.0.0
Requires-Dist: pypdfium2>=4.30.0
Requires-Dist: sqlalchemy==2.0.31
Provides-Extra: gemini
Requires-Dist: google-genai>=1.0.0; extra == "gemini"
Provides-Extra: vertex
Requires-Dist: google-auth>=2.29.0; extra == "vertex"
Requires-Dist: google-genai>=1.0.0; extra == "vertex"
Provides-Extra: huggingface
Requires-Dist: huggingface-hub>=0.34.0; extra == "huggingface"
Provides-Extra: observability
Requires-Dist: langfuse>=4.0.0; extra == "observability"
Provides-Extra: supabase
Requires-Dist: supabase==2.31.0; extra == "supabase"
Provides-Extra: tavily
Requires-Dist: tavily-python>=0.5.0; extra == "tavily"
Provides-Extra: terminal
Requires-Dist: Pillow>=10.0.0; extra == "terminal"
Provides-Extra: backend
Requires-Dist: fastapi>=0.124.1; extra == "backend"
Requires-Dist: cryptography>=42.0.0; extra == "backend"
Requires-Dist: Pillow>=10.0.0; extra == "backend"
Requires-Dist: pypdf>=5.0.0; extra == "backend"
Requires-Dist: redis>=5.0.0; extra == "backend"
Requires-Dist: uvicorn; extra == "backend"
Requires-Dist: websockets>=12.0; extra == "backend"
Requires-Dist: supabase==2.31.0; extra == "backend"
Provides-Extra: s3
Requires-Dist: boto3==1.35.99; extra == "s3"
Provides-Extra: all
Requires-Dist: google-genai>=1.0.0; extra == "all"
Requires-Dist: boto3==1.35.99; extra == "all"
Requires-Dist: cryptography>=42.0.0; extra == "all"
Requires-Dist: fastapi>=0.124.1; extra == "all"
Requires-Dist: huggingface-hub>=0.34.0; extra == "all"
Requires-Dist: langfuse>=4.0.0; extra == "all"
Requires-Dist: Pillow>=10.0.0; extra == "all"
Requires-Dist: pypdf>=5.0.0; extra == "all"
Requires-Dist: redis>=5.0.0; extra == "all"
Requires-Dist: supabase==2.31.0; extra == "all"
Requires-Dist: tavily-python>=0.5.0; extra == "all"
Requires-Dist: uvicorn; extra == "all"
Requires-Dist: websockets>=12.0; extra == "all"
Provides-Extra: dev
Requires-Dist: build>=1.2.0; extra == "dev"
Dynamic: license-file

# Form

**Build hardware from ideas.**

Form is an open-source AI hardware design workspace. Describe a design, add reference images, and iterate toward CAD models, wiring diagrams, bills of materials, and assembly instructions.

[![License: MPL 2.0](https://img.shields.io/badge/license-MPL--2.0-blue.svg)](LICENSE)
[![PyPI](https://img.shields.io/pypi/v/caid-forma-core.svg)](https://pypi.org/project/caid-forma-core/)
[![GitHub stars](https://img.shields.io/github/stars/caid-technologies/Forma-OSS?style=social)](https://github.com/caid-technologies/Forma-OSS)

**[Try Form](https://caid-technologies.us/)** · [Browse projects](https://caid-technologies.us/projects) · [Run locally](#quick-start) · [Documentation](docs/README.md)

## See it in action

Mechanical design and motion previews:

| Hexapod walking | Screw-driven arm | Robotic 3D printer |
| --- | --- | --- |
| ![Top view of a six-legged hexapod walking](docs/assets/hexapod-walk-top.gif) | ![Screw-driven robotic arm approaching a part](docs/assets/screw-arm-drive.gif) | ![Robotic printer arm moving over a print bed](docs/assets/print-arm-print.gif) |

[Watch the full walkthrough: designing a security camera →](https://www.youtube.com/watch?v=XaIIJT7OX4M)

<details>
<summary>Preview the security camera workflow</summary>

[![Form workflow creating a security camera](docs/assets/forma-security-camera-demo.gif)](https://www.youtube.com/watch?v=XaIIJT7OX4M)

</details>

## What you can build

- **CAD you can take with you.** Preview mechanical designs in 3D and export STEP, STL, 3MF, and OBJ from supported native CAD builds.
- **Electronics with the details attached.** Generate a bill of materials, interactive wiring diagrams, and assembly instructions. Rule-based checks flag shorts, voltage mismatches, pin conflicts, and other electrical issues.
- **Designs you can keep refining.** Use follow-up instructions to change geometry, dimensions, placement, and requirements within an existing project.
- **Mechanisms you can inspect.** Play, pause, and scrub supported joint-driven motion previews, including the [two meshing gears example](docs/gear-motion-preview.md).
- **Hardware workflows for your agents.** Use Forma through the web app, Python package, CLI, or MCP. The shared skill works with OpenCode, Claude Code, Codex, OpenClaw, and NemoClaw.

Forma is an **alpha research prototype** for makers and developers. Electrical validation focuses on 3.3–5 V educational projects; CAD and motion previews still need engineering review before fabrication. See [scope and validation](docs/validation.md).

## Quick start

Use [Form in your browser](https://caid-technologies.us/), or run it locally with OpenCode. Local authoring, validation, rendering, and project status do not require a Forma account.

### Run locally with OpenCode

You need **Python 3.11+**, **Node.js and npm** (Node.js 22+ recommended), **Git**, and **OpenCode** with a working model connection. Your model provider's usage charges still apply.

**macOS / Linux**

```bash
curl --proto '=https' --tlsv1.2 -fsSL https://raw.githubusercontent.com/caid-technologies/Forma-OSS/main/scripts/development/install-opencode.sh | bash
```

**Windows PowerShell**

```powershell
irm https://raw.githubusercontent.com/caid-technologies/Forma-OSS/main/scripts/development/install-opencode.ps1 | iex
```

The installer creates `~/forma-workspace`, adds the Forma skill and MCP connection, installs missing app dependencies, and starts the backend and frontend. Keep that terminal open, then open a second terminal:

```sh
cd ~/forma-workspace
opencode mcp list
opencode
```

Try a first prompt:

> Design a 3.3 V temperature monitor with an OLED display. Include a bill of materials, wiring, and an enclosure.

Open the local UI at [localhost:3000](http://localhost:3000). CAD generation and exports also require the [native OpenCAD setup](docs/agent-clients.md#cad-skill-dependency). For installation details and troubleshooting, see the [setup guide](docs/setup.md).

<details>
<summary>Develop from source, use Docker, or install the Python core</summary>

Clone the repository and start the app:

```bash
git clone https://github.com/caid-technologies/Forma-OSS.git
cd Forma-OSS
./scripts/development/dev.sh
```

On Windows, replace the last command with `.\scripts\development\dev.ps1`.

The launcher starts the API and UI with local authentication and SQLite. Configure an [agent connection](docs/agent-clients.md) or a [model provider](docs/runtime-reference.md#shared-llm-configuration) for live generation.

For Docker, run `docker compose up --build` from the repository root. See [Docker setup](docs/setup.md#docker-setup) for configuration and persistence.

For the reusable Python core and CLIs:

```bash
pip install caid-forma-core
forma-core --help
forma-oss --help
```

See the [CLI and runtime reference](docs/runtime-reference.md) for generation, iteration, local credentials, and cloud sync.

</details>

## Install Forma for Cursor / Grok Bot

Install the [Cursor plugin](docs/cursor-plugin.md) to discover the shared
`forma-hardware` skill and local Streamable HTTP MCP connection. The guide covers
local installation, protected cloud authentication, CLI-only use, and compatible
Grok Bot deployments. Marketplace publication requires a separate maintainer
submission and review; the repository includes the packaging and checklist.

## How it works

1. **Describe the project.** Start with requirements and optional reference images; refine the design through conversation.
2. **Author a structured design.** An agent produces [Hardware Intermediate Representation](docs/hardware-ir.md), Forma's typed, versioned representation of components, connections, geometry, and project history.
3. **Compile and inspect.** Forma validates the design and produces schematics, previews, and supported CAD artifacts. Iterate on the saved project as your requirements change.

With the local agent workflow, your host agent supplies the model and Forma performs deterministic compilation. The reusable `forma_core` package also supports server-side generation. See [architecture](docs/architecture.md) and [agent integrations](docs/agent-clients.md).

## Go deeper

| I want to… | Start here |
| --- | --- |
| Install or self-host Form | [Setup](docs/setup.md) · [CLI and runtime reference](docs/runtime-reference.md) |
| Connect my own agent | [Agent integrations](docs/agent-clients.md) · [Model and image configuration](docs/opencode-models-and-images.md) |
| Understand the project format | [Hardware Intermediate Representation](docs/hardware-ir.md) · [Architecture](docs/architecture.md) |
| Explore examples and motion | [Examples](docs/examples.md) · [Gear motion preview](docs/gear-motion-preview.md) |
| Reconstruct CAD history in Onshape, NX, or Fusion | [AI-assisted CAD migrations](docs/ai-cad-migrations.md) |
| Contribute or evaluate results | [Contributing](CONTRIBUTING.md) · [Development](docs/development.md) · [Evaluations](evals/README.md) |

[All documentation](docs/README.md) · [Roadmap](docs/roadmap.md) · [Report a bug](https://github.com/caid-technologies/Forma-OSS/issues/new/choose)

## Build with us

Try a design, share what worked, or help improve CAD generation, validation, examples, and the interface. Read [CONTRIBUTING.md](CONTRIBUTING.md) for the contribution workflow.

**If you want open-source hardware design to be easier, star Forma to follow its progress and help other builders find it.**

Built by [Caid Technologies](https://caid-technologies.us/). Licensed under the [Mozilla Public License 2.0](LICENSE).
