Skip to content

CLI Reference

The pygo CLI manages your project end to end: scaffolding, development server, build, tests, migrations, docs, and self-update.

Terminal window
pygo [command] [arguments]
  • Run pygo with no arguments to print the banner and the command list.
  • The CLI reads pygo.toml from the current directory when running project commands (dev, build, test, migrate, seed, fmt, lint, docs, info, doctor).

Scaffold a new PyGo project (Go web layer + Python domain layer).

Terminal window
pygo new myapp
cd myapp
pygo dev

Start the development server with hot reload. A Go supervisor boots the Python runtime over a local Unix Domain Socket (UDS) and serves HTTP.

Terminal window
pygo dev
Flag Description Default
--port / -p Server port 8080
--host Bind address 127.0.0.1

Build for production.

Terminal window
# Single binary with the Python runtime embedded
pygo build --embed-python
# Go binary only (Python runs alongside via UDS)
pygo build
Flag Description
--embed-python Bundle the Python interpreter/runtime into one binary
--output / -o Output path for the binary

Run tests for the whole project or a specific module.

Terminal window
pygo test
pygo test core

Execute a task from the tasks/ directory.

Terminal window
pygo run seed_users

Run pending migrations, roll back the last migration, or show migration status.

Terminal window
pygo migrate up
pygo migrate status

Execute database seeders.

Format Go and Python code in the project.

Validate project structure and code (entrypoints, module layout, pygo.toml).

Generate project documentation.

Print the CLI version (e.g. pygo v2.2.4-native).

Update the CLI to the latest GitHub release.

  • Resolves the latest tag via the GitHub API.
  • Downloads the raw binary pygo-v{version}-{os}-{arch} (+ .exe on Windows).
  • Verifies it against checksums.txt (SHA-256) when published.
  • Installs it in place (overwrites the current executable).
Terminal window
pygo upgrade # latest
pygo upgrade v2.2.4 # specific version

pygo module install | list | search | remove | update

Section titled “pygo module install | list | search | remove | update”

Manage modules from the registry.

Terminal window
pygo module install pygo-i18n
pygo module list
pygo module search auth
pygo module update pygo-i18n
pygo module remove pygo-i18n

Show project information (name, version, modules, entrypoints).

Diagnose project health (Go/Python availability, socket, config, module wiring).

The CLI is distributed as a raw binary per OS/arch. The fastest install:

Terminal window
curl -sL https://raw.githubusercontent.com/PyGo-Labs/pygo-framework/main/install.sh | bash

Environment variables:

Variable Description Default
PYGO_VERSION Version to install (e.g. v2.2.4, latest) latest
PYGO_INSTALL_DIR Install directory ~/.local/bin