Install twin-flow
Last checked . Checked against Twin flow, Getting started, code.claude.com.
In short. Download twin-flow as a zip file, unzip it into a folder named twin-lab, run one setup command, and run one check command. The check prints nothing when the sample shop file is good.
Before you start
You need a terminal (Open a terminal) and uv (Install Python and uv), which also brings the Python 3.11 or newer that twin-flow needs. To have Claude run twin-flow for you, also do Install Claude Code. twin-flow runs on your own computer, needs no account, and sends nothing over the internet. The sample shop, Ridgeline Precision, is made up. Before you use real orders, read the safe use notes.
Steps
Step 1. Make a folder and download twin-flow
On a Mac, paste this whole box and press Return:
cd ~
mkdir twin-lab
cd twin-lab
curl -L -o twin-flow.zip https://github.com/joshuamschultz/twin-flow/archive/refs/heads/main.zip
unzip -q twin-flow.zip
mv twin-flow-main twin-flow
cd twin-flow
On Windows, in Windows PowerShell, paste this whole box and press Enter:
cd ~
mkdir twin-lab
cd twin-lab
Invoke-WebRequest https://github.com/joshuamschultz/twin-flow/archive/refs/heads/main.zip -OutFile twin-flow.zip
Expand-Archive twin-flow.zip -DestinationPath .
Rename-Item twin-flow-main twin-flow
cd twin-flow
The download is about 47 MB and took about 3 seconds on a fast connection. Git is not needed, because you download the zip instead.
Step 2. Set it up
Paste this on a Mac or on Windows:
uv sync --extra dev
uv builds a private setup inside the folder and downloads what twin-flow needs. On a first run it can take a few minutes while it also fetches Python if your computer has none.
Step 3. Check the sample shop
Paste this:
uv run twinflow validate examples/showcase/cnc-job-shop/shop.yaml
Check it worked
The check prints nothing at all when the sample shop file is good, and it takes a few seconds. Silence is the good result. A problem prints an error message instead.
If something goes wrong
- "uv: command not found" or "uv is not recognized". Install uv first, then open a new terminal window.
- "No such file or directory" on the last command. You are in the wrong folder. Type
cd ~/twin-lab/twin-flowand try again. mkdir twin-labsays it already exists. You did this before. Typecd ~/twin-lab, then continue from the download line, or delete the oldtwin-labfolder first.- Windows says
Rename-Itemcannot findtwin-flow-main. The unzip may have made a folder with a different name. Rundir, then rename that folder totwin-flow. - The setup stops with a network error. Check your internet connection and run the same command again.