hiiu fork
Materialise a base into a local git workspace, with the overlay in .hiiu/ and a generated AGENTS.md at the root.
hiiu fork [path]
hiiu fork --into ./my-prototype [path]
Turns a base into a workspace a designer can open. This is the handoff: after this command there is a directory with real source in it, an agent briefing at its root, and a git history to diff against.
Arguments and flags
[path] |
The repo or app directory to fork. Default . |
--into <dir> |
The workspace directory to create. Default hiiu-<base id> |
Every global flag also applies.
Fork implies build
Like dev, it resolves the base first, so the base stays the
single source of truth for what a workspace contains. A cache hit makes that
implication cheap.
What lands in the workspace
- The base's mirrored tree, copied verbatim, minus its
node_modulesand the base's own document directory. - The runnable overlay in
.hiiu/: handlers, interceptor, world, plan, decisions. That is the one directory the state rules allow inside a workspace. - The generated
AGENTS.mdat the root, which is the writeagents-mdalways said would be fork's one line.
It never merges
The destination must not already exist with content. A fork never merges and
never overwrites, because "start fresh" being cheap is the entire reason
prototypes can be disposable. An existing directory is exit 3 naming it.
Git, best effort
A fresh repository with one commit gives the designer's agent a diff surface,
which is what a good prototype is eventually promoted from. A machine without
git still gets a working workspace and a plain warning;
doctor is where a missing git is a failure, not here.
What v0 does not do
Named rather than implied: it does not install dependencies, despite the
summary line saying so. npm install in the workspace is the designer's first
command until fork learns each package manager's incantations. There is no MCP
configuration either.
Exit codes
| Code | When |
|---|---|
0 |
The workspace exists |
3 |
The destination already has content, or the app is not supported |
4 |
The base failed to build |
Example
hiiu fork --into ../invoices-empty-state ./apps/web