Skip to the content.

← Command reference · CLI overview

lean-pkg help

help topics (exit-codes, environment, formatting) or a command’s –help.

Usage

lean-pkg help [common flags] [TOPIC|COMMAND ...]

[common flags]: --json, --commit, --push, --no-commit, also accepted before the command name; see the CLI overview.

Without an argument: the commands and help topics. With a topic (exit-codes, environment, formatting): that topic. With a command (help status, help index add): exactly its –help. Reads no registry.

Arguments and flags

Argument or flag Description
TOPIC\|COMMAND  

Details

Form What it does Key flags
help [TOPIC\|COMMAND ...] help topics in the manner of gh help: no argument lists the commands and topics; exit-codes, environment and formatting print that topic; a command (help status, help index add) prints exactly its --help (help comparator config and help comparator host-check print comparator --help, which covers them); an unknown topic or command is a usage error (exit 2) naming the topics. Reads no registry, so it works without one and under --registry-snapshot. --json: {"ok": true, "text", "topic"\|"command"\|"topics" and "commands"}, and variables [{name, section, meaning, default}] for environment [TOPIC\|COMMAND ...]

Exit codes

0 success (dry runs and no-ops included), 1 refused or failed, 2 usage error; see Exit codes.

Examples

List the commands and the help topics.

lean-pkg help

Print the exit codes and what exit 1 means for each command that answers yes or no.

lean-pkg help exit-codes

Print exactly the text of lean-pkg gate --help.

lean-pkg help gate