module Lapis::Docs::B_LAPIS_CLI_AND_TOOLCHAIN::A_OVERVIEW

Overview

CLI Architecture & Global Options

The lapis CLI is a single, zero-dependency native executable that manages the entire lifecycle of Crystal game development in Godot.

Executive Summary & Key Topics

Topic Method / Anchor Description
Primary Command Categories .topic_00_core_commands Listing of build, testing, scaffolding, and distribution command groups.
Global Command-Line Flags .topic_01_global_flags Flags accepted by all subcommands across the lapis CLI.
Dynamic Shell Autocompletion .topic_02_shell_completion Generating autocompletion scripts for PowerShell, Bash, and Zsh.
Fuzzy Typo Auto-Correction .topic_03_typo_correction How Lapis detects misspelled commands and suggests corrections.

Related Guides & Source References

Defined in:

libgodot/docs/b_lapis_cli_and_toolchain/a_overview.cr

Class Method Summary

Class Method Detail

def self.topic_00_core_commands : Nil #

Primary Command Categories: Listing of build, testing, scaffolding, and distribution command groups.

Key Topics & Information

  • Build & Sync: build, bind, clean, sync, deps, dirs
  • Testing & Development: doctor, test, editor, run, benchmarks, setup
  • Scaffolding & Packages: new/scaffold, init, upgrade, addon, shard, ide, package, docs
  • System & Maintenance: install, uninstall, update, completion, version

def self.topic_01_global_flags : Nil #

Global Command-Line Flags: Flags accepted by all subcommands across the lapis CLI.

The lapis executable recognizes the following global flags across all subcommands:

Flag Shorthand Description
--help -h Prints detailed help and usage instructions for the current subcommand
--version -v Displays the current Lapis toolchain release version and target Godot engine
--verbose Enables verbose debug logging, process commands, and timing metrics
--quiet -q Suppresses non-essential terminal output for silent CI execution

def self.topic_02_shell_completion : Nil #

Dynamic Shell Autocompletion: Generating autocompletion scripts for PowerShell, Bash, and Zsh.

Lapis features a dynamic completion engine driven by COMMAND_DESCRIPTIONS:

PowerShell Setup:

lapis completion powershell | Out-String | Invoke-Expression
# Or add permanently to your PowerShell $PROFILE:
Add-Content $PROFILE 'lapis completion powershell | Out-String | Invoke-Expression'

Bash Setup:

eval "$(lapis completion bash)"
# Or add permanently to ~/.bashrc:
echo 'eval "$(lapis completion bash)"' >> ~/.bashrc

Zsh Setup:

eval "$(lapis completion zsh)"
# Or add permanently to ~/.zshrc:
echo 'eval "$(lapis completion zsh)"' >> ~/.zshrc

def self.topic_03_typo_correction : Nil #

Fuzzy Typo Auto-Correction: How Lapis detects misspelled commands and suggests corrections.

If you mistype a command (e.g. lapis bild instead of lapis build), Lapis computes the Levenshtein distance against known commands and provides helpful suggestions:

[Lapis:ERROR] Unknown command: 'bild'
  Did you mean 'build'?