Skip to content

Latest commit

 

History

History
1214 lines (851 loc) · 25.8 KB

File metadata and controls

1214 lines (851 loc) · 25.8 KB

Command Reference for lt

This document provides a comprehensive reference for all lt CLI commands. For configuration file options, see lt.config.md.

Table of Contents


CLI Commands

lt cli create

Creates a new CLI project based on the lenne.Tech CLI starter.

Usage:

lt cli create [name] [options]

Options:

Option Description
--author <name> Author name for the CLI
--link Link CLI globally after creation
--nolink Skip linking

Configuration: commands.cli.create.author, defaults.author


lt cli rename

Renames the current CLI project.

Usage:

lt cli rename <new-name>

Server Commands

lt server create

Creates a new NestJS server project.

Usage:

lt server create [name] [options]

Options:

Option Description
--description <text> Project description
--author <name> Author name
--branch <branch> / -b Branch of nest-server-starter to use as template
--copy <path> / -c Copy from local template directory instead of cloning
--link <path> Symlink to local template directory (fastest, changes affect original)
--git Initialize git repository
--noConfirm Skip confirmation prompts

Configuration: commands.server.create.*, defaults.author, defaults.noConfirm


lt server module

Creates a new server module with model, service, controller/resolver.

Usage:

lt server module [options]

Options:

Option Description
--name <name> Module name
--controller <type> Controller type: Rest, GraphQL, Both, auto
--noConfirm Skip confirmation prompts
--skipLint Skip lint fix after creation

Configuration: commands.server.module.*, defaults.controller, defaults.skipLint, defaults.noConfirm


lt server object

Creates a new embedded object (sub-document).

Usage:

lt server object [options]

Options:

Option Description
--name <name> Object name
--skipLint Skip lint fix after creation

Configuration: commands.server.object.skipLint, defaults.skipLint


lt server permissions

Scans all server modules and generates a permissions report showing roles, restrictions, and security gaps.

Usage:

lt server permissions [options]

Options:

Option Description
--path <dir> Path to NestJS project (default: auto-detect)
--output <file> Output file (default: permissions.<format>)
--format <md|json|html> Output format (default: html for TTY, json for CI)
--open / --no-open Open report in browser (default: true for TTY)
--console Print summary to console
--fail-on-warnings Exit code 1 on warnings (for CI/CD)
--noConfirm Skip confirmation prompts

Configuration: commands.server.permissions.*, defaults.noConfirm


lt server addProp

Adds a property to an existing module or object.

Usage:

lt server addProp [options]

Options:

Option Description
--type <type> Target type: Module or Object
--element <name> Target element name
--skipLint Skip lint fix after creation

Configuration: commands.server.addProp.skipLint, defaults.skipLint


lt server create-secret

Creates a random secret key.

Usage:

lt server create-secret

lt server set-secrets

Sets secrets in environment files.

Usage:

lt server set-secrets [options]

lt server test

Runs server tests.

Usage:

lt server test

Git Commands

All git commands support the --noConfirm flag and can be configured via defaults.noConfirm or commands.git.noConfirm.

Commands with --dry-run support: create, update, clear, force-pull, reset, undo, clean, squash, rebase, rename - preview changes without executing them.

lt git create

Creates a new git branch from a base branch.

Usage:

lt git create <branch-name> [base-branch] [options]

Options:

Option Description
--base <branch> Base branch for the new branch
--noConfirm Skip confirmation prompts
--dry-run Preview what would be created without making changes

Configuration: commands.git.create.base, commands.git.baseBranch, defaults.baseBranch


lt git get

Checks out a git branch (local or remote).

Usage:

