Skip to content

docs: real How-it-works + worked example for v0.1.0#1

Merged
corvid-agent merged 1 commit into
mainfrom
polish/readme
May 22, 2026
Merged

docs: real How-it-works + worked example for v0.1.0#1
corvid-agent merged 1 commit into
mainfrom
polish/readme

Conversation

@corvid-agent

Copy link
Copy Markdown
Contributor

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/jwt actually operates.

What changed

  • How it works now describes the real mechanics: 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, and a one-liner about why the signature segment is intentionally not verified ("inspect, not trust").
  • Install calls out the runtime deps (bash, jq, base64) and notes that fledge jwt ui opens the bundled HTML via open (macOS-first; Linux users can open the printed path).
  • Usage gains a worked terminal-output example with the canonical John-Doe HS256 token so the README shows what you actually see, not just the command.
  • Development points at bin/jwt directly instead of chmod +x bin/* (only one binary in this plugin) and includes the real ui test 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)
  • All claims about the bash internals (tr '_-' '/+', padding, base64 -d/base64 -D fallback, jq pipe) cross-checked against bin/jwt

🤖 Generated with Claude Code

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>
@corvid-agent corvid-agent merged commit 4aeb243 into main May 22, 2026
3 checks passed
@corvid-agent corvid-agent deleted the polish/readme branch May 22, 2026 13:25

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md
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).

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The phrasing '(macOS — on Linux, ...)' is slightly awkward due to the nested dash. Using a semicolon or separate sentences would improve readability.

Suggested change
Requires `bash`, `jq`, and `base64` on PATH. The `ui` subcommand opens the bundled HTML with `open` (macOSon 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.

Comment thread README.md

```bash
fledge jwt decode <your-token>
fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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.

Suggested change
fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIi...
fledge jwt decode eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c

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