Appearance
CLI
Loci provides global flags that control execution behavior and output formatting. These flags apply to any generator invocation.
Commands
loci init
Initializes a new Loci project in the current directory. Creates the loci/ directory structure and .generators.yml config file.
bash
loci initUse --global (-g) to initialize the global generators directory at ~/.loci/ instead.
bash
loci init --globalloci add
Adds a new generator with base template.
bash
loci add backend:controllerUse --global (-g) to create the generator in the global directory at ~/.loci/ instead.
bash
loci add shared:utils --globalloci generate
Executes a generator. Aliased as loci g.
bash
loci g backend:controller usersloci list
Lists all available generators discovered in local and global paths.
bash
loci listloci mcp
Starts an MCP (Model Context Protocol) server, exposing generators as tools for AI assistants.
bash
loci mcpGlobal Flags
Global flags are extracted before command dispatch and apply to all generators, including nested ones.
--dry-run
Shows what a generator would do without making any changes.
bash
loci g backend:controller users --dry-run--reverse
Runs the generator in reverse mode. Steps execute in reverse order. Helpers that support bidirectional execution perform their inverse operation.
bash
loci g backend:controller users --reverse--force
Forces file overwrites without prompting.
bash
loci g backend:controller users --force--format
Selects the output format
bash
loci g backend:controller users --format=tree--global / -g
Targets the global generators directory (~/.loci/) instead of the local project. Applies to loci init and loci add.
bash
loci add shared:utils --global--help / -h
Provides detailed usage information for commands and generators, including arguments, available options, and README content.
bash
loci init --help
loci add --help
loci g backend:controller --help