Skip to content

epicweb-dev/epicli

Repository files navigation

Generate and update apps based on the Epic Stack

Whether you want to generate a new app with the Epic Stack, update an existing one, or apply an example's changes to your own app (Epic Stack or not), this CLI will help you do it.

npx epicli [command] [options]

# apply changes from an example to your project
npx epicli apply

# update your app to the latest version of the epic stack
npx epicli update

Build Status MIT License Code of Conduct

The problem

  • You want to build a production-grade application quickly
  • You want to update your Epic Stack app with changes made in the Epic Stack
  • You want to apply the changes made in an example app to your own app

This solution

This is a CLI that helps you do all of those things.

apply

This command applies changes from Epic Stack example repositories to your app.

# browse examples interactively
npx epicli apply

# apply directly from a GitHub repo
npx epicli apply kentcdodds/epic-ai
npx epicli apply https://github.com/epicweb-dev/epic-oidc

# filter files to apply
npx epicli apply kentcdodds/epic-ai --file src/components/Button.tsx --file src/components/Input.tsx
npx epicli apply kentcdodds/epic-ai --filter "src/components/*"
npx epicli apply kentcdodds/epic-ai --ignore "*.test.ts"

The apply command:

  1. Lets you browse available Epic Stack examples interactively
  2. Gets the diff from the selected repository
  3. Creates patches to apply that example's changes to your project
  4. Generate a prompt which you can then give to your AI Assistant (like Cursor, Claude Code, Windsurf, etc.) to make it apply the patches.

update

This command updates your Epic Stack app with changes made in the Epic Stack repository.

# local path
npx epicli update ./your-epic-app
# current directory
npx epicli update .

# filter files to update
npx epicli update --file src/components/Button.tsx --file src/components/Input.tsx
npx epicli update --filter "src/components/*"
npx epicli update --ignore "*.test.ts"

The update command:

  1. Checks your package.json for the last commit hash you updated from
  2. Shows what updates are available (grouped my major changes)
  3. Creates patches to implement those changes
  4. Generate a prompt which you can then give to your AI Assistant (like Cursor, Claude Code, Windsurf, etc.) to make it apply the patches.

Note: The update command requires that your epic stack app's package.json has the epic-stack key set to the last commit hash and date of the Epic Stack repo (this is generated when you create a new app and updated when you update your app).

{
	"epic-stack": {
		"head": "b78978efc39cf9fd2ea43519a5767567c20b9991",
		"date": "2025-03-11T20:07:22Z"
	}
}

new

This command creates a new Epic Stack app.

npx epicli new my-app

This will create a new app with the name my-app in the current directory.

Limitations

The further your app diverges from the Epic Stack, the more likely you'll run into issues with these prompts.

License

MIT

About

Generate and update apps based on the Epic Stack

Resources

Stars

Watchers

Forks