-
Notifications
You must be signed in to change notification settings - Fork 5
Cli commands
This is the canonical CLI reference for Govard.
| Shortcut | Equivalent |
|---|---|
govard up |
govard env up |
govard down |
govard env down |
govard restart |
govard env restart |
govard ps |
govard env ps |
govard logs |
govard env logs |
| Alias | Full Command |
|---|---|
govard boot |
govard bootstrap |
govard cfg |
govard config |
govard dbg |
govard debug |
govard gui |
govard desktop |
govard diag |
govard doctor |
govard ext |
govard extensions |
govard prj |
govard project |
govard rmt |
govard remote |
govard sh |
govard shell |
govard snap |
govard snapshot |
| Alias | Full Command |
|---|---|
govard tool mr |
govard tool magerun |
-
--fromis an alias for--source -
--tois an alias for--destination -
-e, --environmentremains a supported source-environment option
Detect the project framework and generate .govard.yml.
govard init
govard init --framework magento2
govard init --framework custom
govard init --migrate-from wardenWhen migrating from Warden, govard init --migrate-from warden maps WARDEN_TABLE_PREFIX to Govard's table_prefix field for Magento 2, Magento 1, and OpenMage projects.
Run bootstrap flows for clone or fresh-install setups.
govard bootstrap
govard bootstrap --clone --environment staging --yes
govard bootstrap --framework magento2 --fresh --framework-version 2.4.9
govard bootstrap -e staging --no-pii --no-noiseMode selection:
-
--fresh+--framework+--framework-version— fresh install via scaffolder -
--clone+--environment— rsync the whole source from a remote server
Source selection:
-
-e, --environment— source remote name; accepts standard names (staging,production,dev) and any custom identifier (qa,preprod,demo,client-uat) -
--remote— alias for--environment -
--db-dump— import database from a local SQL file path
Privacy & performance filters:
| Flag | Effect |
|---|---|
-N, --no-noise |
Exclude ephemeral data (logs, sessions, cache tags, cron history) |
-S, --no-pii |
Exclude sensitive data (customers, orders, admin users, passwords) |
--delete |
Delete destination files not present on source |
--no-compress |
Disable rsync compression |
-X, --exclude |
Custom rsync exclude patterns (repeatable) |
--no-db |
Skip database import |
--no-media |
Skip media sync |
--media [mode] |
Media sync mode (none, minimal, optimized, all) |
--no-composer |
Skip composer install
|
--no-admin |
Skip admin user creation (Magento 2 only) |
--no-stream-db |
Use local temp file for DB transfer |
--no-up |
Skip starting local containers before bootstrap steps |
For Magento projects with table_prefix set, DB privacy filters target prefixed table names automatically.
Magento special flags:
| --include-sample | Install sample data (fresh install) |
| --hyva-install | Auto-install Hyva theme |
Plan & confirmation:
-
--plan— print plan and exit without executing -
-y, --yes— skip interactive confirmation (CI/non-interactive)
Project lifecycle and Docker Compose wrapper.
govard env up
govard env start
govard env stop
govard env restart
govard env down
govard env ps
govard env logs php -f
govard env pull
govard env build
govard env cleanupgovard env up flags:
| Flag | Effect |
|---|---|
--pull |
Pull images before starting |
--fallback-local-build |
Build missing images locally |
--remove-orphans |
Remove orphaned containers |
--quickstart |
Fastest startup path |
--update-lock |
Auto-update govard.lock on mismatches |
--no-tuning |
Skip framework auto-configuration prompts |
Files re-rendered on env up:
~/.govard/compose/<project-hash>.yml~/.govard/nginx/<project>/default.conf~/.govard/apache/<project>/httpd.conf~/.govard/nginx/<project>/mage-run-map.conf
govard env down flags:
-
-v, --volumes— remove volumes -
--rmi local— remove local images
Manage global services (proxy, Mailpit, PHPMyAdmin, Portainer).
govard svc up
govard svc restart --no-trust
govard svc logs --tail 50
govard svc sleep
govard svc wakePortainer is accessible at
https://portainer.govard.testDefault login:admin/AdminGovard123$
Manage extra local domains for the current project.
govard domain add brand-b.test
govard domain remove brand-b.test
govard domain listList running Govard environments across the workspace.
govard statusLaunch the Wails desktop app.
govard desktop
govard desktop --dev
govard desktop --backgroundSee Desktop App for details.
Open a shell in the application container.
govard shell
govard shell --no-tty- PHP frameworks →
phpcontainer at/var/www/html - Node-first frameworks (Next.js, Emdash) →
webcontainer at/app
Manage Xdebug status and sessions.
govard debug status
govard debug on
govard debug off
govard debug shellRequests route to php-debug only when the XDEBUG_SESSION cookie matches stack.xdebug_session.
Run project test tools inside the application container.
govard test phpunit
govard test phpstan
govard test mftf
govard test integrationRun custom commands from .govard/commands or ~/.govard/commands.
govard custom list
govard custom hello
govard custom deploy -- --dry-runBrowse and manage known projects.
govard project list
govard project list --orphans
govard project open billing
govard project delete demo
govard project delete --yes demo[WARNING] CAUTION
govard project deleteremoves persistent database volumes by default. Project source code is never deleted.
Deletion process:
- Runs
pre-deletelifecycle hooks - Executes
docker compose down -v(removes containers + volumes) - Unregisters proxy domains
- Removes project from registry (
projects.json) - Runs
post-deletehooks
Manage named remotes for sync, deploy, shell, and database workflows.
govard remote add staging --host staging.example.com --user deploy --path /var/www/app
govard remote copy-id staging
govard remote test staging
govard remote exec staging -- ls -la
govard remote audit tail --status failure --lines 50For home-relative remote paths, quote the value:
govard remote add staging --host staging.example.com --user deploy --path '~/public_html'Key features:
- Capabilities:
files,media,db,deploy - Auth methods:
keychain,ssh-agent,keyfile - Production write protection by default
- Audit logs:
~/.govard/remote.log
→ Full guide: Remotes and Sync
Synchronize files, media, or databases between local and named remotes.
govard sync --source staging --destination local --full --plan
govard sync --from staging --to local --media
govard sync -s prod --file --path app/etc/config.php
govard sync --db --no-noise --no-piiAuto-selects staging remote if no --source is provided, falling back to dev.
When --media is used without a mode, Govard defaults it to optimized.
Key flags:
| Flag | Effect |
|---|---|
-s, --source / --from
|
Source environment |
-d, --destination / --to
|
Destination environment |
--file, --media, --db, --full
|
Scope selection |
--plan |
Print plan and exit |
-I, --include |
Rsync include pattern (repeatable) |
-X, --exclude |
Rsync exclude pattern (repeatable) |
-m, --media [mode] |
Media sync scope (none, minimal, optimized, all); bare --media defaults to optimized
|
-N, --no-noise |
Exclude ephemeral data |
-P, --no-pii |
Exclude sensitive data |
Database utilities for local and remote-backed workflows.
govard db connect
govard db dump
govard db dump -e staging --local
govard db query "SELECT COUNT(*) FROM sales_order"
govard db info
govard db top
govard db import --file backup.sql --drop
govard db import --stream-db -e staging --drop
govard db clone-volume warden_magento2_dbdataRun deploy lifecycle hooks for the current project.
govard deployManage local and remote snapshots for DB and media.
govard snapshot create
govard snapshot create -e staging
govard snapshot list
govard snapshot list -e staging
govard snapshot restore latest
govard snapshot pull latest -e staging
govard snapshot push before-deploy -e prodOpen common browser targets.
govard open app
govard open admin
govard open mail
govard open db
govard open db --pma
govard open db --client
govard open db -e stagingManage public tunnels (requires cloudflared).
govard tunnel start
govard tunnel status
govard tunnel stop[IMPORTANT] IMPORTANT The
cloudflaredbinary must be installed separately. Install via the official Cloudflare repository or GitHub releases.
Run framework CLIs inside project containers:
govard tool magento [command] # Magento 2
govard tool magerun [command] # Magento 1 / Magento 2 (Shortcut: mr)
govard tool artisan [command] # Laravel
govard tool drush [command] # Drupal
govard tool symfony [command] # Symfony
govard tool shopware [command] # Shopware
govard tool cake [command] # CakePHP
govard tool wp [command] # WordPress
govard tool prestashop [command] # PrestaShop
# General tools
govard tool composer [command]
govard tool npm [command]
govard tool yarn [command]
govard tool npx [command]
govard tool pnpm [command]
govard tool grunt [command]For node-first frameworks, package-manager commands run in the web container at /app.
govard config get stack.php_version
govard config set stack.php_version 8.4
govard config set table_prefix demo_
govard config profile # Show recommended profile for current framework
govard config profile --json # Output profile as JSON
govard config profile apply # Apply recommended profile to .govard.yml
govard config auto # Magento 2: inject settings into env.phpDisplay the recommended runtime profile for the detected framework.
govard config profile
govard config profile --jsonOutput includes detected framework, recommended PHP version, database, cache, search, and other service configurations.
Switch to a different environment profile. Profiles allow running the same project with different runtime configurations (e.g., PHP 8.2 for production testing, PHP 8.3 for development).
govard config profile switch upgrade
govard config profile switch staging
govard config profile switch # Interactive selectionProfile files are stored as .govard.<name>.yml in the project root. The selected profile is persisted per-project in ~/.govard/projects.json.
After switching, run govard env up to apply the new environment. You'll be prompted for confirmation when a profile change requires restarting containers.
Reset to the default profile (no profile active).
govard config profile clearInitialize .govard/* extension scaffolding.
govard extensions init
govard extensions init --forceManage the remote blueprint registry cache.
govard blueprint cache list
govard blueprint cache clearRun startup diagnostics with actionable remediation.
govard doctor
govard doctor --fix
govard doctor --json
govard doctor --pack
govard doctor trustChecks include: Docker, Compose, ports, disk sanity, Govard home, compose directory health, SSH agent, and outbound connectivity.
-
--fix— Automatically detect and repair common issues -
trust— Install Root CA into system trust store + browser NSS
Generate or validate govard.lock snapshots for environment drift detection.
govard lock generate
govard lock check
govard lock diff
govard lock generate --file .govard/govard.lockDownload release artifacts, verify checksums, and replace binaries atomically.
govard self-updateNative framework upgrade pipeline.
govard upgrade --version 2.4.8-p4 # Magento 2
govard upgrade --version 11 # Laravel
govard upgrade --version 7 # Symfony
govard upgrade --version 6.7 # WordPress
govard upgrade --version 11 --dry-run # Preview stepsFlags:
| Flag | Effect |
|---|---|
--version |
Target version (required) |
--dry-run |
Show steps without executing |
--no-db-upgrade |
Skip DB migrations |
--no-env-update |
Skip profile update and container restart |
-y, --yes |
Auto-confirm all prompts |
govard versionSmart shortcut for Redis/Valkey management.
govard redis cli
govard redis flush
govard redis infoSmart shortcut for Varnish management.
govard varnish purge
govard varnish statusSmart shortcut for RabbitMQ management.
govard rabbitmq status
govard rabbitmq queues
govard rabbitmq cli list_exchangesAll commands support:
-
-h, --help— Show help
Govard — Go-based Versatile Runtime & Development GitHub · Releases · Issues · MIT License