Skip to content

Templates

Templates define reusable setup steps. Bivvy ships dozens of built-in templates covering system package managers, version managers, language-specific dependency tools, database migrations, containers, infrastructure as code, and monorepo tools. You can also create your own.

Using Templates

Reference a template in your step configuration by its name:

steps:
deps:
template: yarn-install

When you run bivvy init, templates are auto-detected based on files in your project (e.g. Gemfile triggers bundle-install, package-lock.json triggers npm-install, yarn.lock triggers yarn-install).

Template names are the long form, like yarn-install, bundle-install, cargo-build, mise-tools, nextjs-build. There is no alias mechanism — short names like yarn or cargo will not resolve.

Available Built-in Templates

CategoryTemplates
Systembrew-bundle, apt-install, yum-install, pacman-install
Windowschoco-install, scoop-install
Version managersmise-tools, asdf-tools, volta-setup, fnm-setup, nvm-node, rbenv-ruby, pyenv-python
Rubybundle-install, rails-db, ruby/version-bump
Node.jsyarn-install, npm-install, pnpm-install, bun-install, nextjs-build, vite-build, remix-build, prisma-migrate, node/version-bump
Pythonpip-install, poetry-install, uv-sync, django-migrate, alembic-migrate, python/version-bump
PHPcomposer-install, laravel-setup, php/version-bump
Rustcargo-build, diesel-migrate, rust/version-bump
Gogo-mod-download, go/version-bump
Swiftswift-resolve, swift/version-bump
Javamaven-resolve, java/version-bump
Kotlin / Gradlegradle-deps, spring-boot-build, kotlin/version-bump
Elixirmix-deps-get, elixir/version-bump
.NETdotnet-restore, dotnet/version-bump
Dart / Flutterdart-pub-get, flutter-pub-get
Denodeno-install
Database migrationsrails-db, prisma-migrate, diesel-migrate, alembic-migrate, django-migrate
Containersdocker-compose-up, helm-deps
Infrastructure as Codeterraform-init, cdk-synth, pulumi-install, ansible-install
Artifact auditsnode-artifact-audit, rust-artifact-audit, python-artifact-audit, go-artifact-audit, java-artifact-audit, dotnet-artifact-audit, docker-artifact-audit, ruby-artifact-audit, php-artifact-audit, elixir-artifact-audit, swift-artifact-audit
Cross-cuttingenv-copy, pre-commit-install
Monorepo / Workspacenx-build, turbo-build, lerna-bootstrap

See Built-in Templates for full details on each template.

Several languages define their own version-bump template. When referencing one, qualify it with the category (e.g. template: rust/version-bump) so the registry resolves the correct one. An unqualified version-bump returns the first match across categories.

Template Resolution Order

Templates are resolved in this order (first match wins):

  1. Project templates.bivvy/templates/steps/
  2. User templates~/.bivvy/templates/steps/
  3. Remote templates — fetched from configured sources
  4. Built-in templates — bundled with Bivvy

References can be unqualified (yarn-install) or qualified by category (node/yarn-install). A qualified reference must match both the name and the category.

Overriding Template Values

Override any template field in your step config:

steps:
deps:
template: yarn-install
command: "yarn install --frozen-lockfile" # overrides the template's default command

Template Inputs

Some templates accept inputs for customization. Inputs are case-sensitive map keys under inputs::

steps:
release:
template: rust/version-bump
inputs:
bump: minor

Inputs can also be supplied interactively by adding a prompts: block to the step (see the version-bump example in Built-in Templates).

Creating Custom Templates

Create .bivvy/templates/steps/<name>.yml:

name: my-template
description: "My custom setup step"
category: custom
inputs:
env:
description: "Environment name"
type: string
default: development
step:
title: "Run my setup"
command: "my-setup --env ${env}"
check:
type: presence
target: ".setup-complete"

See the annotated template reference YAML for every available field.

Next Steps