docs: real How-it-works + worked example for v0.1.0#1
Conversation
The previous "How it works" section was the scaffold's generic "replace the starter bash stub with any language" paragraph — accurate for the template, meaningless for a published plugin. Replace with text that describes how bin/jwt actually operates: base64url ↔ base64 conversion via `tr '_-' '/+'` plus padding, dual `base64 -d` / `base64 -D` fallback so it works on both Linux and macOS, pipe through `jq` for color JSON, no signature verification by design (inspect-not-trust). While in there: - Call out the `jq` + `base64` + `bash` runtime deps under Install, and note that `fledge jwt ui` uses `open` (macOS-first; Linux users can open the printed path). - Add a worked terminal-output example with the canonical John-Doe HS256 token so the README shows what you actually see, not just the command. - Polish the dev block to point at `bin/jwt` directly instead of `chmod +x bin/*` (only one binary in this plugin) and add the real `ui` test command. No code or plugin.toml changes. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request updates the README.md to provide more detailed information about the plugin's features, requirements, and internal workings. It includes specific examples of CLI output and clarifies platform-specific behavior for the web inspector. Feedback focuses on improving the readability of the installation instructions and providing a complete, valid JWT example for the usage section to ensure the documentation is actionable.
| fledge plugins install CorvidLabs/fledge-plugin-jwt | ||
| ``` | ||
|
|
||
| Requires `bash`, `jq`, and `base64` on PATH. The `ui` subcommand opens the bundled HTML with `open` (macOS — on Linux, open the file path it prints in your browser). |
There was a problem hiding this comment.
The phrasing '(macOS — on Linux, ...)' is slightly awkward due to the nested dash. Using a semicolon or separate sentences would improve readability.
| Requires `bash`, `jq`, and `base64` on PATH. The `ui` subcommand opens the bundled HTML with `open` (macOS — on Linux, open the file path it prints in your browser). | |
| Requires bash, jq, and base64 on PATH. The ui subcommand opens the bundled HTML with open on macOS; on Linux, it prints the file path to be opened manually in a browser. |
|
|
||
| ```bash | ||
| fledge jwt decode <your-token> | ||
| fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi... |
There was a problem hiding this comment.
The example JWT is truncated with ..., which makes the command invalid if copied and pasted. Providing a full, valid token allows users to test the command immediately and see the results described in the next section.
| fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi... | |
| fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c |
Summary
The previous "How it works" section was the scaffold's generic "replace the starter bash stub with any language" paragraph — accurate for the template, meaningless for a published plugin. Replace with text that describes how
bin/jwtactually operates.What changed
tr '_-' '/+'plus padding, dualbase64 -d/base64 -Dfallback so it works on both Linux and macOS, pipe throughjqfor color JSON, and a one-liner about why the signature segment is intentionally not verified ("inspect, not trust").bash,jq,base64) and notes thatfledge jwt uiopens the bundled HTML viaopen(macOS-first; Linux users can open the printed path).bin/jwtdirectly instead ofchmod +x bin/*(only one binary in this plugin) and includes the realuitest command.No code or plugin.toml changes.
Test plan
./bin/jwt decode <sample>produces the output shown in the README./bin/jwt(no args) prints the usage that matches the documented subcommands./bin/jwt decode "not-a-jwt"errors with the format check (matches the no-signature-verification claim — only structural check happens)tr '_-' '/+', padding,base64 -d/base64 -Dfallback,jqpipe) cross-checked againstbin/jwt🤖 Generated with Claude Code