logbrew CLI is the primary LogBrew interface for developers and AI coding
agents. Use it to log in, check status, read telemetry, explain failures, and
update issue status.
Install choices
Use a native installer when you want the fastest path on a new machine.Cargo and source builds require Rust 1.87 or newer. Native installers, npm,
Homebrew, and the Windows MSI use release artifacts and do not need a local
Rust toolchain.
Update an existing install
Existing CLI installations do not update themselves. Refresh the same install surface before using a newly documented command or setup plan:First checks
Login from the CLI
GitHub is the default login provider. Select GitLab or Bitbucket when the account uses another provider.--no-open to print a login URL without opening a browser. Use --json
for the same non-opening handoff in machine-readable form.
Agents should not guess auth state or account identity. Run
logbrew status --json to check API reachability and authentication. Run
logbrew whoami --json to read the authenticated account identity. If auth is
missing, ask a human to complete logbrew login --provider <provider>, then
continue after both checks pass. CLI output must not print stored auth
material.
Built-in examples
Use the examples command when you need a compact command map for first-run checks, troubleshooting, live watch, or agent JSON workflows.example, sample, samples, recipe, and
recipes open the same examples guide.
Plan Swift SDK setup
Run setup from the root of a SwiftPM or XcodeGen project.install_ready is true and the compatible release
range starts at 0.1.6.
Copy the returned dependency_declaration into the project package list, then
add the LogBrew product to the target that sends telemetry. The command does
not change project files. logbrew init, logbrew install,
logbrew configure, and logbrew sdk return the same plan.
See the CLI reference for the complete
stable install_plan field contract.
Plan C++ SDK setup
Run setup from the root of a CMake project. CLI v0.1.39 or newer detects a regular rootCMakeLists.txt without scanning build or
cmake-build-* output directories.
install_ready is true. The plan pins C++ SDK 0.2.3,
returns a copyable FetchContent declaration, and names the
LogBrew::LogBrew core target. Optional hosted delivery uses
LogBrew::HttpTransport, LOGBREW_BUILD_HTTP_TRANSPORT=ON, and libcurl.
If CMakeLists.txt exists but detected is empty, use the update steps above
and rerun setup. Do not manually recreate the plan from an older CLI result.
Copy the returned dependency_declaration into CMakeLists.txt, then link
the required target to the application target. The command does not install a
package, edit the manifest, or enable the optional HTTP dependency.
See Send SDK telemetry for the complete copy-paste
build and verification flow.
Plan Python SDK setup
Run setup from the root of a Python project. The CLI detectspyproject.toml,
Pipfile, supported lockfiles, and bounded dependency metadata without
following manifest symlinks.
pip, uv, poetry, or pipenv command. It reports Python >=3.10.
Detected framework plans add logbrew-django, logbrew-flask, or
logbrew-fastapi next to logbrew-sdk.
CLI v0.1.30 reports these framework compatibility requirements:
Review
install_plan.compatibility, then run the returned install_command.
The setup command does not install packages or change project files.
Track project setup
The CLI can record that setup was observed for an existing project. Use it when a setup screen, CLI flow, or agent has enough context to mark setup progress without guessing from local files.POST /api/projects/{project_id}/setup/seen and returns the
LogBrew project setup state as JSON. Human output starts with
Project setup seen: <status> and may include Last seen: ... and Next: ....
With normal account auth, --source defaults to cli. If authentication uses
a project-scoped ingest key with the public lbw_ingest_ prefix, the CLI omits
source so LogBrew can derive the source from the key kind.
Read, create, and configure projects
Read the authenticated active project catalog before selecting a project:POST /api/projects/{project_id}/ingest-keys with account authentication. The
destination file must not exist. The CLI stores the one-time key in that
owner-only file before it reports success, and it never prints the key or file
path. --kind accepts sdk, browser, server, or cli; it defaults to
sdk.
To create a new project and its first key, use the same file safety rules:
--abandon-retry only when you intend to
discard the pending request and start a changed request.
logbrew setup --create-project --json returns project command help without
creating a project.
After creation, use the project ID from the safe JSON response to read
backend-owned readiness with stored account authentication:
Check account usage
Read account usage and limits without changing account or billing state:Common investigations
Release got worse
One request failed
Logs around a release
Product action failed
Live watch
Use watch mode when an agent needs fresh events while it is debugging a change.logbrew watch --json opens a live stream for all live events. Targeted watch
forms support logs, issues, and actions. Trace and span terms are not live
watch resources; read trace details with a trace ID instead.
Severity filtering for watch is client-side today, so keep the filter explicit
in the command you run. The stream reconnects after transient disconnects with
backoff.
Explain before changing code
Agents should fetch context before proposing a fix.1
Read the issue
2
Read the trace
3
Ask LogBrew for an explanation
4
Resolve only after verification
JSON contract
- Put
--jsonbefore or after the command, such aslogbrew --json statusorlogbrew status --json. - JSON errors include
ok,error,message, andnext. - CLI output must not print stored auth material.
logbrew version --jsonincludesbinary,os, andarch; humanlogbrew versionstays short.- Do not use CLI output without
--jsonas an automation contract. Human output can change for readability.
