LibraLibra
LibraLibra
DocsBlogLibra
Getting Started
Architecture
Design
Commands
libra addlibra agentlibra alternateslibra applylibra archivelibra authlibra automationlibra bisectlibra blamelibra branchlibra bundlelibra cachelibra cat-filelibra check-attrlibra check-ignorelibra check-mailmaplibra checkoutlibra cherry-picklibra cleanlibra clonelibra cloudlibra code-controllibra codelibra commit-treelibra commitlibra completionslibra configlibra credentiallibra depslibra describelibra diff-fileslibra diff-indexlibra diff-treelibra difflibra dirtylibra fast-exportlibra fast-importlibra fetchlibra filelibra for-each-reflibra format-patchlibra fscklibra gclibra graphlibra greplibra hash-objectlibra hookslibra hydratelibra index-packlibra initlibra investigatelibra layerlibra lfslibra loglibra logfilelibra loginlibra logoutlibra ls-fileslibra ls-remotelibra ls-treelibra maintenancelibra medialibra merge-baselibra merge-filelibra mergelibra metadatalibra mvlibra noteslibra oplibra openlibra pack-objectslibra packagelibra prunelibra publishlibra pulllibra pushlibra read-treelibra rebaselibra refloglibra remotelibra repacklibra replacelibra rererelibra resetlibra restorelibra rev-listlibra rev-parselibra revertlibra reviewlibra revisionlibra rmlibra sandboxlibra servicelibra shortloglibra show-reflibra showlibra sparse-viewlibra stashlibra statslibra statuslibra switchlibra symbolic-reflibra taglibra update-indexlibra update-reflibra usagelibra verify-packlibra whoamilibra worktreelibra write-tree
API Reference
Policy
Commands

libra completions

Command reference for `libra completions`

Generate a shell completion script for the libra CLI. This mirrors the ergonomics of Lore's completions command and the git completion contrib scripts, so shells can tab-complete Libra subcommands and flags.

Synopsis

libra completions <shell>

<shell> is one of bash, zsh, fish, powershell, or elvish.

Description

completions prints a completion script for the requested shell to stdout. The script is generated from Libra's live clap command tree, so it always reflects the current subcommand and flag surface without a hand-maintained table.

The command reads no repository state and works outside a repository.

Install by redirecting the script to the location your shell loads completions from, or eval it into the current shell for a one-off session.

Options

OptionDescriptionExample
<shell>Target shell: bash, zsh, fish, powershell, or elvish.libra completions zsh
--json / --machineStructured output: { shell, script }.libra --json completions bash

Exit codes

CodeMeaning
0Completion script was written.
129Unknown or missing shell argument (Git-style clap usage error).

Examples

# bash: install system-wide
libra completions bash | sudo tee /etc/bash_completion.d/libra >/dev/null

# zsh: drop into a directory on $fpath
libra completions zsh > ~/.zsh/completions/_libra

# fish
libra completions fish > ~/.config/fish/completions/libra.fish

# Load into the current shell without installing
eval "$(libra completions bash)"

# Structured output for tooling
libra --json completions bash

Comparison with Git

Git does not ship a git completions subcommand; completion scripts live in the contrib/completion directory and are sourced manually. Libra exposes the generator directly as libra completions <shell>, which is why this command is classified intentionally-different in COMPATIBILITY.md.

libra commit

Command reference for `libra commit`

libra config

Command reference for `libra config`

On this page

SynopsisDescriptionOptionsExit codesExamplesComparison with Git