✨ feat(nerd-font-picker): add Nerd Font Picker extension#27450
✨ feat(nerd-font-picker): add Nerd Font Picker extension#27450kud wants to merge 4 commits intoraycast:mainfrom
Conversation
Greptile SummaryThis PR adds the Nerd Font Picker extension (browse/copy Nerd Font PUA glyphs rendered as SVG data URIs) and adds configurable auto-refresh intervals to four
Confidence Score: 3/5Not ready to merge — one functional P1 bug blocks users with system-wide Nerd Font installs, and a missing metadata folder blocks store submission. Two P1 findings: findFont ignores /Library/Fonts causing 'No Nerd Font found' for Homebrew users, and the missing metadata/ folder prevents store publishing. Both must be resolved before merge. extensions/nerd-font-picker/src/utils.ts (findFont font directory search), extensions/nerd-font-picker/ (missing metadata/ folder) Important Files Changed
Prompt To Fix All With AIThis is a comment left during a code review.
Path: extensions/nerd-font-picker/src/utils.ts
Line: 29-37
Comment:
**`findFont` misses system-wide font directories**
`findFont` only reads `~/Library/Fonts` (user-level). Nerd Fonts installed via Homebrew (`brew install --cask font-*`) are placed in `/Library/Fonts`, so any user with a system-wide installation will always receive the "No Nerd Font found" error. The search should fall back through at least `/Library/Fonts`.
```typescript
const findFont = (): string => {
const dirs = [
join(homedir(), "Library/Fonts"),
"/Library/Fonts",
"/System/Library/Fonts",
]
for (const dir of dirs) {
if (!existsSync(dir)) continue
const files = readdirSync(dir)
for (const suffix of ["NerdFontMono-Regular.ttf", "NerdFont-Regular.ttf"]) {
const match = files.find((f) => f.endsWith(suffix))
if (match) return join(dir, match)
}
}
return ""
}
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/nerd-font-picker/src/list.tsx
Line: 29
Comment:
**Manual `Preferences` type in `getPreferenceValues`**
The inline type `{ iconColor: string }` is a manual definition of the preference shape. Raycast auto-generates `Preferences` (and `Preferences.List`) in `raycast-env.d.ts` at build time — manually typing this can go out of sync with `package.json` and causes a lint warning.
```suggestion
const { iconColor } = getPreferenceValues<Preferences.List>()
```
**Rule Used:** What: Don't manually define `Preferences` for `get... ([source](https://app.greptile.com/review/custom-context?memory=d93fc9fb-a45d-4479-a6a4-b1b4af98ebc8))
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/nerd-font-picker/package.json
Line: 34
Comment:
**`@raycast/utils` listed as dependency but never imported**
Neither `src/list.tsx` nor `src/utils.ts` imports anything from `@raycast/utils`, making it an unused dependency that bloats the bundle and install time. Remove it unless a future use is planned.
**Rule Used:** What: Every dependency listed in package.json must... ([source](https://app.greptile.com/review/custom-context?memory=bffc60eb-f9f2-4219-b804-76e29e267d43))
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: extensions/nerd-font-picker/src/utils.ts
Line: 145-153
Comment:
**`useGlyphs` is dead code**
`useGlyphs` is exported but never imported in `list.tsx` or any other file. It's also not a React hook (it has no hooks inside it and the `use` prefix is misleading). This should be removed or actually wired up if it was meant to replace the imperative load logic in the component.
How can I resolve this? If you propose a fix, please make it concise.Reviews (1): Last reviewed commit: "📝 docs(nerd-font-picker): add extension..." | Re-trigger Greptile |
ff3f920 to
2e0861f
Compare
|
Congratulations on your new Raycast extension! 🚀 We're currently experiencing a high volume of incoming requests. As a result, 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. |
… logic - Remove unused @raycast/utils dependency - Update findFont() to check both ~/Library/Fonts and /Library/Fonts - Replace inline preference type with Preferences.List - Remove unused useGlyphs hook export - Improve error message for missing Nerd Font
Description
This PR adds the Nerd Font Picker extension — a Raycast command that lets users browse, search, and copy Nerd Font PUA glyphs (U+E000–U+F8FF) from their locally installed fonts.
Glyphs are rendered on the fly as SVG data URIs using opentype.js, so no image assets are needed. A rich detail panel shows a live preview alongside the glyph name, codepoint, Unicode escape, HTML entity, and the raw character. Copy actions cover the glyph itself, codepoint, name, and Unicode escape sequence, with an option to close Raycast immediately after copying.
A first-run cache is written to
~/.cache/nerd-font-picker/glyphs.jsonand can be refreshed at any time from the action panel. Icon colour is configurable via a hex preference (default#ffffff).Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare located outside the metadata folder if they were not generated with our metadata tool