Metadata-Version: 2.4
Name: cast-by-matt
Version: 0.2.0
Summary: Spin up projects in seconds — clone your own repos as templates, layer on add-ons, and land in your editor.
Author-email: Matthew Garcia <gmatt.devs@gmail.com>
License-Expression: MIT
License-File: LICENSE
Keywords: cli,project-generator,scaffolding,templates
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.10
Requires-Dist: questionary>=2.0
Requires-Dist: rich>=13.0
Requires-Dist: tomli>=2.0; python_version < '3.11'
Requires-Dist: typer>=0.12
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Requires-Dist: ruff>=0.15; extra == 'dev'
Description-Content-Type: text/markdown

# cast — outline

Spin up projects in seconds. Save your own repos (local or from GitHub) as templates, scaffold new projects from them, layer on add-ons like Tailwind, Supabase, or Prisma, and land straight in your editor.

## Install

```sh
pipx install cast-by-matt
```

## Usage

Run `cast` with no arguments for the interactive menu:

```sh
cast
```

Or use it directly:

```sh
cast init myapp nextjs      # scaffold 'myapp' from the 'nextjs' template
cast add nextjs ~/code/my-starter   # save a local directory as a template
cast list                   # list saved templates
cast info nextjs            # show a template's variables, add-ons, and docs
cast remove nextjs          # delete a template
cast starter                # install the bundled starter templates
```

`init` is fully scriptable: `--addons tailwind,prisma` runs add-ons and `--open` launches your editor.

### Works with AI coding agents

Every command runs headless, so agents like Claude Code can drive `cast` directly: discover templates with `cast list --json`, inspect a template's stack and add-ons with `cast info <template> --json`, then scaffold with `cast init <name> <template> --addons ...`. No plugin needed — the CLI is the integration.

New here? Just run `cast` — on first run it offers to install two starter templates: `starter`, a dependency-free mini site whose README explains how templating works, and `web`, a minimal Vite app. Scaffold one and you've seen the whole workflow.

Templates live in `~/.project_templates`. Scaffolding copies your template byte-for-byte — what you saved is exactly what you get. `git init` runs automatically, and dependency installs are detected and run for you using the package manager the template was built with (`pnpm install`, `uv sync`, `cargo build`, …), in the project root and its subfolders — fullstack templates with a `frontend/` and `backend/` just work.

## Optional: `cast.json` overrides

You never need a manifest. cast reads a template's description from its own `package.json`/`pyproject.toml`/`Cargo.toml`, detects installs from its lockfiles, and only offers add-ons that fit its stack. Drop a `cast.json` at the template root only to add things a repo can't say about itself — a recommendation, a docs link, a custom setup command. Every field is optional, and the file never ships into generated projects.

```jsonc
{
  // shown in the template picker and `cast list`
  "description": "Next.js 15 + App Router starter",

  "addons": {
    "recommended": ["tailwind", "shadcn"], // pre-checked in the add-on picker
    "supported": ["tailwind", "shadcn", "prisma"], // limits built-ins shown; omit to show all
    "custom": {
      // ships with the template — anyone who installs it gets this add-on
      "seed-db": { "label": "Seed database", "cmd": "npm run seed" },
    },
  },

  // replaces automatic install detection (git init still always runs);
  // use [] to skip installs entirely
  "post_init": ["npm install", "cp .env.example .env"],

  // printed after scaffolding so you never hunt for docs again
  "docs": ["https://nextjs.org/docs"],
}
```

## Sharing templates

A template is just a repo. Push it to GitHub and anyone can install it — `cast add nextjs https://github.com/you/your-starter` — with its description, recommended add-ons, docs links, and custom add-ons riding along in `cast.json`. Tag your repo with the `cast-template` topic so others can find it, and browse that topic to find theirs. Add-on commands always print in full before they run.
