Skip to content

Latest commit

 

History

History

cli

README.md

Starts a project in Variable Land.

vland init fetches a template from the dx repository and fills in the project's name and author. Then it offers to install the dependencies and to initialise a git repository.

Install

pnpm add -g @variablelab/vland

It needs Node 22.18 or later.

To run it once without installing it, use npx:

npx @variablelab/vland init

Usage

vland init                        # interactive
vland init my-app -t library      # explicit template
vland init my-app -t backend --no-install --no-git

The CLI reference lists every command and flag. It is generated on each release.

Templates

Template What you get
library A standalone TypeScript library with Vitest + Changesets release workflow.
backend An Elysia (@elysiajs/node) backend with evlog, Vitest, Dockerfile, CI shape.
monorepo pnpm + Turbo workspace with an Elysia API, a Vite-React SPA, and packages/types, the zod schemas the apps share.

All templates target Node.js, pin Node.js and pnpm with mise (mise.toml and mise.lock), run their GitHub Actions on SHA-pinned actions checked by zizmor, and ship @rrlab/cli (rr) as the single entry point for lint, format, type-check, test and build. No plugin is configured: the scaffolded README lists the rr plugins add commands to run.

Shell completion

vland ships a completion subcommand that prints a shell-specific script. Add a guarded eval to your shell rc file:

# zsh — ~/.zshrc
command -v vland >/dev/null 2>&1 && eval "$(vland completion zsh 2>/dev/null)"

# bash — ~/.bashrc
command -v vland >/dev/null 2>&1 && eval "$(vland completion bash 2>/dev/null)"

# fish — ~/.config/fish/config.fish
command -v vland >/dev/null 2>&1; and vland completion fish 2>/dev/null | source

The command -v guard skips the line when no vland is on PATH. The 2>/dev/null covers a mise shim with no active version: it passes the guard, then fails on stderr. If completion doesn't load, run vland completion zsh by hand to see why.

Completion runs on the usage CLI, so it has to be on your PATH. Install it with one of:

mise use -g usage
brew install usage

When you upgrade @variablelab/vland, the next shell session will pick up new commands automatically — no need to re-run anything.

Troubleshooting

To enable debug mode, set the DEBUG environment variable to vland:* before running any command.

DEBUG=vland:* vland init my-app

To point init at local templates instead of fetching from GitHub (useful when developing inside this monorepo):

VLAND_TEMPLATES_DIR=/absolute/path/to/dx/vland/templates vland init my-app -t library

License

The code is MIT. The Sign in brand/ is not: its use is set by BRAND-USE.md.

 Variable Land