> ## Documentation Index
> Fetch the complete documentation index at: https://docs.logbrew.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create a first project, send one safe SDK event, verify readiness, and investigate without exposing credentials.

This is the shortest supported path to first value with Node.js 18 or newer,
`jq`, and LogBrew CLI v0.1.30 or newer. The CLI creates the project and stores
its one-time ingest key without a dashboard handoff. Browser interaction is
needed only when the CLI does not already have approved account authentication.

<Note>
  Use `--json` for agent workflows. Keep credentials in protected local
  configuration and pass only variable names between people, tools, and agents.
</Note>

## First project success path

<Steps>
  <Step title="Confirm account access">
    Install the CLI with the platform command in the [CLI guide](/guides/cli),
    then check its current account state before starting a new login.

    ```bash theme={null}
    logbrew status --json
    ```

    **Checkpoint:** status reports authenticated account access. If it does
    not, a human runs `logbrew login` once and retries `logbrew status --json`.
    An agent must not start a new login when approved authentication already
    works.
  </Step>

  <Step title="Create one project from the CLI">
    Choose a new file in an owner-only directory. The CLI writes the one-time
    project ingest key to that file before it reports success. It never returns
    the key or its file path in output.

    ```bash theme={null}
    install -d -m 700 "$HOME/.logbrew"

    project_result="$(
      logbrew projects create quickstart-node \
        --runtime node \
        --environment development \
        --ingest-key-file "$HOME/.logbrew/quickstart-node.ingest" \
        --json
    )"
    export LOGBREW_PROJECT_ID="$(jq -er '.project.id' <<<"$project_result")"
    jq '{status, setup_status: .setup.status, ingest_key_kind: .ingest_key.kind, next}' \
      <<<"$project_result"
    unset project_result
    ```

    Project creation changes account state. The destination file must not
    exist. If a request has an ambiguous result, repeat the exact command so
    the CLI reuses its pending request identity. Do not change the request or
    use `--abandon-retry` unless you intend to start a different attempt.

    **Checkpoint:** output reports `status: "created"`, setup status
    `created`, and an ingest-key kind. This proves that the project exists and
    the one-time key is stored; it does not prove telemetry delivery. See
    [project setup and credential roles](/concepts/projects).
  </Step>

  <Step title="Install the Node.js SDK">
    Install the two published packages and load the stored key into the
    SDK-specific environment variable without printing it.

    ```bash theme={null}
    npm install @logbrew/sdk @logbrew/node
    export LOGBREW_SERVER_API_KEY="$(< "$HOME/.logbrew/quickstart-node.ingest")"
    ```

    An account access credential is for account reads. Never use it as SDK
    configuration. Keep the project key out of command output, prompts,
    tickets, source files, and package configuration.
  </Step>

  <Step title="Send one safe SDK log">
    Send explicit release and environment markers with one placeholder-only
    `info` log. The stable event IDs make an exact retry deduplicate safely.

    ```bash theme={null}
    node --input-type=module <<'JS'
    import {
      createLogBrewNodeClient,
      createNodeFetchTransport
    } from "@logbrew/node";

    const client = createLogBrewNodeClient({
      sdkName: "quickstart-node",
      sdkVersion: "1.0.0"
    });
    const occurredAt = new Date().toISOString();

    client.release("evt_release_quickstart", occurredAt, {
      version: "quickstart@1",
      metadata: { service: "quickstart-node" }
    });
    client.environment("evt_environment_quickstart", occurredAt, {
      name: "development"
    });
    client.log("evt_log_quickstart", occurredAt, {
      message: "LogBrew quickstart check",
      level: "info",
      logger: "quickstart-node"
    });

    const response = await client.shutdown(createNodeFetchTransport());
    const ok = response.statusCode >= 200 && response.statusCode < 300;
    console.log(JSON.stringify({
      ok,
      status_code: response.statusCode,
      attempts: response.attempts
    }));
    if (!ok) process.exitCode = 1;
    JS

    unset LOGBREW_SERVER_API_KEY
    ```

    The event must not contain credentials, headers, raw request bodies,
    customer data, local paths, or unrelated source.

    **Checkpoint:** the SDK reports a successful status. Submission is not the
    readiness checkpoint; continue to the project doctor and authenticated
    readback.
  </Step>

  <Step title="Verify readiness with the project doctor">
    The CLI uses its stored account authentication for this read. Do not
    replace it with the project ingest key.

    ```bash theme={null}
    : "${LOGBREW_PROJECT_ID:?set the project UUID}"

    logbrew doctor --project "$LOGBREW_PROJECT_ID" --json \
      | jq '{state, setup_status, setup_acknowledged, has_active_ingest_key, first_telemetry_seen_at, next, next_action}'
    ```

    **Checkpoint:** `state: "ready"` with
    `next_action.code: "inspect_recent_telemetry"` and
    `next_action.target: "telemetry_reads"`. For any other state, follow the
    returned typed action through the [project diagnosis
    guide](/concepts/projects#diagnose-project-setup) instead of guessing from
    logs.
  </Step>

  <Step title="Read the event and follow typed issue routing">
    Use the exact project, release, and environment from the SDK batch.

    ```bash theme={null}
    logbrew read logs --project "$LOGBREW_PROJECT_ID" \
      --release quickstart@1 \
      --environment development \
      --since 1h \
      --json
    ```

    **Checkpoint:** `LogBrew quickstart check` appears in the fixed scope. If
    an issue is present, start from its authenticated detail response and
    follow only the returned `next_action.code` and `next_action.target`. Use
    the [typed issue investigation workflow](/guides/investigate-an-issue);
    never broaden the query across projects.
  </Step>

  <Step title="Recover safely or report privately">
    Follow the doctor's typed action first. If telemetry is still missing, use
    the ordered [first telemetry checks](/guides/troubleshooting#recover-missing-first-telemetry).

    When those checks cannot recover the path, [create a private support
    ticket](/guides/report-a-problem). Tickets are private to the submitting
    account and LogBrew support, but reports must still omit credentials,
    authorization headers, project IDs, hosts, raw logs or payloads, customer
    data, local paths, and source code. Use only the support guide's strict
    diagnostic allowlist.
  </Step>
</Steps>

## Continue with one task

<CardGroup cols={2}>
  <Card title="Project setup" icon="folder-kanban" href="/concepts/projects">
    Diagnose setup state and manage project-scoped ingest credentials.
  </Card>

  <Card title="SDK ingestion" icon="cloud-upload" href="/guides/sdk-ingestion">
    Review supported SDK packages and telemetry fields.
  </Card>

  <Card title="Issue investigation" icon="bug" href="/guides/investigate-an-issue">
    Follow typed trace or related-log actions without widening scope.
  </Card>

  <Card title="Private support" icon="life-buoy" href="/guides/report-a-problem">
    Submit a sanitized, account-private recovery report.
  </Card>
</CardGroup>
