Skip to content

Getting started

Pyahu runs local application services in a k3d cluster. You choose the services in pyahu.yaml; the CLI creates the cluster, waits for the workloads and prints the endpoints your application can use.

Use Pyahu when a project needs several local dependencies or benefits from real Kubernetes resources. If you only need a disposable database, a single container may be simpler.

PresetServicesRecommended for
minimalPostgreSQLA first run, small projects and constrained machines
platformPostgreSQL, ZITADEL, RabbitMQ, Redis, Kafka, Kafka Connect and Kafka UIApplications that need the full dependency chain

The full preset needs more room than the control CLI itself. Allocate at least 4 CPU cores and 8 GiB of memory to the container runtime, with 15 GiB of free disk.

You need Docker or Podman running and k3d 5.x on your PATH.

Terminal window
curl -fsSL https://cli.pyahu.io/install.sh | sh

For mise, Windows, manual downloads and shell completion, see Installation.

Run these commands inside your project:

Terminal window
pyahu init # creates pyahu.yaml with the minimal preset
pyahu doctor # checks Docker/Podman, k3d and local ports
pyahu up

The CLI looks for pyahu.yaml from the current directory upward. Commands run from a project subdirectory therefore use the same stack.

Check what is ready:

Terminal window
$ pyahu services
cluster: pyahu-local
namespace: pyahu-local-dev
state: running
SERVICE STATUS VERSION ENDPOINTS
postgres ready 18.4 localhost:5432

Print the generated connection variables or load them into the current shell:

Terminal window
pyahu env
eval "$(pyahu env)"

The minimal preset provides POSTGRES_URL, POSTGRES_USER, POSTGRES_PASSWORD, POSTGRES_HOST, POSTGRES_PORT and POSTGRES_DATABASE. Use pyahu env --format dotenv to write values in dotenv form.

Enable only what the application uses:

services:
postgres:
enabled: true
redis:
enabled: true
rabbitmq:
enabled: true

Then run pyahu up again. If the new service needs a host port that was not mapped when k3d was created, the CLI explains that the cluster must be recreated:

Terminal window
pyahu down
pyahu up

Plain pyahu down keeps the service data on the host, so it is safe for this recreation flow. See Configuration for ports, credentials and complete examples.

The common workflow does not require kubectl or Helm:

Terminal window
pyahu status
pyahu describe postgres
pyahu logs postgres --follow

The cluster remains inspectable when you need Kubernetes details:

Terminal window
export KUBECONFIG="$(pyahu kubeconfig)"
kubectl get pods,events -n pyahu-local-dev

Start with the troubleshooting guide if a service does not become ready.

When an enabled service has an HTTP UI, Pyahu creates a local certificate for localhost and *.localhost. Trust its CA once on the host:

Terminal window
pyahu certs trust

This covers ZITADEL, RabbitMQ Management and Kafka UI. See Local certificates for status and rotation commands.

Terminal window
pyahu down # remove the cluster, keep local data
pyahu down --keep-cluster # remove only the stack namespace
pyahu down --purge-data --yes # remove the cluster and permanently delete its data

Retained data lives under ~/.pyahu/clusters/<cluster>/storage. Make a PostgreSQL backup before a reset when the data matters.