lt.config - Configuration File Documentation

April 21, 2026 · View on GitHub

The lt.config file allows you to configure default settings for the lenne.tech CLI (lt). This reduces repetitive input and ensures consistent project settings across your team.

Table of Contents

File Formats

The CLI supports three configuration file formats (in priority order):

FileFormatDescription
lt.config.jsonJSONExplicit JSON format (recommended)
lt.config.yamlYAMLExplicit YAML format
lt.configAuto-detectTries JSON first, then YAML

Creating a Configuration File

Use the CLI to create a configuration file interactively:

lt config init

Or non-interactively:

lt config init --format yaml --controller Both --frontend nuxt

File Location & Hierarchy

Configuration files are searched from the current directory up to the root (/). All found configurations are merged hierarchically, with closer configs taking precedence.

Priority Order (lowest to highest)

  1. Code default values
  2. Global defaults (from defaults section)
  3. Config from parent directories (higher up = lower priority)
  4. Config from current directory (commands section)
  5. CLI parameters
  6. Interactive user input

Example: Monorepo Structure

$HOME/
├── lt.config.json          # Global defaults
└── projects/
    └── my-monorepo/
        ├── lt.config.json  # Monorepo defaults
        └── projects/
            ├── api/
            │   └── lt.config.json  # API-specific settings
            └── app/
                └── lt.config.yaml  # App-specific settings

When running lt server module in $HOME/projects/my-monorepo/projects/api/:

  1. $HOME/lt.config.json is loaded first
  2. $HOME/projects/my-monorepo/lt.config.json is merged (overrides parent)
  3. $HOME/projects/my-monorepo/projects/api/lt.config.json is merged (overrides all)

Configuration Structure

interface LtConfig {
  defaults?: DefaultsConfig;   // Global defaults for multiple commands
  commands?: {
    blocks?: BlocksConfig;
    cli?: CliConfig;
    components?: ComponentsConfig;
    config?: ConfigConfig;
    deployment?: DeploymentConfig;
    fullstack?: FullstackConfig;
    git?: GitConfig;
    npm?: NpmConfig;
    server?: ServerConfig;
  };
  meta?: MetaConfig;
}

Global Defaults Reference

The defaults section contains settings that apply across multiple commands. These are overridden by command-specific settings in the commands section.

