A fast, flexible CLI to manage project templates and scaffold new projects with smart detection, interactive selection, and safe copy semantics.
- Language/framework tagging on templates (e.g., Go, React, Vue)
- Arrow-key interactive menus for choosing language and template
- Per-language default templates and non-interactive automation
- JSON outputs and quiet modes for scripting
.foundryignoresupport, symlink-safe copying, and binary-safe replacements- Git repository initialization with language-specific
.gitignorefiles - Clone templates directly from Git repositories
- Run
foundry-0.1.0-setup.exefrom the releases. - Follow the installer prompts.
- The executable will be installed and optionally added to your PATH.
- Verify installation:
foundry --version
foundry --help- Extract the tarball:
tar -xzf foundry-0.1.0-linux-amd64.tar.gz
# or for ARM64
tar -xzf foundry-0.1.0-linux-arm64.tar.gz- Run the included install script:
cd foundry-0.1.0
sudo ./install.shsudo dpkg -i foundry-0.1.0-amd64.deb
# or for ARM64
sudo dpkg -i foundry-0.1.0-arm64.deb- The executable will be installed system-wide (or as defined in the script).
Verify installation:
foundry --version
foundry --help- Add a template from a folder (auto-detects language):
foundry template add foundry-cli ./examples/foundry-cli --description "Go CLI starter" --language Go- Tag frameworks like React or Vue:
foundry template add react-starter C:\templates\react-app --description "React + TS" --language React- Set a default template for a language (optional):
foundry config Go foundry-cli- Create a new project interactively:
foundry new my-app- Or non-interactively:
# Use default Go template
foundry new my-api --language Go
# Use a specific template
foundry new my-react --template react-starter--config <path>: Use a custom config path (default:~/.foundry/config.yaml)--no-color: Disable colored output--color: Force colored output (overridesNO_COLORenvironment variable)--version/-v: Print version and exit
Color control:
- By default, colored output is enabled
- Set
NO_COLORenvironment variable to disable colors globally - Use
--no-colorflag to disable colors for a single command - Use
--colorflag to force colors even whenNO_COLORis set - Flag takes precedence over environment variable
Detect languages, package managers, and dev tools on your system.
foundry detect
foundry detect --json
foundry detect --non-interactive --yes--json: machine-readable output--non-interactive: do not prompt--yes: auto-save results when non-interactive
Manage project templates.
- Add:
foundry template add <name> <path> [--description <text>] [--language <tag>]- List:
foundry template list [--sort name|language] [--quiet]- Show:
foundry template show <name> [--files-only] [--summary] [--json]- Remove:
foundry template remove <name> [--force]Create a new project from a saved template or clone from a Git repository:
foundry new <project-name> \
[--language <Lang>] [--template <Name>] [--git <URL>] \
[--path <Dir>] [--no-git] [--non-interactive] \
[--var KEY=VALUE ...]Behavior:
--language: uses the default template for that language--template: uses a specific template--git: clones a template from a Git repository URL- Interactive mode shows two menus if none of the above is provided
Examples:
# Use default Go template
foundry new my-api --language Go
# Use a specific saved template
foundry new my-app --template react-starter
# Clone template from GitHub
foundry new my-project --git https://github.com/username/template-repo
# Create in custom location without git init
foundry new my-app --language Python --path ~/projects --no-gitFlags:
--path: target directory (default:./<project-name>)--no-git: skip git initialization--non-interactive: disable menus--var KEY=VALUE: replace custom placeholders in text files
Git features:
- Automatically initializes git repository in new projects
- Downloads language-specific
.gitignorefrom github/gitignore - Creates initial commit with "Initial commit from Foundry"
- Use
--no-gitflag to skip git initialization
Placeholders replaced:
{{PROJECT_NAME}},{{AUTHOR}},{{PROJECT_NAME_LOWER}},{{PROJECT_NAME_UPPER}}, plus any custom--var KEY=VALUE
Safeguards:
- Symlink/junction-safe copying
- Skips heavy directories (
node_modules,vendor,.venv,dist,build) - Respects
.foundryignore - Binary-safe replacements
Place at the root of a template to exclude files/folders from scanning and copying. Simple glob/prefix matching.
# Ignore build outputs
/dist/
/build/
# Ignore large directories
node_modules/
vendor/
# Ignore dotfiles
.*- Default config file:
~/.foundry/config.yaml - Stores saved templates and language defaults
Commands:
# Set default template
foundry config Go foundry-cli
# Clear a language default
foundry config Go ""- Disable color output via
--no-colororNO_COLORenvironment variable - Windows: use terminals that support ANSI sequences (Windows Terminal, VS Code, PowerShell 7+)
- Richer ignore pattern semantics
- Template edit command (update language tag, description, path)
- Git branch/tag selection for
--gitflag
See LICENSE