Skip to content

CLI Reference#

This page contains the auto-generated documentation for the metagit command-line interface.

metagit#

Metagit CLI: A multi-purpose CLI tool with YAML configuration.

Usage:

metagit [OPTIONS] COMMAND [ARGS]...

Options:

  --version                 Show the version and exit.
  --config TEXT             Path to the configuration file
  --debug / --no-debug      Enable or disable debug mode
  --verbose / --no-verbose  Enable or disable verbose output
  -h, --help                Show this message and exit.

appconfig#

Application configuration subcommands

Usage:

metagit appconfig [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help  Show this message and exit.

create#

Create default application config

Usage:

metagit appconfig create [OPTIONS]

Options:

  -h, --help  Show this message and exit.

get#

Display appconfig value

Usage:

metagit appconfig get [OPTIONS]

Options:

  --name TEXT    Appconfig element to target
  --show-keys    If the element is a dictionary, show all key names. If it is a list, show all name attributes
  --output TEXT  Output format (json/yaml)
  -h, --help     Show this message and exit.

show#

Show current configuration

Usage:

metagit appconfig show [OPTIONS]

Options:

  -h, --help  Show this message and exit.

validate#

Validate a configuration file

Usage:

metagit appconfig validate [OPTIONS]

Options:

  --config-path TEXT  Path to the configuration file
  -h, --help          Show this message and exit.

config#

Configuration subcommands

Usage:

metagit config [OPTIONS] COMMAND [ARGS]...

Options:

  --config-path TEXT  Path to the metagit configuration file
  -h, --help          Show this message and exit.

create#

Create metagit config files

Usage:

metagit config create [OPTIONS]

Options:

  --output-path TEXT  Path to the metagit configuration file
  --name TEXT         Project name
  --description TEXT  Project description
  --url TEXT          Project URL
  --kind TEXT         Project kind
  -h, --help          Show this message and exit.

init#

Initialize AppConfig with default settings.

Usage:

metagit config init [OPTIONS]

Options:

  --config-path TEXT   Path to save configuration file (default: ~/.config/metagit/config.yml).
  --github-token TEXT  GitHub API token to include in initial configuration.
  --gitlab-token TEXT  GitLab API token to include in initial configuration.
  -h, --help           Show this message and exit.

providers#

Manage git provider plugin configuration.

Usage:

metagit config providers [OPTIONS]

Options:

  --show               Show current provider configuration.
  --enable-github      Enable GitHub provider.
  --disable-github     Disable GitHub provider.
  --enable-gitlab      Enable GitLab provider.
  --disable-gitlab     Disable GitLab provider.
  --github-token TEXT  Set GitHub API token.
  --gitlab-token TEXT  Set GitLab API token.
  --github-url TEXT    Set GitHub API base URL (for GitHub Enterprise).
  --gitlab-url TEXT    Set GitLab API base URL (for self-hosted GitLab).
  --config-path TEXT   Path to configuration file (default: ~/.config/metagit/config.yml).
  -h, --help           Show this message and exit.

show#

Show metagit configuration

Usage:

metagit config show [OPTIONS]

Options:

  -h, --help  Show this message and exit.

validate#

Validate metagit configuration

Usage:

metagit config validate [OPTIONS]

Options:

  -h, --help  Show this message and exit.

detect#

Detection subcommands

Usage:

metagit detect [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help  Show this message and exit.

repo#

Detect the codebase.

Usage:

metagit detect repo [OPTIONS]

Options:

  --repo-path TEXT  Path to the git repository to analyze.  [default: ./]
  --output TEXT     Output format.  [default: yaml]
  -h, --help        Show this message and exit.

repository#

Comprehensive repository analysis and MetagitConfig generation.

Usage:

metagit detect repository [OPTIONS]

Options:

  --path TEXT                   Path to local repository to analyze.
  --url TEXT                    URL of remote git repository to clone and analyze.
  --output [summary|yaml|json]  Output format. Defaults to 'summary' if --save is not used.
  --save                        Save the generated configuration to .metagit.yml in the repository path.
  --temp-dir TEXT               Temporary directory for cloning remote repositories.
  --github-token TEXT           GitHub API token for fetching repository metrics (overrides AppConfig).
  --gitlab-token TEXT           GitLab API token for fetching repository metrics (overrides AppConfig).
  --github-url TEXT             GitHub API base URL (for GitHub Enterprise, overrides AppConfig).
  --gitlab-url TEXT             GitLab API base URL (for self-hosted GitLab, overrides AppConfig).
  --use-app-config              Use AppConfig for provider configuration (default: True).
  -h, --help                    Show this message and exit.

info#

Display the current configuration.

Usage:

metagit info [OPTIONS]

Options:

  -h, --help  Show this message and exit.

init#

Initialize local metagit environment by creating .metagit.yml and updating .gitignore

Usage:

metagit init [OPTIONS]

Options:

  -f, --force  Force overwrite of existing .metagit.yml file
  -h, --help   Show this message and exit.

project#

Project subcommands

Usage:

metagit project [OPTIONS] COMMAND [ARGS]...

Options:

  -c, --config TEXT   Path to the metagit definition file
  -p, --project TEXT  Project within workspace to operate on
  -h, --help          Show this message and exit.

list#

List the current project configuration in YAML format

Usage:

metagit project list [OPTIONS]

Options:

  -h, --help  Show this message and exit.

repo#

Repository subcommands

Usage:

metagit project repo [OPTIONS] COMMAND [ARGS]...

Options:

  -h, --help  Show this message and exit.

add#

Add a repository to the current project

Usage:

metagit project repo add [OPTIONS]

Options:

  --name TEXT                     Repository name
  --description TEXT              Repository description
  --kind [monorepo|umbrella|application|gitops|infrastructure|service|library|website|other|docker_image|repository|cli]
                                  Project kind
  --ref TEXT                      Reference in the current project for the target project
  --path TEXT                     Local project path
  --url TEXT                      Repository URL
  --sync / --no-sync              Sync setting
  --language TEXT                 Programming language
  --language-version TEXT         Language version
  --package-manager TEXT          Package manager
  --frameworks TEXT               Frameworks used (can be specified multiple times)
  --prompt                        Use interactive prompts instead of command line parameters
  -h, --help                      Show this message and exit.

select#

Select workspace project repo to work on

Usage:

metagit project repo select [OPTIONS]

Options:

  -h, --help  Show this message and exit.

select#

Shortcut: Uses 'project repo select' to select workspace project repo to work on

Usage:

metagit project select [OPTIONS]

Options:

  -h, --help  Show this message and exit.

sync#

Sync project within workspace

Usage:

metagit project sync [OPTIONS]

Options:

  -h, --help  Show this message and exit.

version#

Get the application version.

Usage:

metagit version [OPTIONS]

Options:

  -h, --help  Show this message and exit.

workspace#

Workspace subcommands

Usage:

metagit workspace [OPTIONS] COMMAND [ARGS]...

Options:

  --config TEXT  Path to the metagit definition file
  -h, --help     Show this message and exit.

select#

Select workspace project repo to work on

Usage:

metagit workspace select [OPTIONS]

Options:

  --project TEXT  Project within workspace to select target paths from
  -h, --help      Show this message and exit.