Synopsis
Description
Initializes a ChameleonDB project by creating:.chameleon.yml- Main configuration file.chameleon/- Admin directory (config, state, journal, backups)schemas/- Directory for schema filesschemas/example.cham- Example schema to get startedREADME.md- Getting started guide
Arguments
string
Project name. Creates a new directory with this name.If omitted, initializes in the current directory.
Examples
Initialize in New Directory
Initialize in Current Directory
Created Files
.chameleon.yml
Main configuration file:schemas/example.cham
Starter schema with blog example:.chameleon/ Structure
Behavior
Already Initialized
If.chameleon.yml already exists:
Directory Creation
When creating a new project directory:- Creates
my-app/directory - Sets up all files inside
- Reports error if directory already exists with
.chameleon.yml
After Initialization
1. Set Database Connection
.chameleon.yml:
2. Edit Schema
Modifyschemas/example.cham or create new schema files:
3. Run First Migration
- Auto-initialize Schema Vault
- Register schema as v001
- Apply migration to database
- Set vault to
readonlymode (default)
4. Set Mode Password (Recommended)
readonly to standard/privileged/emergency.
Version Control
Commit to Git:- ✅
.chameleon.yml - ✅
schemas/ - ✅
README.md
The Schema Vault (
.chameleon/vault/) should generally be ignored in version control, as it’s auto-generated during migrations. However, some teams may choose to commit it for additional auditability.Troubleshooting
Permission Denied
Cannot Create Directory
Ensure parent directory exists:See Also
chameleon migrate- Apply schema migrationschameleon validate- Validate schema fileschameleon status- Check project status- Configuration Reference - Configure ChameleonDB