fledge
Get your projects ready to fly.
A fast, opinionated project scaffolding CLI built in Rust. Create new projects from templates — local or remote — with smart defaults, Tera-powered rendering, and zero boilerplate.
Why fledge?
- Fast — native Rust binary, no runtime dependencies
- Smart defaults — pulls author/org from git config, renders dates, computes name variants automatically
- Remote templates — use any GitHub repo as a template source with
owner/reposyntax - Extensible — create your own templates with a simple
template.tomlmanifest - Safe — remote template hooks require explicit confirmation before running
- Optional TUI — interactive template browser with
--features tui
Install
# From crates.io
# With TUI support
# From source
&&
Quick Start
# Create a new Rust CLI project
# Browse templates interactively
# Use a remote GitHub template
# Preview what would be created
# Skip all prompts with defaults
# List available templates
Built-in Templates
| Template | Description |
|---|---|
rust-cli |
Rust CLI application with clap, CI, and release automation |
rust-lib |
Rust library crate with docs and publishing workflow |
swift-pkg |
Swift package with Package.swift, CI, and coding conventions |
ts-bun |
TypeScript project with Bun runtime |
angular-app |
Angular application with mobile-first setup |
CLI Reference
fledge init <name>
Create a new project from a template.
fledge init <name> [OPTIONS]
Arguments:
<name> Project name
Options:
-t, --template Template to use (skip interactive selection)
-o, --output Parent directory for the project [default: .]
--no-git Skip git init and initial commit
--no-install Skip dependency installation (post-create hooks)
--refresh Force re-clone of cached remote templates
--dry-run Show what would be created without writing anything
-y, --yes Skip all confirmation prompts (accept defaults)
fledge list
List all available templates (built-in + configured).
fledge tui (requires --features tui)
Interactive terminal UI for browsing templates and scaffolding projects. Navigate with arrow keys, fill in variables with Tab, confirm with Enter.
fledge tui [OPTIONS]
Options:
-o, --output Parent directory for the project [default: .]
--no-git Skip git init and initial commit
fledge completions <shell>
Generate shell completions for your shell. Supported: bash, zsh, fish, powershell.
# Bash
# Zsh
# Fish
Remote Templates
Any GitHub repository can be a template source. Use owner/repo syntax:
# Use a single-template repo
# Use a specific template from a collection
# Force re-download of a cached template
Remote templates are cloned and cached locally. Post-create hooks from remote templates always require confirmation unless --yes is passed.
Template Repositories
You can register template repos in your config so they appear in fledge list:
# ~/.config/fledge/config.toml
[]
= ["CorvidLabs/fledge-templates", "myorg/templates"]
Configuration
fledge reads from ~/.config/fledge/config.toml:
[]
= "Your Name"
= "YourOrg"
= "MIT" # default license for new projects
[]
= ["~/my-templates"] # additional local template directories
= ["CorvidLabs/fledge-templates"] # GitHub repos to include in template list
[]
= "ghp_..." # for private template repos (also reads FLEDGE_GITHUB_TOKEN / GITHUB_TOKEN env vars)
If author is not set, fledge falls back to git config user.name. The GitHub token is checked in order: FLEDGE_GITHUB_TOKEN env var → GITHUB_TOKEN env var → config file.
Creating Templates
A template is a directory with a template.toml manifest and any number of files. Files are rendered through Tera (a Jinja2-like engine) before being written.
Directory Structure
my-template/
├── template.toml # manifest (required)
├── src/
│ └── main.rs # template files — Tera syntax supported
├── README.md
├── Cargo.toml
└── .github/
└── workflows/
└── ci.yml
template.toml Reference
[]
= "my-template" # template name (used in --template flag)
= "A short description" # shown in fledge list
= "0.1.0" # optional minimum fledge version
[]
# Each key becomes a template variable. Values have `message` and optional `default`.
= { = "Project description", = "A new project" }
= { = "Default port", = "3000" }
# Defaults can use Tera expressions referencing earlier variables:
= { = "Repository URL", = "https://github.com/{{ github_org }}/{{ project_name }}" }
[]
= ["**/*.rs", "**/*.toml", "**/*.md", "**/*.yml"] # files to render through Tera
= ["**/*.png", "**/*.ico"] # files to copy as-is (binary files)
= ["template.toml"] # files to exclude from output
[]
= ["cargo fmt", "npm install"] # commands to run after scaffolding
Built-in Variables
These are always available in your templates — no need to define them in [prompts]:
| Variable | Description | Example |
|---|---|---|
project_name |
The project name as provided by the user | my-cool-app |
project_name_snake |
Snake case version | my_cool_app |
project_name_pascal |
PascalCase version | MyCoolApp |
author |
From config, git, or prompted | Leif |
github_org |
From config or prompted (default: CorvidLabs) |
CorvidLabs |
license |
From config (default: MIT) |
MIT |
year |
Current year | 2026 |
date |
Current date | 2026-04-18 |
Tera Syntax
Templates use Tera syntax:
# {{ project_name }}
{{ description }}
## Author
Created by {{ author }} ({{ github_org }}) in {{ year }}.
{% if license == "MIT" %}
This project is MIT licensed.
{% endif %}
File Rules
render— glob patterns for files that should be processed through Tera. Template variables ({{ project_name }}, etc.) are replaced with actual values.copy— glob patterns for files that should be copied as-is. Use for binary files (images, fonts) that would break if parsed.ignore— glob patterns for files to exclude from the output entirely.template.tomlshould always be listed here.
Files not matching any rule are rendered by default.
Post-Create Hooks
Commands listed in hooks.post_create run inside the newly created project directory after all files are written. Use them for dependency installation, formatting, or other setup:
[]
= ["bun install", "bun run format"]
For local (built-in) templates, hooks run automatically. For remote templates, fledge shows the commands and asks for confirmation before running — unless --yes is passed.
Testing Templates Locally
Point fledge at your template directory during development:
# Add your template directory to config
# ~/.config/fledge/config.toml
# Or use it directly as a remote-style path
Then iterate: edit template files, run fledge init test-output --template my-template, inspect the output, delete and repeat.
Example: Creating a Template from Scratch
&&
Create template.toml:
[]
= "python-api"
= "Python FastAPI project with Docker"
[]
= { = "Project description", = "A FastAPI application" }
= { = "Python version", = "3.12" }
[]
= ["**/*.py", "**/*.toml", "**/*.md", "**/*.yml", "Dockerfile"]
= ["template.toml"]
[]
= ["python -m venv .venv"]
Create template files using Tera variables:
# app/main.py
"""{{ description }}"""
=
return
# Dockerfile
FROM python:{{ python_version }}-slim
WORKDIR /app
COPY . .
RUN pip install -e .
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0"]
Test it:
License
MIT