fireclass
v2.1.18
Published
Unscoped npx launcher for @dharayush7/fireclass-cli: initialize Fireclass, generate typed Firestore models, and diagnose project setup.
Downloads
607
Maintainers
Readme
The fireclass package is a thin launcher for @dharayush7/fireclass-cli. It exists so project setup uses the short command:
npx fireclass initAll command behavior, generated files, diagnostics, and framework support come from the scoped CLI package. This launcher does not contain an SDK or a second CLI implementation.
Requirements
- Node.js 18 or newer.
- Next.js, React, or Express project containing package.json.
- Framework-specific Firebase setup completed before initialization.
Prepare Firebase first:
Commands
| Command | Purpose | | --- | --- | | npx fireclass init | Detect the framework and configure Fireclass | | npx fireclass model <Name> | Generate a typed model | | npx fireclass doctor | Validate local dependencies, files, exports, and decorators | | npx fireclass list | List discoverable models and collections | | npx fireclass ls | Alias for list | | npx fireclass config | Print the resolved fireclass.json | | npx fireclass --help | Print command help | | npx fireclass --version | Print the scoped CLI version |
The local binary aliases are fireclass and fc.
Initialize a project
npx fireclass initThe initializer:
- Finds the nearest project root.
- Detects Next.js, React, or Express.
- Detects npm, pnpm, Yarn, or Bun.
- Installs the matching Fireclass runtime and required peers.
- Writes fireclass.json with the public schema URL.
- Creates the app-bound Fireclass entry.
- References or creates the framework Firebase entry when applicable.
- Enables TypeScript decorator options.
- Creates a starter model.
Useful automation options:
npx fireclass init --yes --framework next --pm pnpm
npx fireclass init --yes --framework react --pm npm
npx fireclass init --yes --framework express --pm npm --skip-installExisting Firebase files are referenced and never overwritten.
Generate models
npx fireclass model User
npx fireclass model user-profile --collection user_profiles
npx fireclass model Order --dir src/entitiesGenerated models import Collection from the selected SDK and BaseModel from the app's initialized Fireclass entry.
Verify and inspect
npx fireclass doctor
npx fireclass list
npx fireclass configDoctor is read-only and exits with code 1 when a required check fails. It does not connect to Firebase or test Firestore Security Rules.
fireclass.json
Generated configuration begins with:
{
"$schema": "https://fireclass.ayushdhar.com/schema.json"
}The file contains framework, package-manager, SDK, Firebase export, Fireclass entry, and models-directory metadata. It must never contain Firebase secrets.
Scoped package equivalence
These execute the same CLI:
npx fireclass doctor
npx @dharayush7/fireclass-cli doctorInstall @dharayush7/fireclass-cli directly only when your project prefers a scoped development dependency. Use fireclass for the shortest npx workflow.
Documentation
- Complete CLI overview
- init reference
- model reference
- doctor reference
- list reference
- config reference
- fireclass.json reference
See CHANGELOG.md for version history and RELEASE_NOTES.md for the current release summary.
License
MIT. Copyright Ayush Dhar.
