🧰 Dragon CLI — Command Reference

This page lists all available commands, flags, and usage examples for the Dragon CLI.
Use dragon help [command] at any time for quick inline help.


🐉 Overview

The Dragon CLI manages blueprints, registries, and Go project generation.
It supports both local and remote registries and provides powerful templating tools with Sprig functions and interactive prompts.

dragon [command] [flags]

⚙️ Global Flags

FlagDescriptionDefault
–registryPath or URL to a specific registry.jsonhttps://getdragon.dev/registry.json
–helpShow help for any command
–versionPrint the CLI version

🏗️ Commands

🔹 dragon list

List blueprints available in your configured registry or across all registries.

dragon list
dragon list --all
dragon list --tag go
dragon list --json

Options

FlagDescription
–allShow blueprints from all registries
–tag <tag>Filter results by tag
–jsonOutput raw JSON

Fuzzy search blueprints by name, description, or tags.

dragon search --query api
dragon search --query cli --all

Options

FlagDescription
–querySearch term
–allSearch across all registries

🔹 dragon gen

Generate a new Go project from a blueprint.

dragon gen \
  -b api-service \
  -o mysvc \
  --router chi \
  --db postgres-gorm \
  --remote \
  --version ">=1.0.0" \
  --set Module=github.com/acme/mysvc \
  --interactive

Options

FlagDescription
-b, –blueprintBlueprint name (required)
-o, –outOutput directory (default .)
–routerRouter type (chi, gorilla, httprouter, servemux)
–dbDatabase driver (sqlite-gorm, postgres-native, etc.)
–versionSemantic version constraint
–remoteFetch blueprint ZIP from release asset
–setSet a variable manually (e.g. –set Module=github.com/me/app)
–varsLoad variables from a YAML/JSON file
–interactivePrompt for missing variables

🔹 dragon info

Display detailed metadata for a blueprint.

dragon info api-service

Options

FlagDescription
–registryRegistry URL or path (optional)

🔹 dragon publish

Publish a new or updated blueprint.

dragon publish

What it does

  • Tags a new semantic version (vX.Y.Z)
  • Generates or updates a changelog
  • Uploads blueprint ZIPs as release assets
  • Triggers registry update events

🔹 dragon release

Automated release management.

dragon release --auto

Options

FlagDescription
–autoAutomatically bump version and regenerate registry
–skip-testsSkip pre-release checks

🔹 dragon get

Fetch and apply an existing blueprint.

dragon get api-service

Options

Flag Description –registry Registry URL or path override

🔹 dragon registry

Manage multiple registries.

List registries

dragon registry list

Use a new registry (auto-add + set default)

dragon registry use https://getdragon.dev/registry.json

Add or remove registries manually

dragon registry add --name local --url ~/dev/dragon-registry/registry.json
dragon registry remove local

Change default

dragon registry set-default public

Control lookup order

dragon registry order set --names public,local,staging

🔹 dragon completion

Generate shell completions (bash, zsh, fish, powershell).

Bash

dragon completion bash > /etc/bash_completion.d/dragon

Zsh

dragon completion zsh > "${fpath[1]}/_dragon" && autoload -U compinit && compinit

Fish

dragon completion fish > ~/.config/fish/completions/dragon.fish

PowerShell

dragon completion powershell | Out-String | Invoke-Expression

These completions include dynamic blueprint suggestions (from your active registry).

💡 Tips

Local dev: Use --registry ../dragon-registry/registry.json to test unpublished blueprints.

CI/CD: Combine dragon publish and dragon release --auto for a full automation pipeline.

Debug: Run with --verbose for additional logs (if you enabled debug mode in config).

🧩 Environment Variables

VariablePurpose
DRAGON_CONFIGOverride default config path
GITHUB_TOKENUsed for publishing releases and updating registries
XDG_CONFIG_HOMEBase path for Dragon CLI config (~/.config/dragon/config.json fallback)

👉 Getting Started Guide

👉 Registry Browser

👉 Source on GitHub