Skip to content

jtieri/mold

Repository files navigation

mold

Shape new AI-ready projects from templates.

mold is a Go CLI that scaffolds projects pre-configured for AI-assisted development. Run one command and get instruction files for Claude Code, Cursor, Copilot, Aider, Gemini, and more — no other tool generates config for all major AI coding tools from a single command.

Features

  • Multi-tool generation — produce instruction files for 8 AI coding tools with --tools
  • Three built-in kits — Original (markdown TODO tracking), Beads (git-backed issue tracking via bd), and Forge (product lifecycle orchestration)
  • Stack templates — Go, Rust, and Next.js starter files, or bare for no opinions
  • MCP configuration — auto-generates repomix.config.json and .repomixignore
  • Claude Code slash commands — ships with /review, /test, /doc, /refactor (Original), /feature, /fix, /session-start, /session-end (Beads), or /ideate, /research, /define, /design, /develop, /test, /launch, /iterate and more (Forge)
  • Health checksmold doctor validates your project setup
  • Global config — persist defaults for kit, stack, author, and tools in ~/.config/mold/config.toml
  • Dry-run mode — preview what would be created before writing anything
  • Single binary — templates are embedded with embed.FS, no runtime dependencies

Quick Start

go install github.com/jtieri/mold/cmd/mold@latest

Create a new project:

mold new my-app --stack go --tools cursor,copilot
Creating project 'my-app'...

  create CLAUDE.md
  create .claude/settings.json
  create docs/TODO.md
  create .repomixignore
  create repomix.config.json
  create .claude/commands/review.md
  create .claude/commands/test.md
  create .claude/commands/doc.md
  create .claude/commands/refactor.md
  create .gitignore
  create Makefile
  create go.mod
  create main.go
  create .cursorrules
  create .github/copilot-instructions.md
Initialized empty Git repository in /home/user/my-app/.git/

Project 'my-app' created successfully!
  Directory: /home/user/my-app
  Kit: original
  Stack: go

Next steps:
  cd /home/user/my-app
  cat docs/TODO.md   # See your task list
  claude             # Start coding with AI

Usage

mold new

Scaffold a new project directory with AI config, git init, and an initial commit.

mold new my-app                              # Original kit, bare stack, Claude-only
mold new my-app --beads                      # Beads kit with bd issue tracking
mold new my-product --kit forge              # Forge kit with product lifecycle
mold new my-app --stack rust                 # Rust starter files
mold new my-app --tools all                  # Instruction files for every AI tool
mold new my-app --tools cursor,aider        # Claude + Cursor + Aider
mold new my-app --path ~/projects           # Create under a specific parent dir
mold new --here                              # Scaffold in the current directory
mold new my-app --no-git                     # Skip git init
mold new my-app --dry-run                    # Preview without writing

mold init

Add AI config to an existing project. Does not create directories, init git, or commit.

mold init                                    # Add Original kit to current dir
mold init --beads --tools copilot,gemini    # Beads kit + extra tool files
mold init --kit forge                        # Forge kit with product lifecycle
mold init --force                            # Overwrite existing config files
mold init --dry-run                          # Preview changes

mold config

Manage persistent global defaults stored at ~/.config/mold/config.toml.

mold config list                             # Show all settings
mold config set default-kit beads            # Always use Beads
mold config set tools claude,cursor,aider   # Default AI tools
mold config set default-stack go             # Default tech stack
mold config set author "Your Name"           # Author for templates
mold config get default-kit                  # Read a single value
mold config reset                            # Restore defaults

mold kit

Inspect available kits and their contents.

mold kit list                                # List kits
mold kit info original                       # Show files in Original kit
mold kit info beads                          # Show files in Beads kit
mold kit info forge                          # Show files in Forge kit

mold doctor

Validate the current project's AI setup.

mold doctor
Checking project health...

  [OK] CLAUDE.md exists
  [OK] .claude/settings.json exists and is valid JSON
  [OK] .git directory found
  [OK] .gitignore exists

Summary: 4 passed, 0 warnings, 0 errors

Supported AI Tools

Claude Code files are always generated by the selected kit. Additional tools are opt-in via --tools.

Tool Flag value Generated files
Claude Code claude (default) CLAUDE.md, .claude/settings.json, .claude/commands/
OpenAI Codex codex AGENTS.md
Cursor cursor .cursorrules
Cline cline .clinerules
Windsurf windsurf .windsurfrules
GitHub Copilot copilot .github/copilot-instructions.md
Aider aider .aider.conf.yml, .aiderignore
Gemini gemini GEMINI.md

Use --tools all to generate files for every tool, or pass a comma-separated list like --tools cursor,copilot,aider.

Kits

Kit Description Task tracking Slash commands
Original Standard Claude Code workflow docs/TODO.md (markdown) /review, /test, /doc, /refactor
Beads Git-backed issue tracking via bd CLI Beads graph DB in git /feature, /fix, /review, /session-start, /session-end
Forge Product lifecycle orchestration forge/ directory with 8 phases /ideate, /research, /define, /design, /develop, /test, /launch, /iterate, /delegate, /status, /session-start, /session-end

All kits generate CLAUDE.md, .claude/settings.json, .repomixignore, and repomix.config.json.

Select a kit with --beads, --kit forge, or set your default:

mold config set default-kit beads

Stack Templates

Each stack generates starter files appropriate for the language/framework.

Stack Flag Generated files
Go --stack go go.mod, main.go, Makefile, .gitignore
Rust --stack rust Cargo.toml, src/main.rs, .gitignore
Next.js --stack next package.json, next.config.ts, tsconfig.json, .gitignore
Bare --stack bare No stack files (default)

Stack templates also customize the CLAUDE.md tech stack section and allowed commands in settings.json.

Configuration

Global config lives at ~/.config/mold/config.toml.

Key Default Description
default_kit original Kit used when --beads or --kit is not passed
default_stack bare Stack used when --stack is not passed
author (empty) Author name injected into templates
git_init true Whether mold new runs git init
tools claude Comma-separated list of default AI tools

Contributing

Build from source

git clone https://github.com/jtieri/mold.git
cd mold
make build          # Output: bin/mold

Development commands

make test           # go test -race -cover ./...
make lint           # golangci-lint run ./...
make fmt            # gofmt + goimports
make vet            # go vet ./...
make check          # fmt + vet + lint + test
make install        # go install to $GOPATH/bin

Requirements

License

MIT