FieldTypeDefaultUsed By
defaults.apiMode'Rest' | 'GraphQL' | 'Both''Rest'server/create, fullstack/init
defaults.authorstring-git/squash, server/create, cli/create
defaults.baseBranchstring-git/create, git/squash, git/rebase
defaults.controller'Rest' | 'GraphQL' | 'Both' | 'auto''Both'server/module, server/create
defaults.domainstring-deployment/create (use {name} as placeholder)
defaults.noConfirmbooleanfalseblocks/add, components/add, config/init, git/*, server/create, server/module, npm/reinit, cli/create, typescript/create, fullstack/init, deployment/create, frontend/angular
defaults.packageManager'npm' | 'pnpm' | 'yarn''npm'Fallback when no lockfile is found. Auto-detection from lockfiles takes precedence. Used by: all commands that run package manager operations
defaults.skipInstallbooleanfalsegit/update
defaults.skipLintbooleanfalseserver/module, server/object, server/addProp

Example:

{
  "defaults": {
    "apiMode": "Rest",
    "author": "lenne.Tech Team <info@lenne.tech>",
    "baseBranch": "develop",
    "controller": "Both",
    "domain": "{name}.lenne.tech",
    "noConfirm": false,
    "packageManager": "npm",
    "skipInstall": false,
    "skipLint": false
  }
}

YAML Example:

defaults:
  apiMode: Rest
  author: "lenne.Tech Team <info@lenne.tech>"
  baseBranch: develop
  controller: Both
  domain: "{name}.lenne.tech"
  noConfirm: false
  packageManager: npm
  skipInstall: false
  skipLint: false

Package Manager Detection

The CLI automatically detects the package manager for your project. The detection order is:

  1. Lockfile in current directory: pnpm-lock.yaml -> pnpm, yarn.lock -> yarn, package-lock.json -> npm
  2. packageManager field in package.json (Corepack standard): e.g., "packageManager": "pnpm@8.15.0"
  3. Lockfile in parent directories (monorepo support)
  4. Config fallback: defaults.packageManager from lt.config
  5. Default: npm

This means all CLI commands (lt server create, lt fullstack init, lt npm reinit, etc.) will use the correct package manager automatically without any configuration needed.

Global vs Command-Specific Settings

Global defaults provide a convenient way to set organization-wide preferences. Command-specific settings override these when you need different behavior for a particular command.

Example: You want skipLint: true globally, but skipLint: false specifically for server/module:

{
  "defaults": {
    "skipLint": true
  },
  "commands": {
    "server": {
      "module": {
        "skipLint": false
      }
    }
  }
}

Commands Reference

Blocks Commands

lt blocks add

Adds code blocks from the lenne.tech component library.

FieldTypeDefaultDescription
commands.blocks.add.noConfirmbooleanfalseSkip confirmation prompts (auto-install dependencies)

Example:

{
  "commands": {
    "blocks": {
      "add": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt blocks add MyBlock --noConfirm

Components Commands

lt components add

Adds components from the lenne.tech component library.

FieldTypeDefaultDescription
commands.components.add.noConfirmbooleanfalseSkip confirmation prompts (auto-install dependencies)

Example:

{
  "commands": {
    "components": {
      "add": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt components add MyComponent --noConfirm

Config Commands

lt config init

Initializes a new lt.config file.

FieldTypeDefaultDescription
commands.config.init.noConfirmbooleanfalseSkip confirmation prompts (overwrite existing config)

Example:

{
  "commands": {
    "config": {
      "init": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt config init --noConfirm

CLI Commands

lt cli create

Creates a new CLI project.

FieldTypeDefaultDescription
commands.cli.create.authorstring-Default author for new CLI projects

Example:

{
  "commands": {
    "cli": {
      "create": {
        "author": "lenne.Tech Team <info@lenne.tech>"
      }
    }
  }
}

CLI Override:

lt cli create --author "John Doe <john@example.com>"

Server Commands

lt server module

Creates a new server module with controller and resolver.

FieldTypeDefaultDescription
commands.server.module.controller'Rest' | 'GraphQL' | 'Both' | 'auto''Both'Default controller type. 'auto' detects from existing modules.
commands.server.module.skipLintbooleanfalseSkip lint fix after module creation

Example:

{
  "commands": {
    "server": {
      "module": {
        "controller": "auto",
        "skipLint": false
      }
    }
  }
}

CLI Override:

lt server module --name MyModule --controller GraphQL --skipLint

lt server object

Creates a new server object (embedded document).

FieldTypeDefaultDescription
commands.server.object.skipLintbooleanfalseSkip lint fix after object creation

Example:

{
  "commands": {
    "server": {
      "object": {
        "skipLint": false
      }
    }
  }
}

lt server permissions

Scans server modules and generates a permissions report.

FieldTypeDefaultDescription
commands.server.permissions.format'md' | 'json' | 'html''html' (TTY) / 'json' (CI)Output format
commands.server.permissions.outputstringpermissions.<format>Output file path
commands.server.permissions.pathstringauto-detectPath to NestJS project
commands.server.permissions.openbooleantrue (TTY) / false (CI)Open report in browser
commands.server.permissions.consolebooleanfalsePrint summary to console
commands.server.permissions.failOnWarningsbooleanfalseExit code 1 on warnings
commands.server.permissions.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "server": {
      "permissions": {
        "format": "html",
        "open": true,
        "failOnWarnings": true
      }
    }
  }
}

lt server addProp

Adds a property to an existing module or object.

FieldTypeDefaultDescription
commands.server.addProp.skipLintbooleanfalseSkip lint fix after adding property

Example:

{
  "commands": {
    "server": {
      "addProp": {
        "skipLint": true
      }
    }
  }
}

lt server create

Creates a new server project.

FieldTypeDefaultDescription
commands.server.create.apiMode'Rest' | 'GraphQL' | 'Both''Rest'API mode for the server project. Determines which API endpoints (REST/GraphQL) are included.
commands.server.create.authorstring-Default author for new projects
commands.server.create.branchstring-Branch of nest-server-starter to use as template
commands.server.create.controller'Rest' | 'GraphQL' | 'Both' | 'auto''Both'Default controller type for new projects
commands.server.create.copystring-Path to local template directory to copy instead of cloning
commands.server.create.descriptionstring-Default description (use {name} as placeholder)
commands.server.create.gitboolean-Initialize git repository
commands.server.create.linkstring-Path to local template directory to symlink (fastest, changes affect original)
commands.server.create.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "server": {
      "create": {
        "controller": "Both",
        "git": true,
        "author": "lenne.Tech Team <info@lenne.tech>",
        "description": "{name} Server",
        "branch": "feature/new-auth",
        "copy": "/path/to/local/nest-server-starter"
      }
    }
  }
}

CLI Override:

lt server create --name MyServer --api-mode Rest --git true --author "John Doe" --description "My Server"
lt server create --name MyServer --api-mode GraphQL --branch feature/new-auth
lt server create --copy /path/to/local/nest-server-starter
lt server create --link /path/to/local/nest-server-starter  # Fastest, but changes affect original

Deployment Commands

lt deployment create

Creates deployment configuration for a mono repository.

FieldTypeDefaultDescription
commands.deployment.domainstring-Default domain (use {name} as placeholder)
commands.deployment.gitHubboolean-Enable GitHub pipeline by default
commands.deployment.gitLabboolean-Enable GitLab pipeline by default
commands.deployment.testRunnerstring'docker-swarm'Default GitLab test runner tag
commands.deployment.prodRunnerstring'docker-landing'Default GitLab production runner tag

Example:

{
  "commands": {
    "deployment": {
      "domain": "{name}.lenne.tech",
      "gitHub": false,
      "gitLab": true,
      "testRunner": "docker-swarm",
      "prodRunner": "docker-landing"
    }
  }
}

CLI Override:

lt deployment create --domain myproject.example.com --gitLab true --testRunner docker-swarm

Frontend Commands

lt frontend angular

Creates a new Angular frontend project using ng-base-starter.

FieldTypeDefaultDescription
commands.frontend.angular.branchstring-Branch of ng-base-starter to use as template
commands.frontend.angular.copystring-Path to local template directory to copy instead of cloning
commands.frontend.angular.linkstring-Path to local template directory to symlink (fastest, changes affect original)
commands.frontend.angular.localizeboolean-Enable Angular localize by default
commands.frontend.angular.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "frontend": {
      "angular": {
        "branch": "feature/new-design",
        "localize": true,
        "copy": "/path/to/local/ng-base-starter"
      }
    }
  }
}

CLI Override:

lt frontend angular --branch feature/new-design
lt frontend angular --copy /path/to/local/ng-base-starter
lt frontend angular --link /path/to/local/ng-base-starter  # Fastest, changes affect original

lt frontend nuxt

Creates a new Nuxt frontend project using nuxt-base-starter.

FieldTypeDefaultDescription
commands.frontend.nuxt.branchstring-Branch of nuxt-base-starter to use. When specified, uses git clone instead of create-nuxt-base
commands.frontend.nuxt.copystring-Path to the nuxt-base-template/ subdirectory to copy
commands.frontend.nuxt.linkstring-Path to the nuxt-base-template/ subdirectory to symlink (fastest, changes affect original)

Note: For copy and link, specify the path to the nuxt-base-template/ subdirectory within the nuxt-base-starter repository, not the repository root.

Example:

{
  "commands": {
    "frontend": {
      "nuxt": {
        "branch": "feature/new-design",
        "copy": "/path/to/nuxt-base-starter/nuxt-base-template"
      }
    }
  }
}

CLI Override:

lt frontend nuxt --branch feature/new-design
lt frontend nuxt --copy /path/to/nuxt-base-starter/nuxt-base-template
lt frontend nuxt --link /path/to/nuxt-base-starter/nuxt-base-template  # Fastest, changes affect original

Fullstack Commands

lt fullstack init

Creates a new fullstack workspace with API and frontend.

FieldTypeDefaultDescription
commands.fullstack.apiMode'Rest' | 'GraphQL' | 'Both''Rest'API mode for the server project
commands.fullstack.apiBranchstring-Branch of nest-server-starter to use for API
commands.fullstack.apiCopystring-Path to local API template directory to copy instead of cloning
commands.fullstack.apiLinkstring-Path to local API template directory to symlink (fastest, changes affect original)
commands.fullstack.frontend'angular' | 'nuxt'-Default frontend framework
commands.fullstack.frontendBranchstring-Branch of frontend starter to use (ng-base-starter or nuxt-base-starter)
commands.fullstack.frontendCopystring-Path to local frontend template directory to copy instead of cloning
commands.fullstack.frontendLinkstring-Path to local frontend template directory to symlink (fastest, changes affect original)
commands.fullstack.frameworkMode'npm' | 'vendor''npm'Backend framework consumption mode (npm dependency vs. vendored core in src/core/)
commands.fullstack.frontendFrameworkMode'npm' | 'vendor''npm'Frontend framework consumption mode (npm dependency vs. vendored module in app/core/)
commands.fullstack.gitboolean-Push initial commit to remote repository (git is always initialized with dev branch)
commands.fullstack.gitLinkstring-Git remote repository URL (required when git is true)

Example:

{
  "commands": {
    "fullstack": {
      "frontend": "nuxt",
      "git": true,
      "gitLink": "https://github.com/myorg/myproject.git",
      "apiBranch": "feature/new-auth",
      "frontendBranch": "feature/new-design",
      "apiCopy": "/path/to/local/nest-server-starter",
      "frontendCopy": "/path/to/local/nuxt-base-starter"
    }
  }
}

CLI Override:

lt fullstack init --name MyProject --api-mode Rest --frontend nuxt
lt fullstack init --name MyProject --api-mode GraphQL --frontend angular --git true --git-link https://...
lt fullstack init --api-copy /path/to/api --frontend-copy /path/to/frontend
lt fullstack init --api-link /path/to/api --frontend-link /path/to/frontend  # Fastest, changes affect original

Git Commands

lt git create

Creates a new branch.

FieldTypeDefaultDescription
commands.git.create.basestring-Default base branch for new branches (command-specific)
commands.git.create.noConfirmbooleanfalseSkip confirmation prompts
commands.git.baseBranchstring-Default base branch (category-level fallback)
commands.git.noConfirmbooleanfalseSkip confirmation prompts (category-level)

Example:

{
  "commands": {
    "git": {
      "baseBranch": "develop",
      "create": {
        "base": "develop",
        "noConfirm": false
      }
    }
  }
}

CLI Override:

lt git create feature/my-feature --base develop

lt git get

Checks out a git branch.

FieldTypeDefaultDescription
commands.git.get.noConfirmbooleanfalseSkip confirmation prompts
commands.git.get.mode'hard'-Default mode for handling local commits ('hard' removes them)

Example:

{
  "commands": {
    "git": {
      "get": {
        "noConfirm": true,
        "mode": "hard"
      }
    }
  }
}

CLI Override:

lt git get feature/my-feature --noConfirm --mode hard

lt git squash

Squashes commits in a branch.

FieldTypeDefaultDescription
commands.git.squash.noConfirmbooleanfalseSkip confirmation prompts
commands.git.squash.basestring'dev'Default base branch for squash
commands.git.squash.authorstring-Default author for squash commits

Example:

{
  "commands": {
    "git": {
      "squash": {
        "noConfirm": false,
        "base": "develop",
        "author": "Team <team@lenne.tech>"
      }
    }
  }
}

CLI Override:

lt git squash develop --author "John Doe <john@example.com>" --noConfirm

lt git clear

Clears current changes (hard reset).

FieldTypeDefaultDescription
commands.git.clear.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "git": {
      "clear": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt git clear --noConfirm

lt git force-pull

Force pulls branch (loses local changes).

FieldTypeDefaultDescription
commands.git.forcePull.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "git": {
      "forcePull": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt git force-pull --noConfirm

lt git rebase

Rebases current branch onto another branch.

FieldTypeDefaultDescription
commands.git.rebase.noConfirmbooleanfalseSkip confirmation prompts
commands.git.rebase.basestring-Default base branch for rebase

Example:

{
  "commands": {
    "git": {
      "rebase": {
        "noConfirm": false,
        "base": "develop"
      }
    }
  }
}

CLI Override:

lt git rebase --base develop --noConfirm

lt git reset

Resets current branch to remote state.

FieldTypeDefaultDescription
commands.git.reset.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "git": {
      "reset": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt git reset --noConfirm

lt git undo

Undoes last commit (without losing files).

FieldTypeDefaultDescription
commands.git.undo.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "git": {
      "undo": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt git undo --noConfirm

lt git rename

Renames current branch.

FieldTypeDefaultDescription
commands.git.rename.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "git": {
      "rename": {
        "noConfirm": true
      }
    }
  }
}

CLI Override:

lt git rename new-name --noConfirm

lt git update

Updates current branch (fetch + pull + npm install).

FieldTypeDefaultDescription
commands.git.update.skipInstallbooleanfalseSkip npm install after update

Example:

{
  "commands": {
    "git": {
      "update": {
        "skipInstall": true
      }
    }
  }
}

CLI Override:

lt git update --skipInstall

NPM Commands

lt npm reinit

Reinitializes npm packages.

FieldTypeDefaultDescription
commands.npm.reinit.updatebooleanfalseUpdate package.json before reinitializing
commands.npm.reinit.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "npm": {
      "reinit": {
        "update": true,
        "noConfirm": false
      }
    }
  }
}

lt tools crawl

Crawls a website into Markdown files (knowledge base builder).

FieldTypeDefaultDescription
commands.tools.crawl.outstring.Output directory
commands.tools.crawl.depthnumber | "all"0Link depth (0 = only start page, 1 = direct links, ..., "all" or -1 = follow every same-origin link, bounded by maxPages)
commands.tools.crawl.includeImagesbooleantrueDownload images and inline with local paths
commands.tools.crawl.includeSitemapbooleantrueAlso seed queue from <origin>/sitemap.xml
commands.tools.crawl.concurrencynumber4Parallel HTTP requests
commands.tools.crawl.maxPagesnumber200Safety cap on total pages
commands.tools.crawl.selectorstringCSS selector for main content
commands.tools.crawl.timeoutnumber20000HTTP request timeout in ms
commands.tools.crawl.renderJsbooleantrueRender pages through a headless browser (for SPAs). Uses playwright-core. Set to false for plain HTTP.
commands.tools.crawl.prunebooleantrueRemove orphaned .md / image files after a multi-page crawl (update-in-place). Set to false to preserve old files.
commands.tools.crawl.noConfirmbooleanfalseSkip confirmation prompts

Example:

{
  "commands": {
    "tools": {
      "crawl": {
        "out": "./knowledge",
        "depth": 2,
        "includeImages": true,
        "includeSitemap": true,
        "concurrency": 4,
        "maxPages": 200,
        "noConfirm": true
      }
    }
  }
}

Metadata

The meta section stores project information.

FieldTypeDescription
meta.namestringProject name
meta.descriptionstringProject description
meta.versionstringConfiguration version
meta.tagsstring[]Tags for categorization

Example:

{
  "meta": {
    "name": "my-project",
    "description": "My awesome project",
    "version": "1.0.0",
    "tags": ["api", "nuxt", "monorepo"]
  }
}

Examples

Complete JSON Example

{
  "defaults": {
    "author": "lenne.Tech Team <info@lenne.tech>",
    "baseBranch": "develop",
    "controller": "Both",
    "domain": "{name}.lenne.tech",
    "noConfirm": false,
    "packageManager": "npm",
    "skipInstall": false,
    "skipLint": false
  },
  "commands": {
    "deployment": {
      "gitHub": false,
      "gitLab": true,
      "testRunner": "docker-swarm",
      "prodRunner": "docker-landing"
    },
    "fullstack": {
      "frontend": "nuxt",
      "git": false,
      "gitLink": "https://github.com/myorg/myproject.git"
    },
    "git": {
      "defaultBranch": "develop",
      "get": {
        "mode": "hard"
      }
    },
    "npm": {
      "reinit": {
        "update": true
      }
    },
    "server": {
      "module": {
        "controller": "auto"
      }
    }
  },
  "meta": {
    "name": "my-monorepo",
    "version": "1.0.0"
  }
}

Complete YAML Example

defaults:
  author: "lenne.Tech Team <info@lenne.tech>"
  baseBranch: develop
  controller: Both
  domain: "{name}.lenne.tech"
  noConfirm: false
  packageManager: npm
  skipInstall: false
  skipLint: false

commands:
  deployment:
    gitHub: false
    gitLab: true
    testRunner: docker-swarm
    prodRunner: docker-landing

  fullstack:
    frontend: nuxt
    git: false
    gitLink: "https://github.com/myorg/myproject.git"

  git:
    defaultBranch: develop
    baseBranch: develop
    get:
      noConfirm: false
      mode: hard
    squash:
      base: develop

  npm:
    reinit:
      update: true
      noConfirm: false

  server:
    addProp:
      skipLint: false
    create:
      controller: Both
      git: true
      author: "lenne.Tech Team <info@lenne.tech>"
    module:
      controller: auto
      skipLint: false
    object:
      skipLint: false

meta:
  name: my-monorepo
  version: "1.0.0"

Minimal Example (API Project)

{
  "commands": {
    "server": {
      "module": {
        "controller": "GraphQL"
      }
    }
  }
}

Advanced Features

Null Values (Reset to Default)

Set a value to null to remove it from parent configurations and use the default:

Parent config ($HOME/lt.config.json):

{
  "commands": {
    "server": {
      "module": {
        "controller": "Rest"
      }
    }
  }
}

Child config ($HOME/project/lt.config.json):

{
  "commands": {
    "server": {
      "module": {
        "controller": null
      }
    }
  }
}

Result: controller will be unset, and the CLI will use its default (Both) or ask interactively.

YAML null syntax:

commands:
  server:
    module:
      controller: ~  # or 'null'

Array Handling

Arrays are completely replaced, not merged:

Parent:

{
  "meta": {
    "tags": ["api", "backend"]
  }
}

Child:

{
  "meta": {
    "tags": ["frontend"]
  }
}

Result:

{
  "meta": {
    "tags": ["frontend"]
  }
}

Viewing Effective Configuration

To see the merged configuration for the current directory:

lt config show

Best Practices

  1. Use JSON for explicit configs - Better IDE support and validation
  2. Place shared settings in parent directories - E.g., monorepo root
  3. Override only what's needed - Child configs only need to specify differences
  4. Use auto for controller detection - Let the CLI detect patterns from existing code
  5. Commit lt.config to version control - Share settings with your team

Troubleshooting

Config not being applied

  1. Check file name spelling: lt.config.json (not lt-config.json)
  2. Verify JSON/YAML syntax is valid
  3. Run lt config show to see the effective configuration
  4. Check if CLI parameter is overriding the config

Invalid JSON/YAML warnings

The CLI will show warnings for invalid config files but continue with valid ones:

Warning: Could not parse config file /path/to/lt.config.json

Fix the JSON/YAML syntax or remove the invalid file.