Skip to content

docs(cli): drop AGENTSFLEET_TOKEN; document AGENTSFLEET_API_KEY precedence#103

Merged
indykish merged 3 commits into
mainfrom
chore/cli-drop-token-env-docs
Jun 19, 2026
Merged

docs(cli): drop AGENTSFLEET_TOKEN; document AGENTSFLEET_API_KEY precedence#103
indykish merged 3 commits into
mainfrom
chore/cli-drop-token-env-docs

Conversation

@indykish

@indykish indykish commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Companion docs update for the CLI change in agentsfleet/agentsfleet#431, which removes the AGENTSFLEET_TOKEN environment variable and makes AGENTSFLEET_API_KEY win over a stored login session at the wire.

Changes

  • cli/configuration.mdx — rewrote Auth precedence to the new model (no TTY-dependence): the service API key (AGENTSFLEET_API_KEY) wins over stored credentials; login seeding is --token → stdin → browser. Dropped the AGENTSFLEET_TOKEN env-var table row; CI example now exports AGENTSFLEET_API_KEY.
  • cli/agentsfleet.mdxlogin token resolution is now --token → stdin; the env-seeding example, logout note, and auth status source list use AGENTSFLEET_API_KEY.
  • quickstart.mdx / agents/troubleshooting.mdx — non-interactive auth via --token/stdin or a standing AGENTSFLEET_API_KEY.
  • api-reference/introduction.mdx — curl bearer example uses $AGENTSFLEET_API_KEY.

Note for reviewers

cli/configuration.mdx still describes AGENTSFLEET_API_KEY's provenance as "from agentsfleet agent-key add" (pre-existing). Per AUTH.md, control-plane CLI auth wants an agt_t… tenant key (dashboard → Settings → API keys), not an agt_a… agent key — worth reconciling separately; left as-is here to keep this PR scoped to the AGENTSFLEET_TOKEN removal.

🤖 Generated with Claude Code

Greptile Summary

This PR removes AGENTSFLEET_TOKEN across all CLI docs and replaces it with AGENTSFLEET_API_KEY as the single env-var auth mechanism, reflecting the upstream CLI change in agentsfleet/agentsfleet#431. The new model is TTY-agnostic: AGENTSFLEET_API_KEY unconditionally wins over a stored login session; agentsfleet login now seeds only via --token or piped stdin.

  • cli/configuration.mdx — auth precedence rewritten, AGENTSFLEET_TOKEN env-var row dropped, CI snippet updated; also removes the previously inaccurate "from agentsfleet agent-key add" provenance claim.
  • cli/agentsfleet.mdx, agents/troubleshooting.mdx, quickstart.mdx, api-reference/introduction.mdx — all updated consistently to drop AGENTSFLEET_TOKEN and reference AGENTSFLEET_API_KEY.
  • index.mdx — replaces the npm-based multi-step quickstart with a curl | bash one-liner and removes the product narrative; these changes appear unrelated to the token deprecation and are not described in the PR body.

Confidence Score: 5/5

Safe to merge — all token-removal changes are consistent across the five auth-related files and the docs accurately reflect the new precedence model.

The AGENTSFLEET_TOKEN → AGENTSFLEET_API_KEY migration is applied uniformly across every affected file, the precedence descriptions are internally consistent, and the JWT-decoding nuance in auth status is handled correctly. The index.mdx homepage restructuring is unexplained but does not introduce any incorrect documentation.

index.mdx — contains homepage copy and install-method changes unrelated to the token deprecation, without explanation in the PR description.

Important Files Changed

