π§ DragonDev β Getting Started
Welcome to the DragonDev guide!
This document walks you through installing, configuring, and using the Dragon CLI to create, publish, and manage Go-based project blueprints.
π 1οΈβ£ Install the CLI
From source
go install github.com/getDragon-dev/dragon-cli/cmd/dragon@latest
Or clone for local development
git clone https://github.com/getDragon-dev/dragon-cli.git
cd dragon-cli
go build ./cmd/dragon
./dragon
π§© 2οΈβ£ Core Commands
π§ Registry Management
Dragon supports multiple registries, local or remote. You can list, add, remove, or set defaults β or just use a URL directly.
# list all configured registries
dragon registry list
# use a remote registry (auto-adds and sets as default)
dragon registry use https://getdragon.dev/registry.json
# add a local registry
dragon registry add --name local --url ~/dev/dragon-registry/registry.json
# control lookup order
dragon registry order set --names public,local
π Discover Blueprints
Search or list available blueprints across all registries.
# list blueprints from default registry
dragon list
# list all registries and show where each blueprint comes from
dragon list --all
# filter by tag
dragon list --tag go
# fuzzy search (name, description, tags)
dragon search --query cli --all
π οΈ 3οΈβ£ Create Your First Project
Generate a new Go project from a published 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
What happens:
- Pulls the api-service blueprint (from your active registry or the public one at getdragon.dev)
- Downloads and extracts the template (if –remote is set)
- Prompts for missing variables interactively
- Renders all files using Goβs text/template + Sprig functions
- Resulting structure:
mysvc/
βββ cmd/mysvc/main.go
βββ internal/
β βββ config/config.go
β βββ db/open.go
β βββ server/handler.go
βββ migrations/
βββ go.mod
βββ Dockerfile
βββ atlas.hcl
π¦ 4οΈβ£ Publish a Blueprint
When your blueprint is ready to share, run:
dragon publish
This will:
- Tag a new semantic version (e.g. v1.0.0)
- Generate or update a changelog
- Package the blueprint and update the registry
- Push everything to your configured GitHub repository
Your CI/CD can also handle this via the built-in release flow.
βοΈ 5οΈβ£ Consume a Blueprint
Apply a published blueprint directly from the registry:
dragon get api-service
By default, this fetches from https://getdragon.dev/registry.json .
π» 6οΈβ£ Automation & CI
Integrate dragon into your CI pipelines (GitHub Actions, Drone, etc.):
dragon release --auto
This command bumps versions, regenerates the changelog, and updates registry.json automatically.
π§ Pro Tips
- Interactive mode: –interactive prompts you for template variables.
- Dynamic completions: dragon gen -b will suggest available blueprints.
- Local development: run with –registry ../dragon-registry/registry.json to test unpublished blueprints.
- Multi-registry search: dragon list –all aggregates across all configured registries.
π Next Steps
π Browse the Registry
π Download CLI Source