Skip to main content

Synopsis

Manage ChameleonDB configuration and integrity modes.

Description

The config command manages:
  • Paranoid modes - Ring-based schema governance (readonly/standard/privileged/emergency)
  • Mode passwords - Authentication for mode upgrades
  • Configuration values - Project settings

Subcommands


config get

Get a configuration value.

Synopsis

Arguments

string
required
Configuration key to retrieveCommon keys:
  • mode - Current paranoid mode
  • database.driver - Database driver
  • schema.paths - Schema file paths

Examples

Get Current Mode

Output:

Get Database Driver

Output:

config set

Set a configuration value.

Synopsis

Arguments

string
required
Configuration assignmentFormat: key=valueExample: mode=standard

Examples

Upgrade Mode (Requires Password)

Output:

Downgrade Mode (No Password)

Output:
Note: Downgrades (to more restrictive modes) don’t require a password.

config auth set-password

Set or change the mode password.

Synopsis

Examples

Set Password (First Time)

Output:

Change Password

Output:

Paranoid Modes

ChameleonDB uses Unix-style protection rings for schema governance:

Mode Descriptions

mode
Ring 3 - Production default
  • Schema modifications blocked
  • Migrations fail with error
  • Introspection disabled
  • No password needed to set (downgrade)
Use case: Production databases
mode
Ring 2 - Development mode
  • Schema changes allowed
  • Migrations validated and logged
  • Integrity checks enforced
  • Password required to upgrade from readonly
Use case: Development teams
mode
Ring 1 - DBA access
  • Direct schema changes
  • Reduced validation
  • All operations logged
  • Password required to upgrade
Use case: Database administrators
mode
Ring 0 - Emergency recovery
  • No integrity checks
  • All operations allowed
  • Full audit logging
  • Password required to upgrade
Use case: Incident recovery only

Mode Workflow

Initial Setup (After Init)

Production Deployment

Emergency Recovery

Password Management

Password Storage

Passwords are hashed and stored in:
Example:

Password Requirements

  • Minimum length: 8 characters (recommended: 12+)
  • No complexity requirements (use strong passwords)
  • Stored as bcrypt hash

Lost Password Recovery

If you lose the mode password:
  1. Option 1: Reset password hash
  2. Option 2: Use privileged access Contact DBA or use emergency access if configured.

Configuration File

Configuration is stored in .chameleon.yml:

Edit Configuration

Direct editing:
Or use config set:

Mode Enforcement

Readonly Mode Blocks

Standard Mode Allows

Troubleshooting

Wrong Password

Output:
Solution: Re-enter correct password or reset (see Lost Password Recovery).

No Password Set

Output:
Solution:

Cannot Read Config

Solution: Run from project directory with .chameleon.yml:

Security Best Practices

1. Always Set a Password

Protects against unauthorized mode upgrades.

2. Use Readonly in Production

Prevents accidental schema changes.

3. Audit Mode Changes

Track who upgraded modes and when.

4. Rotate Passwords Regularly

Change password every 90 days.

5. Document Emergency Procedures

Create runbook for mode upgrades:

See Also