cli

module
v0.0.2-testing Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2026 License: MIT

README

Re:Earth CLI

reearth is the command-line interface for Re:Earth. Each Re:Earth product (Visualizer, CMS, Flow) is a subcommand, and all of them share accounts, output formats and docs.

reearth login
reearth hello world
reearth hello me --json

Install

brew install reearth/tap/reearth                    # macOS / Linux
winget install Reearth.Reearth                      # Windows
scoop bucket add reearth https://github.com/reearth/scoop-bucket
scoop install reearth                               # Windows
curl -fsSL https://cli.reearth.io/install.sh | sh   # macOS / Linux, no package manager

.deb, .rpm and .apk packages are attached to each release.

Run reearth upgrade to update. If you installed with a package manager, the command tells you how to upgrade with it.

Usage

Command Description
reearth login [account] Sign in. Uses the browser (authorization code + PKCE on a loopback address), or a device code over SSH or in containers
reearth logout [account] / use <account> Sign out, or switch the active account
reearth account list / whoami List accounts, and show which one applies here and why
reearth auth status Check that each account's credentials work
reearth api <product> <path> Send a raw authenticated API request
reearth config get/set/list Read and change settings
reearth search "<task>" Find the command for a task
reearth docs search/read Search and read the documentation at docs.reearth.io
reearth help <topic> Read about output formats, exit codes and environment variables
reearth skills install Install the skill that teaches coding agents to use the CLI
reearth extension install/list/exec Manage extensions
reearth doctor Diagnose configuration, the keyring, the network and the installation
reearth upgrade Update the CLI

Global flags: --account, --json[=fields], --jq, -o table|plain|json|yaml|ndjson, --yes, --no-input, --no-color, --quiet, --debug.

Credentials are stored in the OS keyring (macOS Keychain, Windows Credential Manager, or Secret Service). On machines without a keyring, pass --insecure-storage. For CI, set REEARTH_TOKEN.

Contributing

See CONTRIBUTING.md for the design, how to add a product, development setup and the release process.

License

MIT

Directories

Path Synopsis
cmd
reearth command
Command reearth is the unified Re:Earth CLI.
Command reearth is the unified Re:Earth CLI.
reearth-cms command
Command reearth-cms is the standalone build of the cms product.
Command reearth-cms is the standalone build of the cms product.
reearth-hello command
Command reearth-hello is the standalone build of the hello product.
Command reearth-hello is the standalone build of the hello product.
reearth-visualizer command
Command reearth-visualizer is the standalone build of the visualizer product.
Command reearth-visualizer is the standalone build of the visualizer product.
internal
extension
Package extension manages third-party commands installed from GitHub releases (like `gh extension`).
Package extension manages third-party commands installed from GitHub releases (like `gh extension`).
ghrelease
Package ghrelease reads GitHub releases and downloads their assets with checksum verification.
Package ghrelease reads GitHub releases and downloads their assets with checksum verification.
update
Package update implements update notifications and `reearth upgrade` (self-update from GitHub Releases with checksum verification).
Package update implements update notifications and `reearth upgrade` (self-update from GitHub Releases with checksum verification).
products
cms
Package cms is the Re:Earth CMS product CLI.
Package cms is the Re:Earth CMS product CLI.
hello
Package hello is a sample product showing how to plug a product CLI into the Re:Earth CLI.
Package hello is a sample product showing how to plug a product CLI into the Re:Earth CLI.
visualizer
Package visualizer is the Re:Earth Visualizer product CLI.
Package visualizer is the Re:Earth Visualizer product CLI.
sdk
app
Package app assembles a runnable CLI from products: the unified `reearth` binary (Run with several products) or a standalone product binary (Main).
Package app assembles a runnable CLI from products: the unified `reearth` binary (Run with several products) or a standalone product binary (Main).
auth
Package auth implements login flows (loopback + PKCE, device code), multi-account token management and transparent refresh for Re:Earth's Auth0 tenant.
Package auth implements login flows (loopback + PKCE, device code), multi-account token management and transparent refresh for Re:Earth's Auth0 tenant.
build
Package build holds build-time metadata injected via -ldflags.
Package build holds build-time metadata injected via -ldflags.
cmdtree
Package cmdtree describes the command tree as data.
Package cmdtree describes the command tree as data.
config
Package config manages the non-secret CLI configuration (~/.config/reearth/config.yaml) and project files (.reearth.yaml).
Package config manages the non-secret CLI configuration (~/.config/reearth/config.yaml) and project files (.reearth.yaml).
core
Package core is the contract between the CLI and product commands: the Product interface and the Factory that products receive.
Package core is the contract between the CLI and product commands: the Product interface and the Factory that products receive.
corecmd
Package corecmd implements the commands shared by every Re:Earth CLI binary: login, accounts, config, api, skills, version and doctor.
Package corecmd implements the commands shared by every Re:Earth CLI binary: login, accounts, config, api, skills, version and doctor.
credstore
Package credstore stores account secrets in the OS keyring (macOS Keychain, Windows Credential Manager, Secret Service on Linux), with an explicit opt-in plain-file fallback for headless environments.
Package credstore stores account secrets in the OS keyring (macOS Keychain, Windows Credential Manager, Secret Service on Linux), with an explicit opt-in plain-file fallback for headless environments.
docs
Package docs searches and reads the Re:Earth documentation through the site's llms-full.txt: every page of docs.reearth.io in one Markdown file.
Package docs searches and reads the Re:Earth documentation through the site's llms-full.txt: every page of docs.reearth.io in one Markdown file.
envvar
Package envvar is the one way the CLI reads environment variables.
Package envvar is the one way the CLI reads environment variables.
envvar/envvartest
Package envvartest replaces the environment envvar reads in tests.
Package envvartest replaces the environment envvar reads in tests.
httpx
Package httpx builds HTTP clients with authentication, retries, a User-Agent and optional debug tracing.
Package httpx builds HTTP clients with authentication, retries, a User-Agent and optional debug tracing.
iostreams
Package iostreams abstracts stdin/stdout/stderr and decides how the CLI should present itself: human (TTY, colors, spinners, prompts) or machine (plain, no interaction).
Package iostreams abstracts stdin/stdout/stderr and decides how the CLI should present itself: human (TTY, colors, spinners, prompts) or machine (plain, no interaction).
output
Package output renders command results either for humans (tables, relative times, colors) or for programs (json, yaml, ndjson, jq), from the same data.
Package output renders command results either for humans (tables, relative times, colors) or for programs (json, yaml, ndjson, jq), from the same data.
prompt
Package prompt provides minimal, line-based interactive prompts written to stderr.
Package prompt provides minimal, line-based interactive prompts written to stderr.
skills
Package skills renders the SKILL.md that `skills install` writes into agent skill directories.
Package skills renders the SKILL.md that `skills install` writes into agent skill directories.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL