lloydrichards.dev

DEVELOP

May 10, 2026
Stack Effect
A scaffolding CLI for Effect applications that builds up a TypeScript monorepo one target and module at a time.

I used to start my Effect projects from the bEvr template, a monorepo with a React client, an API server, and a shared domain package. It worked well when I needed the whole stack. Starting a small CLI meant spending the first part of the project deleting the web app and server. I built Stack Effect so I could start with the pieces I needed and add the others as the project grew.

The demo walks through choosing a runtime and tooling, then reviewing the files Stack Effect plans to create.

Project Overview

The CLI starts with stack-effect init, which sets up the workspace and asks about choices like the runtime and test framework. Once the workspace exists, stack-effect add can add targets such as an API server, a web client, or a CLI, along with the modules they need. Both commands support a dry run, so you can see the proposed changes before writing anything.

Challenges and Insights

Turning a Template Into a Plan

I split the catalog from the scaffolding workflow. The catalog describes which targets and modules are available and how they fit together. The workflow turns a selection into a blueprint, then checks it against the workspace to work out which files to create, update, or leave alone. The CLI shows that plan before it writes anything.

Previewing the Repository

The Recipe Builder runs the planning and preview steps in a browser worker and writes the preview to an in-memory volume from Effect VFS. You can browse the generated files and copy the stack-effect create command to scaffold the same workspace locally in one step.

Building the Prompts

Choosing several modules for a target meant the prompt had to keep related choices visible as you moved through the list. I used Effect Boxes to compose the terminal layout and update it as the selection changed. The prompt implementation has its own lab writeup.