Filename Overview
agents/troubleshooting.mdx Correctly updates auth resolution order to drop --token (login-only) and AGENTSFLEET_TOKEN, replacing with AGENTSFLEET_API_KEY → stored credentials. Credentials path now consistently includes .json extension.
api-reference/introduction.mdx Single-line change updates the curl example bearer token from $AGENTSFLEET_TOKEN to $AGENTSFLEET_API_KEY. Clean and accurate.
cli/agentsfleet.mdx Login example, flag descriptions, logout note, and auth status prose all updated consistently. auth status now correctly qualifies JWT-claim decoding as "when present", since AGENTSFLEET_API_KEY is a service key, not a JWT.
cli/configuration.mdx Auth precedence rewritten to the new TTY-agnostic model; AGENTSFLEET_TOKEN row removed from env-var table; CI usage snippet updated. Removed the previously-inaccurate "from agentsfleet agent-key add" provenance claim from the AGENTSFLEET_API_KEY row.
quickstart.mdx Non-interactive auth note updated: drops AGENTSFLEET_TOKEN, adds AGENTSFLEET_API_KEY guidance for ongoing machine auth. Accurate and consistent with other files.
index.mdx Replaces the multi-step npm-based quickstart with a `curl

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[CLI command issued] --> B{AGENTSFLEET_API_KEY set?}
    B -- Yes --> C[Send API key as bearer]
    B -- No --> D{credentials.json exists?}
    D -- Yes --> E[Send stored login JWT]
    D -- No --> F[Unauthenticated / error]

    subgraph login ["agentsfleet login token resolution"]
        G[--token flag] -->|highest priority| H[Validate & persist token]
        I[piped stdin] --> H
        J[Browser device flow] -->|interactive TTY only| H
    end

    style C fill:#22c55e,color:#fff
    style F fill:#ef4444,color:#fff
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[CLI command issued] --> B{AGENTSFLEET_API_KEY set?}
    B -- Yes --> C[Send API key as bearer]
    B -- No --> D{credentials.json exists?}
    D -- Yes --> E[Send stored login JWT]
    D -- No --> F[Unauthenticated / error]

    subgraph login ["agentsfleet login token resolution"]
        G[--token flag] -->|highest priority| H[Validate & persist token]
        I[piped stdin] --> H
        J[Browser device flow] -->|interactive TTY only| H
    end

    style C fill:#22c55e,color:#fff
    style F fill:#ef4444,color:#fff
Loading
Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
index.mdx:14-18
**Undocumented scope expansion in index.mdx**

This file's changes don't touch either `AGENTSFLEET_TOKEN` or `AGENTSFLEET_API_KEY` — the PR description doesn't mention them either. The diff replaces the structured npm-based quickstart (`npm install -g @agentsfleet/cli`, `npx skills add`, `agentsfleet login`) with a bare `curl -fsSL https://agentsfleet.dev | bash` one-liner, removes the "A teammate that owns the outcome" product narrative, and drops the `/agentsfleet-install-platform-ops` step entirely. Could you confirm these changes are intentional and describe the rationale (separate cleanup, install script now published, etc.)? Without that context it's hard to review them confidently.

Reviews (3): Last reviewed commit: "docs: tighten landing intro to marketing..." | Re-trigger Greptile

…dence

The CLI removed the `AGENTSFLEET_TOKEN` environment variable. The service
API key `AGENTSFLEET_API_KEY` is now the sole env-sourced bearer and wins
over a stored `login` session at the wire.

- cli/configuration.mdx — rewrite Auth precedence to the new model (no
  TTY-dependence): API key wins over stored credentials; login seeding is
  `--token` → stdin → browser. Drop the env-var table row; update the CI
  example to `AGENTSFLEET_API_KEY`.
- cli/agentsfleet.mdx — login/logout/auth-status: token resolution is
  `--token` → stdin; the env-seeding example and the auth-status source
  list now use `AGENTSFLEET_API_KEY`.
- quickstart.mdx, agents/troubleshooting.mdx — non-interactive auth uses
  `--token`/stdin or a standing `AGENTSFLEET_API_KEY`.
- api-reference/introduction.mdx — curl example uses `$AGENTSFLEET_API_KEY`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mintlify

mintlify Bot commented Jun 19, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
agentsfleet 🟢 Ready View Preview Jun 19, 2026, 7:56 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

…env-docs

# Conflicts:
#	cli/configuration.mdx
Drop the long 'A teammate that owns the outcome' section for the short
marketing statement, replace the multi-step Get started block with the
single curl one-liner used on the marketing site, and point readers to
the quickstart to start their first fleet.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@indykish indykish merged commit 298279d into main Jun 19, 2026
4 checks passed
@indykish indykish deleted the chore/cli-drop-token-env-docs branch June 19, 2026 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant