buick

module
v0.0.0-...-fb9e287 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: Apache-2.0

README

buick

Small HTTP/HTTPS reverse proxy for local development — route by Host, YAML config, optional WebSockets, TLS helpers.

Full documentation →

Install the CLI

Requires Go 1.22+.

go install github.com/fgrzl/buick/cmd/buick@latest

Put Go’s bin on your PATH (for example $HOME/go/bin on Linux/macOS, %USERPROFILE%\go\bin on Windows).

TLS (buick init)

Add a Buick YAML with certs.path (where buick init writes) and proxy.certs_path (where buickd reads); both use fixed localhost.pem / localhost-key.pem names (see Configuration). buick init creates missing parent directories, writes the leaf and local CA, and installs trust where the OS supports it.

Example buick.yml:

certs:
  path: "./dev/buick/certs"

proxy:
  certs_path: "./dev/buick/certs"

services:
  api.localhost:
    target: "http://127.0.0.1:8080"
  app.localhost:
    target: "http://127.0.0.1:8081"
buick init

If buick.yml is in the current directory, buick init alone uses it; otherwise use buick init --config ./path/to/buick.yml. Use buick init -h for --skip-trust, --uninstall, and other flags.

Docker Compose

The image runs buickd with the default --config /etc/buick/buick.yml. Mount your config and a certs directory (PEMs from buick init on the host):

services:
  buick:
    image: ghcr.io/fgrzl/buick:latest
    restart: unless-stopped
    ports:
      - "80:8080"
      - "443:8443"
    volumes:
      - ./dev/buick.yml:/etc/buick/buick.yml:ro
      - ./dev/buick/certs:/etc/buick/certs
docker compose up -d

Image tags, extra_hosts, and a fuller dev/buick.yml example: Docker and Compose. Running buickd on the host without containers: Standalone daemon.

Directories

Path Synopsis
cmd
buick command
Package main is the buick developer CLI (init, check, routes, status).
Package main is the buick developer CLI (init, check, routes, status).
buickd command
Command buickd is the Buick reverse proxy daemon.
Command buickd is the Buick reverse proxy daemon.
internal
buildinfo
Package buildinfo holds version metadata injected at link time with -ldflags -X.
Package buildinfo holds version metadata injected at link time with -ldflags -X.
certs
Package certs generates development TLS key pairs.
Package certs generates development TLS key pairs.
config
Package config loads and validates Buick YAML configuration.
Package config loads and validates Buick YAML configuration.
initca
Package initca creates a local CA and leaf certificates for Buick TLS.
Package initca creates a local CA and leaf certificates for Buick TLS.
mgmt
Package mgmt provides loopback-only management HTTP endpoints for buickd (/_buick/*).
Package mgmt provides loopback-only management HTTP endpoints for buickd (/_buick/*).
proxy
Package proxy implements the Host-based reverse proxy router.
Package proxy implements the Host-based reverse proxy router.
trust
Package trust installs or removes the Buick development CA using OS-specific tools.
Package trust installs or removes the Buick development CA using OS-specific tools.
tests
integration
Package integration holds docker-compose-backed integration tests for buickd.
Package integration holds docker-compose-backed integration tests for buickd.
integration/gencerts command
Command gencerts (maintainers) writes fixture PEMs under tests/integration/certs.
Command gencerts (maintainers) writes fixture PEMs under tests/integration/certs.

Jump to

Keyboard shortcuts

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