Repository navigation
Add dev-servers extension - #27230
Conversation
- docs: remove em dashes, drop Known Limitations, single CHANGELOG entry - chore: add Raycast Store screenshots - chore: strip screenshot dummy data, restore live detection - chore(screenshots): dummy data + custom extension icon - chore: title-case dropdown item and empty-state title - feat: stable port detection, validated favicons, theme-tuned tag colors - feat: terminal/finder/refresh actions, tool filter, empty-state polish - feat: confirm destructive actions, surface errors, snappy restart toast - feat: detect Bun servers and pick the right package manager for restart - Add README, CHANGELOG, linting config, and UI improvements - Initial implementation of Dev Servers Raycast extension
|
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. |
Greptile SummaryThis PR adds a new
Confidence Score: 4/5The extension works correctly for projects in paths without spaces, but silently produces wrong results for any project whose directory path contains a space — a common macOS situation. The CWD extraction in FETCH_SCRIPT uses awk on lsof column output in a way that silently truncates paths containing spaces, breaking restart, Finder, and terminal actions for affected users. extensions/dev-servers/src/servers.ts — specifically the FETCH_SCRIPT constant and the lsof CWD extraction line. Important Files Changed
Prompt To Fix All With AIFix the following 2 code review issues. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 2
extensions/dev-servers/src/servers.ts:36
**`awk '$NF` truncates CWDs that contain spaces**
`lsof` column-formats its output; `awk 'NR>1 {print $NF}'` treats every whitespace-separated word as a separate field. A path like `/Users/John Doe/Projects/myapp` would be returned as just `myapp`, causing the wrong project name to display, and causing "Restart", "Open in Terminal", and "Show in Finder" to operate on the wrong (or non-existent) directory.
Use `lsof -F n` (machine-readable format, field `n` = filename) to get the full path safely: `lsof -p $PID -a -d cwd -F n 2>/dev/null | awk '/^n/ {print substr($0,2)}'`.
### Issue 2 of 2
extensions/dev-servers/CHANGELOG.md:3
The changelog uses a hardcoded date instead of the `{PR_MERGE_DATE}` placeholder that Raycast conventions require for initial release entries. The placeholder is automatically replaced with the actual merge date during publishing.
```suggestion
## [Initial Release] - {PR_MERGE_DATE}
```
Reviews (2): Last reviewed commit: "Update CHANGELOG.md and optimise images" | Re-trigger Greptile |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
Friendly bump after the auto-stale tag. The PR is ready for review when a maintainer has time. CI is green, Greptile gave 5/5 with both suggestions addressed, and image assets are optimized. Happy to address any feedback quickly. Thanks! |
|
This pull request has been automatically marked as stale because it did not have any recent activity. It will be closed if no further activity occurs in the next 7 days to keep our backlog clean 😊 |
|
I understand that the team is busy with rollout of version 2.0 beta, so here's another friendly bump to remove the auto-stale tag. |
0xdhrv
left a comment
There was a problem hiding this comment.
Thanks for your contribution @tavlean 🔥
We already have an extension in the Store that deals with this. Could we consider enhancing the existing extension below instead of creating another one?
If there are unique features or workflows you're aiming to add (project-based grouping, framework detection, lockfile-aware restart, favicon/browser actions), we'd love to hear them and see if they can be integrated into this 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 ↗
|
Hi @0xdhrv, thanks for pointing me at Port Manager. I looked at it before I started working on this extension as well. The two extensions answer different questions. Port Manager answers "what is listening on my machine, kill it": a general system utility for any port (Postgres, Docker, anything) where kill is the primary action. Dev Servers answers "what dev servers am I running, how do I manage my workflow": only surfaces processes launched via node_modules/.bin/ or the Bun runtime, groups them by project (cwd), identifies the framework (Svelte, Astro, Next, Vite), and runs a lockfile-aware restart that auto-detects npm/pnpm/yarn/bun and polls until the new server binds a port. I considered whether the dev-server features could live inside Port Manager, and they don't fit cleanly. Either every listening port row would carry dev-server-specific affordances (favicons, framework tags, project grouping, lockfile-aware restart, runtime tags), which feels out of place on a Postgres or Docker process, or Port Manager would need a "dev mode vs system mode" toggle that bifurcates its codebase and UX. Both options pull Port Manager away from the focused, intentionally clean utility it is today. The two are complementary. Reach for Port Manager when you need to inspect any listening process, kill a parent process, or assign a named label to a system service. Reach for Dev Servers during active development: switching between project contexts, restarting after dependency changes, and tracking which framework is on which port across the projects you have open. Roadmap: v1.1 adds Start Dev Server from a folder selected in Finder (auto-detects the package manager, spawns the dev script, opens the URL in the browser). v1.2 adds a menu-bar variant showing the count of running dev servers with per-server quick actions. Happy to discuss further. |
Thanks for the information 👋 We can go forward with this, but make the following changes:
|
|
Both changes done: the description now leads with the project-grouping and restart differentiators, and the README has a "How it differs from Port Manager" section. Let me know if you'd like any tweaks. |
|
Published to the Raycast Store: |
|
🎉 🎉 🎉 We've rewarded your Raycast account with some credits. You will soon be able to exchange them for some swag. |
| # non-deterministic and would flicker the displayed port across refreshes. | ||
| PORT=$(echo "$PORTS" | awk -v p=$PID '$1==p {print $2}' | sort -n | head -1) | ||
| [ -z "$PORT" ] && continue | ||
| CWD=$(lsof -p $PID -a -d cwd 2>/dev/null | awk 'NR>1 {print $NF}') |
There was a problem hiding this comment.
awk '$NF truncates CWDs that contain spaces
lsof column-formats its output; awk 'NR>1 {print $NF}' treats every whitespace-separated word as a separate field. A path like /Users/John Doe/Projects/myapp would be returned as just myapp, causing the wrong project name to display, and causing "Restart", "Open in Terminal", and "Show in Finder" to operate on the wrong (or non-existent) directory.
Use lsof -F n (machine-readable format, field n = filename) to get the full path safely: lsof -p $PID -a -d cwd -F n 2>/dev/null | awk '/^n/ {print substr($0,2)}'.
Prompt To Fix With AI
This is a comment left during a code review.
Path: extensions/dev-servers/src/servers.ts
Line: 36
Comment:
**`awk '$NF` truncates CWDs that contain spaces**
`lsof` column-formats its output; `awk 'NR>1 {print $NF}'` treats every whitespace-separated word as a separate field. A path like `/Users/John Doe/Projects/myapp` would be returned as just `myapp`, causing the wrong project name to display, and causing "Restart", "Open in Terminal", and "Show in Finder" to operate on the wrong (or non-existent) directory.
Use `lsof -F n` (machine-readable format, field `n` = filename) to get the full path safely: `lsof -p $PID -a -d cwd -F n 2>/dev/null | awk '/^n/ {print substr($0,2)}'`.
How can I resolve this? If you propose a fix, please make it concise.* Add dev-servers extension - docs: remove em dashes, drop Known Limitations, single CHANGELOG entry - chore: add Raycast Store screenshots - chore: strip screenshot dummy data, restore live detection - chore(screenshots): dummy data + custom extension icon - chore: title-case dropdown item and empty-state title - feat: stable port detection, validated favicons, theme-tuned tag colors - feat: terminal/finder/refresh actions, tool filter, empty-state polish - feat: confirm destructive actions, surface errors, snappy restart toast - feat: detect Bun servers and pick the right package manager for restart - Add README, CHANGELOG, linting config, and UI improvements - Initial implementation of Dev Servers Raycast extension * chore: address Greptile review feedback * chore: optimize PNG file sizes for icon and screenshots * docs: differentiate from Port Manager per reviewer feedback * Update CHANGELOG.md and optimise images --------- Co-authored-by: raycastbot <[email protected]>
…ADME & Store description Lead the description with the live-status differentiators and add a "How it differs from the Codex extension" README section contrasting the architectures (read-only on-disk state + hook companion vs live app-server RPC thread management), mirroring the accommodation accepted for dev-servers in raycast/extensions#27230.
Description
Adds a new extension that lists every dev server you have running, grouped by project, and lets you kill, restart, open in browser/terminal, or copy URLs without leaving Raycast.
Detection works for anything launched via node_modules/.bin/ (Vite, Next.js, Astro, SvelteKit, Nuxt, Webpack, Parcel, Gatsby, Remix, Turbo, esbuild) plus the Bun runtime. Restart automatically picks the right package manager from the project's lockfile (npm, pnpm, yarn, bun).
No external services, no analytics, no keychain access. macOS only (uses ps, lsof, /bin/zsh).
Screencast
Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder