Netrunner — Database cloning
Netrunner is the CLI for database cloning: DBLab clones and branches. Get started first, then use any section below.
Installation
Option A — Via Ymirr (recommended)
Install Ymirr; Netrunner is included. Log in with ymirr login, then use ymirr netrunner ... or install Netrunner globally to use ymirr-netrunner directly:
npm config set @ymirr:registry https://npm.ivfuture.uk/
npm install -g @ymirr/ymirr
ymirr login
Option B — Netrunner only
Use the ivfuture npm registry and install Netrunner:
npm config set registry https://npm.ivfuture.uk
npm install -g @ymirr/netrunner
You still log in with ymirr login (token is shared).
Get started
1. Log in once (browser opens; token is saved). Use Ymirr:
ymirr login
2. Create a clone (pick any id; pass database and branch):
ymirr netrunner clone create my-dev-db -d <database-name> -b <branch>
# or
ymirr-netrunner clone create my-dev-db -d <database-name> -b <branch>
3. Get the connection string when it's ready:
ymirr netrunner clone status my-dev-db
# or: ymirr-netrunner clone status my-dev-db
Use that connection string in your app. When you're done:
ymirr netrunner clone destroy my-dev-db
# or: ymirr-netrunner clone destroy my-dev-db
That's the loop: create → use → destroy. For more options, see Clones and the rest of the sections below.
Clones
Create, inspect, and destroy database clones.
| You want to… | Command |
|---|---|
| Create a clone | clone create my-db -d <database-name> -b <branch> |
Use a specific branch (e.g. dev) | clone create my-db -d <database-name> -b dev |
| Get only the connection URI (scripts) | Add --sync — waits and prints just the URI |
| Auto-delete after a while | Add --ttl 2h or --ttl 1d (min 1h, max 7d) |
| Set the DB password | Add -p yourpassword (must not contain @) |
| See all your clones | ymirr netrunner clone list or ymirr-netrunner clone list |
| Clone status & connection | ymirr netrunner clone status <id> |
| Destroy a clone | ymirr netrunner clone destroy <id> |
Branches
Create a personal branch (e.g. for a feature) and a clone from it.
1. Create a branch forked from a source (e.g. dev):
ymirr netrunner branch create my-feature --from dev
# or: ymirr-netrunner branch create my-feature --from dev
2. Create a clone from that branch:
ymirr netrunner clone create my-db -d <database-name> -b my-feature
# or: ymirr-netrunner clone create my-db -d <database-name> -b my-feature
3. When the branch is no longer needed:
ymirr-netrunner branch delete my-feature
Other useful commands: ymirr-netrunner branch list — list all DBLab branches you have.
CI & auth
Browser login is enough for local use. For CI or scripts, use a token:
export CLI_AUTH_TOKEN="eyJhbGci..."
ymirr-netrunner whoami
Other auth commands: ymirr-netrunner logout — remove stored token.
Command reference
Quick lookup by what you want to do.
| Intent | Command |
|---|---|
| Sign in | ymirr login (token shared with Ymirr) |
| Sign out | ymirr logout |
| Who am I? | ymirr whoami or ymirr-netrunner whoami |
| Create a clone | ymirr netrunner clone create <id> -d <database> -b <branch> (or ymirr-netrunner ...) |
| Clone status & connection | ymirr netrunner clone status <id> |
| List clones | ymirr netrunner clone list |
| Destroy a clone | ymirr netrunner clone destroy <id> |
| List branches | ymirr netrunner branch list |
| Create a branch | ymirr netrunner branch create <name> --from <source> |
| Delete a branch | ymirr netrunner branch delete <name> |
Clone create options: -d database, -b branch, -p password, --ttl (e.g. 2h, 1d), --sync (wait and print URI only).
Environment
| Variable | Purpose |
|---|---|
CLI_AUTH_TOKEN | JWT used instead of login file (CI / scripts) |
API_URL | Override API base (default: https://netrunner.semiotic.eu) |
CF_ACCESS_CLIENT_ID / CF_ACCESS_CLIENT_SECRET | Cloudflare Access; sent with requests if set |