CLI

> Velocity CLI reference. Create projects, run dev servers, generate code, and manage your Go web application from the command line.

Velocity provides two CLI tools that work together:

  • velocity - Global installer (via Homebrew) for creating and managing projects
  • vel - Project CLI (built from source) for development commands

Installation

brew tap velocitykode/tap
brew install velocity

Architecture

velocity (global)          vel (per-project)
├── new                    ├── serve
├── config                 ├── build
└── self-update            ├── migrate
                           ├── migrate:fresh / rollback / status
                           ├── db:wipe
                           ├── cache:clear
                           ├── queue:work
                           ├── schedule:work
                           ├── down / up
                           ├── route:list
                           ├── key:generate
                           └── make:* (12 generators)

Why two CLIs?

  • velocity is installed globally via Homebrew and only knows how to create, configure, and update itself.
  • vel is built from your project source, so it has access to your migrations, models, and app initialization code.

Quick Reference

Global Commands (velocity)

CommandDescription
velocity new <name>Create a new Velocity project
velocity new <name> --apiAPI-only project (no frontend)
velocity configManage CLI defaults
velocity self-updateUpdate the installer

Full reference: Installer Commands.

Project Commands (vel)

CommandDescription
vel serveDev server with live reload
vel buildProduction build
vel migrateRun database migrations
vel queue:workProcess queued jobs
vel make:handlerGenerate a handler
vel key:generateGenerate encryption key

Full reference: vel Commands.

Using vel

After creating a project with velocity new, a ./vel binary is built automatically. Run project commands with:

cd myproject
./vel serve
./vel migrate

Shell Function (Optional)

Add this to ~/.zshrc to use vel instead of ./vel:

vel() { [ -x ./vel ] && ./vel "$@" || echo "vel: not found"; }

Then you can simply run:

vel serve
vel migrate