Skip to main content

napkin2factory

From napkin to factory. Describe a physical product as text; get a manufacturable technical data package — 3D models, drawings, flat patterns, bill of materials, manuals and a self-contained report — and change it safely: every engineering change rebuilds exactly what it invalidates, shows its impact before anything moves, and ships as a diff page.

Disclaimer. napkin2factory designs are produced with an AI system and have not been reviewed by a licensed engineer. Every report, manual, drawing and package it generates says so. Have a qualified person review a design before you build, power or use it. Safety requirements can never pass by computation alone; they need a human sign-off.

Version 0.1 covers mechanical parts and the bill of materials. Electrical design, FEA and hosted services are not included (see BACKLOG.md).

Install (from source)

Requires uv (curl -LsSf https://astral.sh/uv/install.sh | sh); uv sync fetches Python 3.13 itself if the machine has none. The repository is private until launch, so the clone line is for people with access; everyone else unpacks the source archive they were given and starts at cd.

git clone https://github.com/osaxma/napkin2factory.git   # or unpack the source archive
cd napkin2factory
uv sync                 # add --no-dev if you only want to run it, not develop it
uv run n2f version      # napkin2factory 0.1.0
uv run n2f doctor       # is this machine ready?

uv run n2f … only works from inside this checkout. To have n2f on your PATH and usable from any folder:

uv tool install .

or pip install -e . into a virtual environment. Once the package is published, uvx napkin2factory will work without a checkout.

Ten-minute first run

uv run n2f init demo --template bracket
cd demo
uv run n2f build        # the first build loads the CAD kernel: about two minutes, then seconds
uv run n2f check
open build/report/index.html        # macOS; Linux: xdg-open …; or: uv run n2f serve

The first n2f build on a machine prints "loading the CAD kernel…" and then sits silent for a minute or two while the kernel loads; later builds take seconds. Builds also check that each bought part's vendor link still resolves; set N2F_OFFLINE=1 (or pass --offline) to skip that.

The report opens straight from disk: a 3D view you can orbit, drawings, the bill of materials with a "what to tell the manufacturer" column, and the check matrix. Try a change:

uv run n2f ecr new --title "Longer bracket" --set param://bracket-length=140mm
uv run n2f ecr impact ECR-001          # what it touches, before anything changes
uv run n2f ecr approve ECR-001 --by "me"
uv run n2f ecr apply ECR-001
uv run n2f build && uv run n2f check
uv run n2f ecr close ECR-001
uv run n2f release v1.0.0

Make a second change the same way, release it as v1.1.0, and the headline diff page is one command away:

uv run n2f diff v1.0.0 v1.1.0          # → build/site/diff/v1.0.0..v1.1.0/index.html

n2f status always tells you where the product stands and what to do next.

Sign-offs. Some requirements cannot be checked by computation (the enclosure template has one: inspect every edge by hand). n2f check lists them as needs your sign-off and still exits 0, but n2f release refuses until a person has recorded the review:

uv run n2f signoff REQ-004 --by "your name" --statement "what you inspected"

n2f status prints the exact command to run. A sign-off stays valid until the evidence it was bound to changes.

The three doors

  1. Chat app only — planned: a connector or skill that lets a chat assistant run the intake and build in its own sandbox.
  2. GitHub template — planned: "Use this template", GitHub Actions as the build machine, Pages as the product site. Every product folder already carries the workflow files.
  3. Local CLI — this: uv run n2f … (or n2f … after uv tool install .), works offline (N2F_OFFLINE=1), no accounts. Open the product folder in Claude Code, Codex or any coding agent: the folder's CLAUDE.md and skills turn it into the project team.

The showcase: a 1200 °C test kiln

examples/kiln is a complete product: 21 parts, interfaces, thermal and element calcs, six manuals, example sign-offs, and two change requests. examples/kiln/demo.sh runs the parametric engineering-change loop unattended (release → change → impact → approve → apply → rebuild → check → re-sign → release → diff page); demo-design.sh adds a design change applied from a pre-authored patch.

Learn more

  • docs/concepts.md — the ideas (one canonical model, recorded dependencies, checks as the gate)
  • docs/cli.md — every command · docs/vocabulary.md — the glossary (draft, snapshot, change request, Revision … and what each means underneath)
  • docs/product-model.md — the files in a product folder · docs/kit.md — the part generators
  • docs/checks.md — how verification works · docs/ecr-loop.md — the change loop
  • docs/agent-layer.md — the roles a product folder installs for AI clients

Developing

make check        # lint, types, tests, both small examples (6–10 min; sets N2F_OFFLINE=1)
make check-full   # + the kiln, both demos, timing assertions (N2F_TIMING=1)

See CLAUDE.md for the rules, GRAND_PLAN.md for the plan this version was built to, and DECISIONS.md / STATUS.md / BACKLOG.md for the build journal.

License

MIT — see LICENSE.

Metadata

Release files for napkin2factory 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for napkin2factory 0.1.0
File Size Uploaded Provenance Actions
napkin2factory-0.1.0.tar.gz 522.5 kB With provenance Details for napkin2factory-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napkin2factory 0.1.0
File Interpreter ABI Platform Actions
napkin2factory-0.1.0-py3-none-any.whl Python 3 none any Details for napkin2factory-0.1.0-py3-none-any.whl

Total release size: 1.1 MB

Release files / napkin2factory-0.1.0.tar.gz

Download URL napkin2factory-0.1.0.tar.gz
Size 522.5 kB
Tags Source
SHA-256 checksum
How to use checksums
d3732be24da74d8d36764acca55e04c98dc26d90dc717f15ed722ffd87cd02e1
BLAKE2b-256 checksum
How to use checksums
ab00869079bdeb558f821d3c3e437fab0893e6955ff66daee257b6b8f2a87de0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Release files / napkin2factory-0.1.0-py3-none-any.whl

Download URL napkin2factory-0.1.0-py3-none-any.whl
Size 613.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de84e7219a0a1af871f760536a2831e27dc8465013935cd4858959d99e98dd4b
BLAKE2b-256 checksum
How to use checksums
244fffda676d99e6ab5e6a332e6d9d010c687e43a8bcbe36db3270409bafa6b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

Security for napkin2factory 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for napkin2factory-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 31, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page