stack-effect
v0.5.0
Published
Scaffolding CLI for full-stack TypeScript apps built on Effect
Maintainers
Readme
stack-effect
Scaffolding CLI for full-stack TypeScript apps built on Effect.
Quick Start
bunx stack-effect@latest init my-app
# or with npx
npx stack-effect init my-appThen add targets and modules to your project:
# Interactive mode — guided prompts
bunx stack-effect@latest add
# Non-interactive — specify what you need
bunx stack-effect@latest add --target server/api --modules http-api-server --yesWhat You Get
A structured Effect-first monorepo:
my-app/
├── stack.effect.json
├── package.json
├── tsconfig.json
├── turbo.json
├── packages/
│ ├── config-typescript/
│ ╰── domain/
│ ╰── src/
│ ├── [+] Api.ts
│ ╰── [+] index.ts
╰── apps/
├── web/
│ ╰── src/
│ ├── [+] main.tsx
│ ╰── [+] app.tsx
╰── api/
╰── src/
├── [+] index.ts
╰── Api/
├── [+] Health.ts
╰── [+] Hello.tsUsage
stack-effect init [project-name]
Scaffolds a new project. Prompts for runtime (bun/node), monorepo tool, linting, formatting, and test framework.
| Flag | Description |
| ----------------------- | ----------------------------- |
| --yes | Accept defaults, skip prompts |
| --dry-run | Preview without writing files |
| --root <path> | Output directory |
| --runtime <bun\|node> | Runtime selection |
stack-effect add
Adds targets and modules to an existing project. In interactive mode, select a target kind (client, server, cli, package), name it, then pick modules. Dependencies between modules are resolved automatically.
| Flag | Description |
| ---------------------- | --------------------------------- |
| --target <kind/name> | Target to add (e.g. client/web) |
| --modules <id,...> | Modules to include |
| --yes | Skip confirmation prompts |
| --dry-run | Preview the plan without applying |
stack-effect graph
Visualize the full catalog of available targets and modules.
| Flag | Description |
| -------------------------------- | ------------- |
| --format <table\|mermaid\|dot> | Output format |
Run stack-effect graph to see all available targets and modules.
Examples
Initialize a project with bun and add a client with an API connection:
bunx stack-effect@latest init my-app --runtime bun --yes
bunx stack-effect@latest add --target client/web --modules http-api-client --yesThe http-api-client module automatically implies http-api-server on a server target, so both sides of the API are scaffolded together.
License
MIT — see LICENSE for details.
