ISS-8131: Fold device-flow auth into the pixee-auth skill - #91
Open
dunningdan wants to merge 8 commits into
Open
ISS-8131: Fold device-flow auth into the pixee-auth skill#91dunningdan wants to merge 8 commits into
dunningdan wants to merge 8 commits into
Conversation
Adds a coding-agent skill covering `pixee o11y login/token/status/logout` — the device-flow authentication to a Pixee deployment's observability stack and the per-user bearer tokens used to query VictoriaMetrics/Logs/Traces over HTTP. Distinct from `pixee-auth` (the REST API token). Also lists it in the README. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016Y4oU4W5LfteyHBVQZLGM5
dunningdan
marked this pull request as ready for review
July 21, 2026 15:21
The CLI collapsed `pixee o11y *` into `pixee auth *` (pixee-cli-private#37) because the device-flow token is not observability-only — the same credential authorizes the platform REST API. This repo had the same duplication one layer up: a `pixee-o11y` skill alongside the existing `pixee-auth` skill, for what is now a single command group. Gilday suggested renaming `skills/pixee-o11y` -> `skills/pixee-auth`, but that directory already exists and documents the API-key credential. Renaming would have collided; merging is the coherent version of the same instruction. - Fold the device-flow content into `skills/pixee-auth/SKILL.md`: a table contrasting the two credentials (per-user OAuth vs the deployment's shared API key) and when to reach for each, the four subcommands, and the fact that the device flow needs no browser on the CLI's own host — so it works over SSH. - Delete `skills/pixee-o11y/`. - Drop the claim that the two credentials "do not interchange". Since the Authentik provider was generalized (pixee-enterprise-server#3940) the device-flow token is accepted by the REST API too, so that framing is stale. - Correct the credential-resolution list: it omitted the global `--token` flag, which does override PIXEE_TOKEN and stored config for every subcommand (see src/index.ts in pixee-cli-private) — the skill claimed it applied only to `auth login`. - Bump the skill to 1.1.0 and rewrite the README entry. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4
nahsra
approved these changes
Jul 27, 2026
The CLI unified the auth group on `--server` (pixee-cli-private#37): `auth` was the only command group where a positional argument named a deployment rather than the object of the verb. Update every example, and correct the credential-resolution section, which described the positional as overriding everything else. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4
Follows pixee-cli-private#37: - `auth token` now always requires `--server`. The skill previously said the server is remembered "so later commands need no flag", which is now wrong for exactly the command where getting it wrong matters most: `token` returns a bare credential and the caller picks the URL, so a defaulted server could hand one deployment's token to a request against another. - `auth status` lists every server you hold a session for, expired ones included, and collapses to a single line when nothing is configured. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4
…e flow
The README's getting-started told new users to authenticate with the shared API
key, passed inline:
pixee auth login --server https://pixee.example.com --token <your-token>
That is the least attributable credential by the least safe method — inline
values land in shell history, which the skill itself warns about. It now leads
with `pixee auth login`, which identifies the person, and presents the shared key
as the unattended path via `--token -` on stdin.
Skill (1.1.0 -> 1.2.0):
- Documents `pixee auth use <server>`, which was shipped undocumented.
- Documents the stderr note `auth token` prints when the named server is not the
one `auth use` points at, and that stdout stays exactly one token so piping is
unaffected.
- Credential resolution now names `auth use` as how the stored default is set,
rather than describing it as something that just happens.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4
… shape Catches up with two behaviours added to the CLI after the last skill commit (pixee-cli-private#37). - **Exit 2 is now uniform.** Device-flow auth failures previously exited 1 while API-key failures exited 2; both are 2 now, so an agent can branch on it without knowing which credential is in play. Said explicitly, since the whole point of the code change was to make that contract dependable. - **The confusing 401.** `server` and `token` in the config are a pair, and a device login repoints the server without touching a stored API key — so commands outside the `auth` group can send one deployment's key to another. `auth status` looks healthy while everything else 401s, which is a dead end for anyone following the old four steps. Added as step 5 with the fix, and noting that `auth login` warns on stderr when it creates the situation. - **`--json` fields named** (`configured`, `apiKey`, `sessions[]` with `server`, `isDefault`, `identity`, `tokenValid`, `canRefresh`, `expiresAt`), with a nudge to read `sessions[]` rather than parse the prose lines — agents were otherwise left to infer the shape. Skill 1.2.0 -> 1.3.0. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4
pixee/pixee-cli-private#37 grew past what this skill described. Ordinary commands no longer resolve `PIXEE_TOKEN` → stored key; they prefer the device session, so the documented precedence omitted the credential most commands actually send. - Token precedence is `--token` → device session → `PIXEE_TOKEN` → stored key. An API key outranks the session ONLY when passed explicitly on the invocation; an exported `PIXEE_TOKEN` does not, because it cannot be distinguished from a shell-profile `export`. - Dropped "unaffected by anything the device flow does". True for CI, which has no session on disk, and false on a workstation that has both — the case the reader is most likely to hit. - After `auth login`, an interactive user needs no API key at all. - `auth status` gains a `Commands will use:` line, prints only the credentials that exist, and relabels `Token:`/`Identity:` to `API key:`/`API key identity:`. Its `--json` `apiKey` is now a structured object plus a `credentialInUse` field, not rendered prose. - The split-pairing 401 is narrower: it needs no session for the current server, since otherwise the session is used instead of the mismatched key. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Punctuation only, on the lines this branch introduced: colons, semicolons, commas, or full stops in place of em dashes. No guidance changes. Pre-existing em dashes on untouched lines are left alone. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



/towards ISS-8131
Documents the CLI's new per-user device-flow authentication for coding agents, by folding it into the existing
pixee-authskill rather than shipping a second auth skill.Why a merge and not a new skill
This PR originally added
skills/pixee-o11y, on the framing that observability auth was a separate credential frompixee auth. Two things changed that:pixee o11y *intopixee auth *(pixee/pixee-cli-private#37): one credential, two surfaces.skills/pixee-o11y→skills/pixee-auth. That directory already exists and documents the API-key credential, so a literal rename would have collided. Merging is the coherent version of the same instruction.What the merged skill covers
login(both paths),token,status,logout./o11y/logs/metrics/traces endpoints.skills/pixee-o11y/is deleted and the README entry rewritten; the skill is bumped to1.1.0.Two corrections to pre-existing content
Both were already wrong in
pixee-auth/SKILL.mdbefore this PR:--tokenflag, asserting it applied only toauth login.src/index.tsdeclares--tokenglobally and it overridesPIXEE_TOKENand stored config for every subcommand.Not corrected, needs a second pair of eyes
The skill tells users to get the API key from "the admin console's API Tokens page." The PES docs (
api-access.md) andkots/config.yamlboth describe it as a single global system key under the KOTS admin console's Config → Basic Settings ("Enable Pixee API key"). "API Tokens page" looks wrong, but I could not rule out a separate User Platform surface, so I left the wording alone rather than guess in a public skill.Second pass:
--server, not a positionalThe CLI then unified its auth group on
--serverand dropped the positional deployment argument (authwas the only group where a positional named a deployment rather than the object of the verb). Every call site here was updated accordingly. Left alone, the documented examples would have told readers to run a form that no longer parses. The credential-resolution section, which described the positional as overriding everything else, is corrected too.Dependency
Merge alongside the CLI release that ships
pixee auth login | token | status | logout.🤖 Generated with Claude Code
https://claude.ai/code/session_01BH3r86Ky1Z8gBVAR3yEsw4