Configuration
The Remodel CLI uses a .remodel JSON file at the project root to persist settings across commands. This file is created by remodel init and read by all other commands.
The .remodel File
{
"language": "typescript",
"platform": "react",
"modelsDirectory": "./src/models"
}Fields
| Field | Type | Values | Description |
|---|---|---|---|
language | string | "typescript" or "javascript" | Default language for generated files |
platform | string | "react" or "react-native" | Default platform for components |
modelsDirectory | string | relative path | Path to the models directory (relative to project root) |
How It Works
When a .remodel config exists, the CLI uses it to fill in defaults:
remodel generate model --name user— useslanguageandmodelsDirectoryfrom config, so you don’t need--tsand--dirremodel component --name UserProfile— useslanguageandplatformfrom config- Interactive mode — skips the language/platform selection steps if config provides them
You can always override config values with explicit flags:
# Config says typescript, but generate JavaScript for this one model
remodel generate model --name legacy --js --dir ./old-modelsCreating the Config
The config file is created automatically by remodel init:
remodel init --ts --platform react --dir ./src/modelsYou can also create or edit the .remodel file manually. It’s a plain JSON file.
Package Manager Detection
The init command automatically detects your package manager when installing @blue-functor/remodel. It checks for lock files in this order:
| Lock file | Package manager |
|---|---|
bun.lockb or bun.lock | bun |
pnpm-lock.yaml | pnpm |
yarn.lock | yarn |
package-lock.json | npm |
If no lock file is found, it falls back to npm.
Add .remodel to your .gitignore if you don’t want to share project settings across team members. Keep it in version control if you want consistent defaults for everyone.