feat: browser login + table views + colour + release-plz - #1
Merged
Conversation
Replaces the v1 cookie-paste flow with a proper loopback OAuth handshake (the gh / vercel CLI pattern). `wk login` binds an ephemeral 127.0.0.1 port, opens the browser to <platform>/cli-login, and waits for the platform to redirect back with a freshly minted `wkcli_…` bearer token — no more "open dev tools and copy the cookie". - Hand-rolled single-shot loopback HTTP listener (std::net) with a random CSRF state and a 5 minute deadline. - `--no-browser` falls back to printing the URL (works over SSH with a port-forward); `--token` / `WK_TOKEN` skips the dance for CI. - `wk logout` now best-effort revokes the token server-side via /api/auth/cli/tokens/revoke-current before clearing the local file. - Auth config grows a `token` field; the legacy `session_cookie` is still read so existing installs keep working until the next login. - README rewritten around the new flow. Requires the matching wavekat-platform changes (cli_tokens table, bearer-token middleware, /cli-login SPA route). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Match the convention used by wavekat-turn / wavekat-core / wavekat-vad. The banner SVG (`wavekat-cli-narrow.svg`) needs to be added to wavekat-brand/assets/banners/ — the link will 404 until then. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The wavekat-cli repo (and crates.io page) is public, but wavekat-platform is private — external readers hitting the GitHub link got a 404. Point at the public platform URL instead, and drop the dangling docs/06-export.md link from the "What's next" section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Raw JSON dumps weren't pulling their weight at the terminal. Match the shape of `projects list`: print a compact table by default and add a `--json` flag for piping into jq. - `wk annotations list` now prints `ID FILE LABEL RANGE REVIEW`. Add `--asr` to inline the ASR snippet under each row when you want to read the labels rather than script over them. - `wk projects show` prints a labelled summary; `--json` keeps the raw response for scripts. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- annotations list: drop the --asr flag; the snippet (truncated to 96 chars) is printed under every row. The whole point of looking at annotations in a terminal is the language, not the IDs. - annotations / projects list: when more pages exist, print a ready-to-copy "Next: wk … --page N" line under the page summary so pagination is discoverable without a trip to --help. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a tiny `style` module (raw ANSI, no extra crate) and threads it through every command. Output is automatically plain when stdout isn't a TTY or when `NO_COLOR` is set, so piping into jq / files / other tools keeps working unchanged. `CLICOLOR_FORCE=1` forces colour back on for CI captures. Where the colour shows up: - `wk me` / login / logout: dim labels, role tinted (root=magenta, user=green, none=yellow), green ✓ on success. - `wk projects list`: bold headers, dim ids and timestamps; `show` highlights the project name, dims metadata. - `wk annotations list`: bold headers, cyan label cell, dim id / range / ASR snippet, review status coloured by outcome (approved=green, rejected=red, needs_fix=yellow, unreviewed=dim). Padding is applied to raw bytes before styling so column alignment isn't broken by the ANSI escape codes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Char-count truncation overshoots in CJK content because each glyph takes two terminal columns. Switch to a unicode-width truncation capped at 80 visible columns, so Chinese / Japanese / Korean ASR snippets wrap at the same on-screen width as Latin ones. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ANSI escape codes count toward byte length but not toward visible
column width, so wrapping the id in `style::dim(...)` and *then*
asking `{:<38}` to pad it shrunk the visible cell to 36 cols and
pulled the NAME / CREATED headers two cols out of alignment. Pad
the raw string first, then style — same fix already applied to the
annotations table.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
`wk -V` keeps the terse `wk 0.0.1` form. `wk --version` adds the package name, description, and repository URL so output pasted into a bug report carries enough context on its own. Sourced from the standard CARGO_PKG_* env vars so it stays in sync with Cargo.toml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
clap defaults to a short/long split on the version flag (the rustc convention from many years ago), but in practice rustc and cargo both print the same string regardless. Drop the split and emit the full version block for both forms — fewer surprises, easier to remember. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Mirrors the wavekat-core / wavekat-turn / wavekat-vad setup. On every push to main, release-plz opens (or updates) a release PR that bumps the version + writes the CHANGELOG. Merging that PR triggers the release job, which tags, creates a GitHub Release, and publishes to crates.io. Requires `CARGO_REGISTRY_TOKEN` to be set in the repo's Actions secrets (https://crates.io/me → "API Tokens" with publish-new + publish-update scope on `wavekat-cli`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (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.
Summary
Requires
Test plan
🤖 Generated with Claude Code