CLI
CLI Overview
create-fedi-app CLI scaffolds a Next.js Fedi mini app from templates with interactive prompts and automatic dependency installation.
The CLI is a Node.js binary published as create-fedi-app. It uses @clack/prompts for interactive selection and copies files from templates/base/ plus selected modules from templates/modules/.
Invocation
npx create-fedi-app@latest
# or
npx create-fedi-app@latest --version| Flag | Description |
|---|---|
-v, --version | Print CLI version and exit |
Non-interactive flags are not yet supported — all options go through prompts.
What the CLI does
- Prompt — collect project name, database, modules, AI rules, AI provider (conditional), package manager
- Validate — reject existing directories, enforce kebab-case project names
- Scaffold — copy base template, replace
{{PROJECT_NAME}}and{{PACKAGE_MANAGER}}placeholders - Apply modules — merge always-on modules, then each selected optional module per
module.jsonmanifest - Generate
.env.local— from.env.examplewith module-specific variables - Install — run
bun install,pnpm install, ornpm install - Print next steps — cd, env setup, dev command, Fedi testing instructions
Always-on modules
These apply to every project regardless of selection:
webln-paymentsnostr-identityecash-balance
Merge strategies
Each file in a module manifest declares how it merges into the generated project:
| Strategy | Behavior |
|---|---|
add | Copy only if destination does not exist |
replace | Always overwrite destination |
append | Append source contents to end of existing file |
See also
- CLI options — every prompt and validation rule
- Module selection — optional modules and dependencies