lt git get <branch-name> [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--mode hard Remove local commits automatically

Configuration: commands.git.get.*, defaults.noConfirm


lt git squash

Squashes all commits in the current branch.

Usage:

lt git squash [base-branch] [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview commits that would be squashed
--author <name> Author for the squash commit
--message <text> Commit message

Configuration: commands.git.squash.*, defaults.noConfirm, defaults.baseBranch, defaults.author


lt git rebase

Rebases the current branch onto another branch.

Usage:

lt git rebase [base-branch] [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview commits that would be rebased
--base <branch> Base branch for rebase

Configuration: commands.git.rebase.*, defaults.noConfirm, defaults.baseBranch


lt git clear

Clears all current changes (hard reset).

Usage:

lt git clear [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview what would be discarded

Configuration: commands.git.clear.noConfirm, defaults.noConfirm


lt git force-pull

Force pulls the current branch, discarding local changes.

Usage:

lt git force-pull [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview what would be lost

Configuration: commands.git.forcePull.noConfirm, defaults.noConfirm


lt git reset

Resets the current branch to match the remote.

Usage:

lt git reset [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview what would be reset

Configuration: commands.git.reset.noConfirm, defaults.noConfirm


lt git undo

Undoes the last commit (keeps files).

Usage:

lt git undo [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview the commit that would be undone

Configuration: commands.git.undo.noConfirm, defaults.noConfirm


lt git rename

Renames the current branch.

Usage:

lt git rename <new-name> [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview the rename operation
--deleteRemote Delete remote branch after rename

Configuration: commands.git.rename.noConfirm, defaults.noConfirm


lt git update

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

Usage:

lt git update [options]

Options:

Option Description
--skipInstall Skip npm install after update
--dry-run Preview incoming commits without making changes

Configuration: commands.git.update.skipInstall, defaults.skipInstall


lt git clean

Removes local merged branches.

Usage:

lt git clean [options]

Options:

Option Description
--noConfirm Skip confirmation prompts
--dry-run Preview which branches would be deleted

Configuration: commands.git.clean.noConfirm, defaults.noConfirm


lt git install-scripts

Installs bash scripts for git operations to ~/.local/bin/.

Usage:

lt git install-scripts

Installs helper scripts:

  • git-squash - Squash commits
  • git-rebase - Rebase branch
  • git-clear - Clear changes
  • git-force-pull - Force pull
  • etc.

Fullstack Commands

lt fullstack init

Creates a new fullstack workspace with API and frontend.

Usage:

lt fullstack init [options]

Options:

Option Description
--name <name> Project name
--frontend <type> Frontend framework: angular or nuxt
--api-branch <branch> Branch of nest-server-starter to use for API
--api-copy <path> Copy API from local template directory
--api-link <path> Symlink API to local template (fastest, changes affect original)
--frontend-branch <branch> Branch of frontend starter to use (ng-base-starter or nuxt-base-starter)
--frontend-copy <path> Copy frontend from local template directory
--frontend-link <path> Symlink frontend to local template (fastest, changes affect original)
--git Push initial commit to remote repository (git is always initialized)
--git-link <url> Git remote repository URL (required when --git is true)
--noConfirm Skip confirmation prompts

Note: Git is always initialized with the dev branch. The --git flag only controls whether the initial commit is pushed to a remote repository.

Note: For Nuxt frontends with --frontend-copy or --frontend-link, specify the path to the nuxt-base-template/ subdirectory, not the repository root.

Configuration: commands.fullstack.*, defaults.noConfirm


Deployment Commands

lt deployment create

Creates deployment configuration for a monorepo.

Usage:

lt deployment create [name] [options]

Options:

Option Description
--domain <domain> Main domain for the project
--gitHub Enable GitHub pipeline
--gitLab Enable GitLab pipeline
--testRunner <tag> GitLab test runner tag
--prodRunner <tag> GitLab production runner tag
--noConfirm Skip confirmation prompts

Configuration: commands.deployment.*, defaults.domain, defaults.noConfirm


NPM Commands

lt npm reinit

Reinitializes npm packages (removes node_modules and reinstalls).

Usage:

lt npm reinit [options]

Options:

Option Description
--update / -u Update package.json before reinstall
--noConfirm Skip confirmation prompts

Configuration: commands.npm.reinit.*, defaults.noConfirm


lt npm update

Updates npm packages.

Usage:

lt npm update

Frontend Commands

lt frontend angular

Creates a new Angular workspace using ng-base-starter.

Usage:

lt frontend angular [name] [options]

Options:

Option Description
--branch <branch> / -b Branch of ng-base-starter to use as template
--copy <path> / -c Copy from local template directory instead of cloning
--link <path> Symlink to local template directory (fastest, changes affect original)
--localize Enable Angular localize
--noLocalize Disable Angular localize
--gitLink <url> Git repository URL to link
--noConfirm / -y Skip confirmation prompts

Configuration: commands.frontend.angular.*, defaults.noConfirm


lt frontend nuxt

Creates a new Nuxt workspace using nuxt-base-starter.

Usage:

lt frontend nuxt [options]

Options:

Option Description
--branch <branch> / -b Branch of nuxt-base-starter to use (uses git clone instead of create-nuxt-base)
--copy <path> / -c Copy from local template directory instead of cloning
--link <path> Symlink to local template directory (fastest, changes affect original)

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

lt frontend nuxt --copy /path/to/nuxt-base-starter/nuxt-base-template

Configuration: commands.frontend.nuxt.*


Config Commands

lt config init

Creates a new lt.config file interactively.

Usage:

lt config init [options]

Options:

Option Description
--format <type> File format: json or yaml
--controller <type> Default controller type
--frontend <type> Default frontend framework
--interactive <bool> Enable/disable interactive mode
--noConfirm Skip confirmation prompts (overwrite existing)

Configuration: commands.config.init.noConfirm, defaults.noConfirm


lt config show

Displays the merged configuration for the current directory.

Usage:

lt config show

lt config help

Shows help for the configuration system.

Usage:

lt config help

lt config validate

Validates the current lt.config file.

Usage:

lt config validate

Reports syntax errors, type mismatches, and unknown keys.


Utility Commands

lt status

Shows project status and context.

Usage:

lt status

Displays:

  • Project type detection (nest-server, nuxt, angular, etc.)
  • Package information
  • Git branch and repository status
  • Configuration file status
  • Available commands for the project type

lt doctor

Diagnoses common development environment issues.

Usage:

lt doctor [options]

Options:

Option Description
--fix Attempt automatic fixes

Checks:

  • Node.js version
  • npm version
  • Git installation
  • lt CLI version and updates
  • Project configuration
  • Dependencies installation

lt history

Views and manages command history.

Usage:

lt history [count]
lt history search <pattern>
lt history clear

Arguments:

  • count - Number of recent commands to show (default: 20)
  • search <pattern> - Search history for matching commands
  • clear - Clear command history

Options:

Option Description
--noConfirm Skip confirmation when clearing

lt completion

Generates and installs shell completion scripts.

Usage:

lt completion install         # Install completions (recommended)
lt completion <bash|zsh|fish> # Output completion script

How it works:

  • Generates static completion files at install time (no runtime overhead)
  • Completions are auto-updated when CLI is installed/updated
  • Files are loaded once at shell startup

Installation:

# Automatic (recommended)
lt completion install

# Manual (if needed)
lt completion bash > ~/.local/share/lt/completions/lt.bash
lt completion zsh > ~/.local/share/lt/completions/_lt
lt completion fish > ~/.config/fish/completions/lt.fish

Completion file locations:

  • Bash: ~/.local/share/lt/completions/lt.bash
  • Zsh: ~/.local/share/lt/completions/_lt
  • Fish: ~/.config/fish/completions/lt.fish

lt templates list

Lists available templates.

Usage:

lt templates list

Shows:

  • Built-in templates
  • Custom templates (~/.lt/templates)
  • Project templates (./lt-templates)

Database Commands

lt mongodb collection-export

Exports a MongoDB collection to JSON file.

Usage:

lt mongodb collection-export [options]

Options:

Option Description
--mongoUri <uri> MongoDB connection URI
--database <name> Database name
--collection <name> Collection name
--output <path> Output file path

lt mongodb s3-restore

Restores a MongoDB database from an S3 backup.

Usage:

lt mongodb s3-restore [options]

Options:

Option Description
--bucket <name> S3 bucket name
--key <key> S3 access key ID
--secret <secret> S3 secret access key
--url <url> S3 endpoint URL
--region <region> S3 region
--folder <folder> S3 folder/prefix
--mongoUri <uri> MongoDB connection URI
--database <name> Target database name

lt qdrant stats

Shows statistics for Qdrant collections.

Usage:

lt qdrant stats

lt qdrant delete

Deletes a Qdrant collection.

Usage:

lt qdrant delete

Directus Commands

lt directus docker-setup

Sets up a local Directus Docker instance using docker-compose.

Usage:

lt directus docker-setup [options]

Options:

Option Description
--name <name> / -n Instance name (stored in ~/.lt/directus/)
--version <version> / -v Directus version (default: latest)
--database <type> / --db <type> Database type: postgres, mysql, sqlite
--port <number> / -p Port number (default: auto-detect starting from 8055)
--update Update existing instance configuration
--noConfirm Skip confirmation prompts

Configuration: commands.directus.dockerSetup.*, defaults.noConfirm

Port Auto-detection:

  • If --port is not specified, the CLI automatically finds an available port starting from 8055
  • Each instance gets its own port (8055, 8056, 8057, etc.)
  • This allows running multiple Directus instances simultaneously

Generated files:

  • ~/.lt/directus/<name>/docker-compose.yml - Container configuration
  • ~/.lt/directus/<name>/.env - Secrets and environment variables
  • ~/.lt/directus/<name>/README.md - Usage instructions

Examples:

# Create PostgreSQL instance (auto-detects port 8055)
lt directus docker-setup --name my-project --database postgres

# Create second instance (auto-detects port 8056)
lt directus docker-setup --name another-project --database mysql

# Create with specific port
lt directus docker-setup --name custom-app --database sqlite --port 9000

# Create with specific version
lt directus docker-setup --name my-app --database mysql --version 10

# Update existing instance
lt directus docker-setup --name my-project --version 11 --update

lt directus remove

Removes a Directus Docker instance and all its data.

Usage:

lt directus remove [name] [options]

Arguments:

Argument Description
name Instance name to remove (optional, will prompt if omitted)

Options:

Option Description
--noConfirm Skip confirmation prompts

Configuration: commands.directus.remove.*, defaults.noConfirm

What gets removed:

  • Stops and removes Docker containers
  • Removes all Docker volumes (database, uploads, extensions)
  • Deletes instance directory from ~/.lt/directus/

Examples:

# Interactive (shows list of instances)
lt directus remove

# Remove specific instance
lt directus remove my-project

# Skip confirmation
lt directus remove my-project --noConfirm

lt directus typegen

Generates TypeScript types from Directus collections.

Usage:

lt directus typegen [options]

Options:

Option Description
--url <url> / -u Directus API URL
--token <token> / -t Directus API token (Administrator permissions required)
--output <path> / -o Output file path
--noConfirm Skip confirmation prompts

Configuration: commands.directus.typegen.*, defaults.noConfirm

Examples:

# Interactive
lt directus typegen

# With all options
lt directus typegen --url http://localhost:8055 --token <token> --output ./types.ts

TypeScript Commands

lt typescript create

Creates a new TypeScript project.

Usage:

lt typescript create [name] [options]

Options:

Option Description
--author <name> Author name
--noConfirm Skip confirmation prompts
--updatePackages Update packages to latest versions

Configuration: commands.typescript.create.*, defaults.author, defaults.noConfirm


lt typescript playground

Opens TypeScript playground.

Usage:

lt typescript playground

Starter Commands

lt starter chrome-extension

Creates a Chrome extension project.

Usage:

lt starter chrome-extension [name]

Claude Commands

lt claude plugins

Installs and manages Claude Code plugins from multiple marketplaces.

Usage:

lt claude plugins [plugin-name] [options]

Parameters:

Parameter Description
plugin-name Optional. Name of a specific plugin to install

Options:

Option Description
--list List available plugins from all marketplaces
--uninstall Uninstall a plugin

Plugin Sources:

Default Behavior: When run without a plugin name, all lenne.Tech plugins plus recommended external plugins (like typescript-lsp) are installed automatically.

Examples:

# Install all recommended plugins (lenne.Tech + recommended external)
lt claude plugins

# Install a specific plugin
lt claude plugins typescript-lsp

# List available plugins
lt claude plugins --list

# Uninstall a plugin
lt claude plugins lt-dev --uninstall

lt claude shortcuts

Installs Claude Code shell shortcuts (aliases) for quick access to common commands.

Usage:

lt claude shortcuts

Alias: lt claude s

Shortcuts installed:

Alias Command Description
c claude --dangerously-skip-permissions Start new Claude Code session
cc claude --dangerously-skip-permissions --continue Continue last session
cr claude --dangerously-skip-permissions --resume Select and resume previous session

Note: These shortcuts use --dangerously-skip-permissions which enables autonomous operation by bypassing permission prompts. Ensure you have proper data backups before using them.

Examples:

# Install shortcuts to ~/.zshrc (or detected shell config)
lt claude shortcuts

# After installation, use:
c        # Start new session
cc       # Continue last session
cr       # Resume a previous session

Blocks & Components

lt blocks add

Adds code blocks to your project from the lenne.tech component library.

Usage:

lt blocks add [block-name] [options]

Options:

Option Description
--noConfirm Skip confirmation prompts (auto-install dependencies)

Configuration: commands.blocks.add.noConfirm, defaults.noConfirm


lt components add

Adds components to your project from the lenne.tech component library.

Usage:

lt components add [component-name] [options]

Options:

Option Description
--noConfirm Skip confirmation prompts (auto-install dependencies)

Configuration: commands.components.add.noConfirm, defaults.noConfirm


Template Commands

lt templates llm

Gets LLM prompt templates.

Usage:

lt templates llm [prompt-name] [options]

Options:

Option Description
--output <path> / -o Save to file
--clipboard / -c Copy to clipboard
--display / -d Display in terminal

Other Commands

lt update

Updates the lt CLI to the latest version.

Usage:

lt update

lt docs open

Opens documentation in the browser.

Usage:

lt docs open [doc]

Arguments:

  • lenne.Tech - lenne.Tech documentation
  • NestJS - NestJS documentation
  • GlueGun - GlueGun documentation

lt tools crypt

Generates a password hash.

Usage:

lt tools crypt [password]

lt tools sha256

Generates a SHA256 hash.

Usage:

lt tools sha256 [text]

lt tools jwt-read

Reads and decodes a JWT token.

Usage:

lt tools jwt-read [token]

lt tools regex

Tests regular expressions.

Usage:

lt tools regex [pattern] [text]

Configuration Priority

All configurable commands follow this priority order (highest to lowest):

  1. CLI parameters (e.g., --noConfirm)
  2. Command-specific config (e.g., commands.git.get.noConfirm)
  3. Category-level config (e.g., commands.git.noConfirm)
  4. Global defaults (e.g., defaults.noConfirm)
  5. Code defaults
  6. Interactive user input (only if no value determined from above)

For detailed configuration options, see lt.config.md.