laizy config
View and manage CLI configuration settings stored in the ~/.laizyrc file.
laizy config
The config command lets you view and modify CLI configuration settings. All configuration is stored in ~/.laizyrc as a JSON file.
Usage
pnpm laizy config # Show all configuration
pnpm laizy config get # Show all configuration
pnpm laizy config get baseUrl # Show a specific setting
pnpm laizy config set baseUrl https://laizycms.com # Update a settingCommands
config (default)
Shows all configuration values. API tokens are partially masked for security.
pnpm laizy configLaizy CMS Configuration
Current configuration:
Base URL: http://localhost:3000
Organization ID: org_abc123
API Token: laizy_eyJhbGciOiJI...
Schema Path: ./laizy/schema.laizy
Output Path: ./generated/laizy
Config file location: /Users/you/.laizyrcconfig get
View all settings or a specific setting by key.
# View all settings
pnpm laizy config get
# View a specific setting
pnpm laizy config get baseUrl
# baseUrl: http://localhost:3000
pnpm laizy config get schemaPath
# schemaPath: ./laizy/schema.laizyIf you request a key that does not exist, the CLI shows available keys:
pnpm laizy config get foo
# Configuration key 'foo' not found
# Available keys: baseUrl, organizationId, apiToken, schemaPath, outputPathAPI tokens are always masked when displayed:
pnpm laizy config get apiToken
# apiToken: laizy_ey...abcdconfig set
Update a specific configuration value.
pnpm laizy config set baseUrl https://laizycms.comConfiguration updated
baseUrl: http://localhost:3000 -> https://laizycms.com
Tip: You can now run commands against the new server endpointConfiguration Keys
| Key | Description | Default |
|---|---|---|
baseUrl | Laizy CMS API base URL | http://localhost:3000 |
organizationId | Your organization ID | Set during laizy init |
apiToken | JWT API token for authentication | Set during laizy init |
schemaPath | Path to your .laizy schema file | ./laizy/schema.laizy |
outputPath | Directory for generated TypeScript client | ./generated/laizy |
The .laizyrc File
Configuration is stored as JSON in ~/.laizyrc in your home directory:
{
"baseUrl": "http://localhost:3000",
"apiToken": "laizy_eyJhbGciOiJIUzI1NiIs...",
"organizationId": "org_abc123",
"schemaPath": "./laizy/schema.laizy",
"outputPath": "./generated/laizy"
}This file is created by laizy init and shared across all projects. Since it lives in your home directory (~), it is never committed to version control.
The .laizyrc file contains your API token, which has full admin access. Do not share this file or commit it to version control. If you suspect a token has been compromised, generate a new one from the dashboard at /dashboard/developer.
Changing Schema Path
If you want to store your schema file in a different location:
pnpm laizy config set schemaPath ./content/models.laizyAll commands that read the schema (sync, generate, content create, content list) will use this path.
Changing Output Directory
To generate the TypeScript client into a different directory:
pnpm laizy config set outputPath ./src/generated/cmsThe generate command will create types.ts, client.ts, and index.ts in this directory.
Switching Environments
Use config set to switch between development and production:
# Switch to production
pnpm laizy config set baseUrl https://laizycms.com
# Switch back to local development
pnpm laizy config set baseUrl http://localhost:3000When switching environments, you may also need to update your API token. Tokens are scoped to a specific environment and may not work across different deployments.
Relationship to Project Context
The ~/.laizyrc file stores global configuration shared across all projects. Project-specific context (which project you are working on) is stored separately in .laizy/project.json within each project directory.
| File | Scope | Contains |
|---|---|---|
~/.laizyrc | Global (home directory) | API token, base URL, paths |
.laizy/project.json | Per-project (repo root) | Project ID, slug, name |
This separation means you can work on multiple projects using the same API credentials and configuration, with each directory linked to a different project.
Next Steps
- Init Command -- Set up configuration from scratch
- CLI Reference -- Overview of all CLI commands
- Authentication -- Token types and scopes