Skip to content

Conversation

@ayuayue
Copy link

@ayuayue ayuayue commented Jan 12, 2026

Description

Screencast

Checklist

@raycastbot
Copy link
Collaborator

Congratulations on your new Raycast extension! 🚀

Due to our current reduced availability, the initial review may take up to 10-15 business days.

Once the PR is approved and merged, the extension will be available on our Store.

@ayuayue ayuayue marked this pull request as ready for review January 12, 2026 06:28
@0xdhrv 0xdhrv assigned 0xdhrv and unassigned pernielsentikaer Jan 12, 2026
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Jan 12, 2026

Greptile Overview

Greptile Summary

This PR adds a new JWT Tool extension to Raycast that enables users to encode and decode JSON Web Tokens directly from the Raycast launcher.

What Changed:

  • New extension with two view-type commands: "Encode" and "Decode"
  • Encode command creates JWT tokens with customizable headers, payloads, and algorithms (none, HS256, HS384, HS512, RS256, RS384, RS512)
  • Decode command inspects JWT tokens with auto-prefix detection (Bearer, Token, JWT, Basic) and optional signature verification
  • Uses the jsonwebtoken library for token operations
  • Includes proper documentation, changelog, and configuration files

Integration:
The extension is self-contained and doesn't interact with other parts of the codebase. It follows standard Raycast extension patterns with Form-based UI components and proper action panels.

Confidence Score: 2/5

  • Cannot be safely merged due to missing TypeScript types and required metadata folder
  • Two blocking issues prevent safe merge: (1) Missing @types/jsonwebtoken will cause TypeScript compilation failures, and (2) Missing metadata/ folder violates extension store requirements for view-type commands. Additionally, there's a logic issue where the header option overrides the algorithm option in encode functionality.
  • package.json (missing dependency), src/encode.tsx (algorithm/header conflict)

Important Files Changed

File Analysis

Filename Score Overview
extensions/jwt-tool/package.json 3/5 Missing @types/jsonwebtoken dependency needed for TypeScript type definitions
extensions/jwt-tool/src/encode.tsx 4/5 JWT encoding implementation with potential algorithm/header mismatch and unnecessary action
extensions/jwt-tool/src/decode.tsx 5/5 JWT decoding implementation - logic appears sound
extensions/jwt-tool/CHANGELOG.md 5/5 Properly formatted changelog with initial release details
extensions/jwt-tool/README.md 5/5 Documentation covers features and usage

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

4 files reviewed, 4 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +24 to +28
"dependencies": {
"@raycast/api": "^1.103.0",
"@raycast/utils": "^2.2.1",
"jsonwebtoken": "^9.0.2"
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing @types/jsonwebtoken in devDependencies. This will cause TypeScript compilation errors since the jsonwebtoken package doesn't include built-in type definitions. Add "@types/jsonwebtoken": "^9.0.10" to devDependencies.

<ActionPanel>
<Action.SubmitForm title="Encode JWT" icon={Icon.Key} onSubmit={handleEncode} />
{encodedToken && <Action title="Copy Token" icon={Icon.Clipboard} onAction={copyToClipboard} />}
{encodedToken && <Action title="Done" icon={Icon.Checkmark} onAction={() => null} />}
Copy link
Contributor

Choose a reason for hiding this comment

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

This "Done" action does nothing (onAction={() => null}). Either remove it or implement meaningful functionality. Having a no-op action clutters the UI without providing value.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

Comment on lines +45 to +48
const token = jwt.sign(payloadObj, secret, {
algorithm: algorithm as jwt.Algorithm,
header: headerObj,
});
Copy link
Contributor

Choose a reason for hiding this comment

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

The header option overrides the algorithm option. When users select an algorithm from the dropdown but the header JSON contains a different alg field, the header takes precedence, causing confusion. Either remove the algorithm dropdown or don't pass headerObj to jwt.sign() and let the library construct the header based on the algorithm option.

Comment on lines +8 to +22
"commands": [
{
"name": "encode",
"title": "Encode",
"description": "encode jwt payload",
"mode": "view",
"subtitle": "JWT Encode"
},
{
"name": "decode",
"title": "Decode",
"description": "decode jwt payload",
"mode": "view",
"subtitle": "JWT Decode"
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Missing required metadata/ folder. Both commands use "mode": "view", which requires Raycast-styled screenshots in a metadata/ folder at the extension root. Screenshots should be named like jwt-tool-1.png, jwt-tool-2.png, etc. See: https://developers.raycast.com/basics/prepare-an-extension-for-store#screenshots

@0xdhrv
Copy link
Contributor

0xdhrv commented Jan 12, 2026

Thanks for your contribution @ayuayue 🔥

We already have multiple extensions in the Store that deal with JWT. Could we consider enhancing one of the existing extensions below instead of creating another one?

If there are unique features or workflows you’re aiming to add, we’d love to hear them and see if they can be integrated into one of these to avoid duplication and improve discoverability.

This would help avoid duplication and keep related functionality consolidated in one place.
As mentioned in our extension guidelines here ↗

@0xdhrv 0xdhrv marked this pull request as draft January 12, 2026 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants