create-fynapp
v1.1.3
Published
CLI tool to create new FynApp micro frontends
Readme
FynApp CLI Tools
create-fynapp provides two commands:
create-fynappcreates a React FynApp in the current directory.cfabuilds and checks an existing FynApp or installs the bundled coding-agent skills.
Installation
Install the released commands globally with fyn:
fyn global add create-fynappIf the commands are not on PATH, run fyn global setup-path and follow its
shell instructions.
To work on this package in the FynMesh monorepo:
cd dev-tools/create-fynapp
fyn install
fyn run buildCreate a FynApp
The app is created in the directory you run the command from. At the root of
the FynMesh monorepo it is created under demo/ instead, which is where that
repository keeps its FynApps.
create-fynapp --name my-app --framework reactThe release scaffold supports React. Other framework demos and low-level build configuration exist in FynMesh, but their generator templates are roadmap work.
Options:
--name, -n <string>: package and federation name.--framework, -f <string>:react.--dir, -d <string>: directory to create (defaults to the name).--skip-install: create files without runningfyn install.
The command creates package.json, tsconfig.json, rollup.config.ts, and
starter source files. Register a new demo app separately as described in
agent/GUIDE.md.
Work with an existing FynApp
Run cfa from the FynApp directory, or pass --dir.
Build
cfa build
cfa build --watch
cfa build --dir demo/my-appOptions:
--dir, -d <string>: target directory (defaults to the current directory).--watch, -w: rebuild when source files change.--minify, -m: enable minified output.
Check build output
cfa check
cfa check --no-buildcfa check builds with the local Rollup binary, then checks for
dist/fynapp-entry.js and a parseable dist/fynapp.manifest.json with the
required identity and ./main expose. --no-build checks an existing
dist/.
What a build emits
dist/ gets JSON as well as JavaScript, and the files are not interchangeable:
fynapp.manifest.json— this FynApp's public contract: identity,exposes,consume-shared/provide-shared,import-exposed,shared-providers. Other FynApps' builds read it off disk to discover who provides their shared modules, so build order matters — a dependency built after its consumer leaves the consumer'sshared-providersempty.__FYNAPP_MANIFEST__insidefynapp-entry.js— the same manifest embedded in the entry, which is how the kernel reads it without an extra request. Middleware registration depends on it and has no fallback.federation.json— build plumbing: expose-to-chunk mapping and share config. Optional; nothing at runtime needs it.federation.bundles.json— only when the build's chunks were combined into one file: the map of which file carries which module, which a host reads to preload the file that will really be fetched.__collected_shares.json— debug output. Nothing reads it.
Full reference, including every consumer: notes/BUILD-ARTIFACTS.md.
Install coding-agent skills
cfa install-skills
cfa install-skills --dir path/to/project
cfa install-skills --forceThis opt-in command copies the bundled fynapp-modify and
fynapp-migrate-kernel skills into <project>/.claude/skills/.
Authoring references
Development checks
fyn run build
fyn run jest-testLicense
Apache-2.0
