vel

package module
v0.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 22 Imported by: 0

README

Vel

The project CLI library for Velocity Go web framework.

What is Vel?

Vel provides development commands for Velocity projects. Unlike traditional CLIs, vel is built from source in each project, giving it access to your migrations, models, and bootstrap code.

Architecture

Velocity uses two CLI tools:

Tool Install Purpose
velocity Homebrew Create projects, manage config
vel Built from source Dev server, migrations, generators

Usage

After creating a project with velocity new, use ./vel for development:

./vel serve           # Start dev server with hot reload
./vel migrate         # Run database migrations
./vel migrate:fresh   # Drop and re-run all migrations
./vel make:controller # Generate a controller
./vel build           # Build for production
./vel key:generate    # Generate encryption key
Shell Function (Optional)

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

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

How It Works

Your project's cmd/vel/main.go imports this package:

package main

import (
    "github.com/velocitykode/velocity-cli"
    _ "myapp/bootstrap"
    _ "myapp/database/migrations"
)

func main() {
    vel.Execute()
}

This gives vel access to your project's migrations and configuration.

Documentation

Full documentation at velocitykode.com/docs

License

MIT License - See LICENSE for details.

Documentation

Overview

Package vel provides an importable CLI for Velocity projects. User projects import this package in cmd/vel/main.go to get access to commands like serve, migrate, make:handler, etc.

Index

Constants

This section is empty.

Variables

View Source
var Version = "0.8.30"

Version is the CLI version

Functions

func Execute

func Execute() error

Execute runs the CLI

func RootCmd

func RootCmd() *cobra.Command

RootCmd returns the root command for testing

Types

This section is empty.

Directories

Path Synopsis
internal
ui
Package testutil provides reusable test utilities for the vel CLI test suite.
Package testutil provides reusable test utilities for the vel CLI test suite.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL