Skip to main content
Use --json for machine-readable output.

Common filters

First-run examples

example, examples, sample, samples, recipe, and recipes all open the examples guide.

Login behavior

logbrew login uses GitHub by default. Select GitLab or Bitbucket when the account uses another provider.
--no-open prints the login URL without opening a browser. --json returns the same handoff as machine-readable JSON and also keeps the browser closed. logbrew auth login is an alias for logbrew login. Use logbrew status --json to check API reachability and authentication. Use logbrew whoami --json or logbrew me --json to read the exact validated account object from GET /api/auth/account:
Account identity requires account authentication. A project-scoped lbw_ingest_ key cannot read it. CLI output must not print stored auth material.

SDK setup planning

logbrew setup detects supported manifests and prints a plan without changing project files. --auto and --yes record planning preferences; they do not authorize file changes. For a detected SwiftPM or XcodeGen project, JSON output sets install_ready to true. The install_plan uses the public SDK repository and these stable values: The version field remains available for clients that read the original setup plan. New clients should use version_requirement to understand the compatible release range. logbrew init, logbrew install, logbrew configure, and logbrew sdk use the same non-mutating plan. For a detected CMake project, CLI v0.1.39 or newer also sets install_ready to true. The detected entry uses runtime: "cpp", package_manager: "cmake", and manifest: "CMakeLists.txt". The stable plan fields are: dependency_declaration contains the pinned CMake FetchContent block. The CLI does not edit the manifest, invoke CMake, enable the optional transport, or install libcurl. For a detected Python project, JSON output also sets install_ready to true. The plan selects the detected package manager and uses these stable fields: compatibility.requires_framework is null for the core Python plan. It is Django>=4.2.30,<6, Flask>=3.1, or FastAPI>=0.111.1 when that released framework integration is detected. The install_command uses the selected package manager and includes logbrew-sdk plus the matching framework package. The CLI does not execute that command.

Project setup tracking

logbrew projects setup <project_id> records that setup was observed for an existing project. It calls POST /api/projects/{project_id}/setup/seen and returns the LogBrew project setup state as JSON.
Human output starts with:
It may also include Last seen: ... and Next: .... 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.

Project catalog, creation, and usage

The CLI reads the active project catalog from GET /api/projects. logbrew projects --json preserves the exact validated bare array. Human output is bounded to project identity, setup status, and latest activity.
CLI v0.1.32 or newer can issue a key for an existing project without dashboard interaction or duplicate project creation:
This command uses account authentication and calls POST /api/projects/{project_id}/ingest-keys. --kind accepts sdk, browser, server, or cli and defaults to sdk. The default label is CLI-created SDK key. The destination file must not exist. The CLI creates an owner-only file, stores the one-time key before reporting success, and never prints the key or its file path. Project creation uses the same key-file guarantees:
If the result of either request is ambiguous, repeat the exact command. The CLI reuses that operation’s pending request identity and keeps project creation retry state separate from existing-project key creation. Use --abandon-retry only when you intend to discard that pending request and start a changed request. logbrew setup --create-project --json returns the project command help; it does not create a project. CLI v0.1.30 or newer can create the project without dashboard interaction. After creation, read canonical setup state with the project ID from the safe JSON response:
Read account usage from GET /api/account/usage:
JSON preserves the exact validated account-usage object, including plan, limits, totals, quota state, reset dates, per-project totals, per-stream totals, and the next action. The CLI does not calculate or persist usage or quota state from local files.
Do not use an account bearer token as SDK or ingest configuration. Use only project-scoped SDK or ingest configuration returned by LogBrew.

JSON behavior

  • --json can appear before or after commands.
  • JSON errors include ok, error, message, and next.
  • logbrew version --json includes binary, os, and arch.
  • Human logbrew version output stays short.
  • CLI output must not print stored auth material.

Live watch behavior

logbrew watch --json opens a live stream. logbrew watch --severity error,critical --json keeps the live view focused on actionable severities. The watch stream reconnects after transient disconnects with backoff. Supported target forms are logbrew watch logs --json, logbrew watch issues --json, and logbrew watch actions --json. Trace and span terms are not watch resources because trace detail reads require a trace ID.
Watch severity filtering is client-side today. Keep server-side read filters explicit when querying stored telemetry.

Watch recovery example

If an agent tries to watch traces directly, JSON output returns a parse error with a trace-specific next step.
The CLI intentionally uses terms agents already know: logs, issues, traces, spans, actions, releases, environments, projects, services, and status.