Git worktrees alternative inspired by lane.
Stream creates full project copies ("streams") for parallel work, with monorepo and db cloning setup and support.
npm install
npm install -g .
stream init
# follow the printed "source ..." command to activate
stream 1Global install uses the prepare script to build dist/ automatically.
stream init installs shell integration into ~/.bashrc, ~/.zshrc, or fish config and prints the source command to activate it.
stream <id>: create or open a stream by number (e.g.stream 1)stream: interactive pickerstream -: open previous streamstream main|master: open base repostream del [id]: delete a stream (prompts when omitted)stream checkout <branch>: open or create a stream for a branch; use-bto create a new branch without promptingstream list|ls: list streamsstream status: show current stream/base statusstream setup: in current stream (or base repo), rename focused niri workspace and open Cursorstream cd <id>: create/open and emit a cd marker for shell integrationstream shell: print a shell function that auto-cd's after stream commandsstream completion [bash|zsh|fish]: print shell completion scriptstream init: install shell integration for auto-cdstream config: print resolved config
Examples:
stream init
stream 1--include <path>: include path(s) when copying (repeatable)--exclude <path>: exclude path(s) when copying (repeatable)--no-setup/--no-install: skip setup steps--editor <command>: override editor command--name <name>: override the stream folder name (checkoutonly)--cd: emit a cd marker for shell wrapper--dry-run: show actions without running--force: bypass safety checks for destructive actions (e.g. delete with local changes)--verbose: verbose logging
Notes:
streaminteractive picker supports fuzzy filtering and arrow-key selection.--include/--excludesupport glob-like patterns (*,**,?).stream checkoutrequires.gitin the stream;.gitis copied by default unless excluded.stream checkoutauto-names streams like<prefix>-<slug>-<branch>-<n>(branch is slugified); use--nameto override.stream checkout <branch> -bcreates the branch fromdefaultBranchwithout prompting, likegit checkout -b.- If
-bis omitted and the branch doesn't exist, you'll be prompted whether to create it.
Create stream.config.json in the repo root:
{
"streamsRoot": "..",
"copyExcludes": ["node_modules"],
"editor": { "command": "auto", "openArgs": ["-n"] },
"setup": {
"enabled": true,
"steps": []
},
"db": {
"type": "postgres",
"cloneStrategy": "template",
"maxNameLength": 63,
"envFile": "backend/.env_development"
},
"naming": { "prefix": "stream", "slug": "myrepo" },
"defaultBranch": "main"
}defaultBranch controls which branch new branches are cut from when using stream checkout -b (defaults to "main").
Editor notes:
editor.command: "auto"pickscursorfirst, thencode.- If
niriis available, creating a new stream opens a new niri workspace, names it after the stream without the naming prefix (for examplemyrepo-1instead ofstream-myrepo-1), and then launches the editor. stream del [id]attempts to close the matching named niri workspace before deleting the stream files.
To enable setup steps, add shell or dbClone steps. Example:
{
"type": "shell",
"name": "backend",
"command": "uv venv backend/.venv && uv pip install -r backend/requirements.txt",
"cwd": "{stream}"
}When using dbClone, db.envFile controls which env file is copied into the stream
(if missing) and updated with the new POSTGRES_DATABASE value.
Only db.type: "postgres" is supported right now.