Laizy CMS
CLI

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 setting

Commands

config (default)

Shows all configuration values. API tokens are partially masked for security.

pnpm laizy config
Laizy 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/.laizyrc

config 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.laizy

If 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, outputPath

API tokens are always masked when displayed:

pnpm laizy config get apiToken
# apiToken: laizy_ey...abcd

config set

Update a specific configuration value.

pnpm laizy config set baseUrl https://laizycms.com
Configuration updated
baseUrl: http://localhost:3000 -> https://laizycms.com

Tip: You can now run commands against the new server endpoint

Configuration Keys

KeyDescriptionDefault
baseUrlLaizy CMS API base URLhttp://localhost:3000
organizationIdYour organization IDSet during laizy init
apiTokenJWT API token for authenticationSet during laizy init
schemaPathPath to your .laizy schema file./laizy/schema.laizy
outputPathDirectory 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.laizy

All 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/cms

The 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:3000

When 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.

FileScopeContains
~/.laizyrcGlobal (home directory)API token, base URL, paths
.laizy/project.jsonPer-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

On this page