alfred-open-in-cursor
v1.0.0
Published
Alfred workflow to open in Cursor
Maintainers
Readme
Alfred Open in Cursor
Alfred workflow to quickly open projects in Cursor.
Fork notice: This project is a fork of vivaxy/alfred-open-in-vscode, originally created by vivaxy. It has been updated to work with Cursor, including opening projects in classic editor mode via the
--classicflag.
Features
- Fuzzy search projects from a configurable glob pattern
- Open the selected project in Cursor (classic editor, new window)
- Open the current Finder folder in Cursor
- Project list refreshes automatically while you type
Requirements
- Alfred 4 or 5 with Powerpack
- Cursor for macOS
- Node.js 22 or later (used by the workflow script filter)
Installation
Install from npm (recommended)
Requires Node.js and Alfred with Powerpack.
npm i -g alfred-open-in-cursorThis installs the workflow globally and links it into Alfred via Alfy.
Then configure it in Alfred:
Open Alfred → Workflows
Select Open in Cursor
Click the
[x]configuration buttonSet Project directories to a glob pattern for your projects, for example:
/Users/me/Developer/*Optionally set Cursor CLI path if auto-detection does not work on your machine
Try it: type cursor followed by a space in Alfred to search for a project.
To update later:
npm update -g alfred-open-in-cursorTo uninstall:
npm uninstall -g alfred-open-in-cursornpm deprecation warnings
npm i -g alfred-open-in-cursor may print deprecation warnings for packages such as xmldom, rimraf, glob, and inflight. These come from older transitive dependencies in Alfy and its bundled alfred-link / alfred-notifier packages. They are install-time notices only and do not affect the workflow after installation. The warnings should disappear once upstream merges dependency updates.
Install from source
For local development or contributing:
git clone https://github.com/nlivingstone/alfred-open-in-cursor.git
cd alfred-open-in-cursor
npm install
npm i -g .A global install (npm i -g .) is required; a local-only npm install does not link the workflow to Alfred.
Configuration
Open Alfred → Workflows → Open in Cursor and click the [x] configuration button.
Set Project directories to a glob pattern that matches your project folders, for example:
/Users/me/Developer/*That would match projects like /Users/me/Developer/alfred-open-in-cursor and /Users/me/Developer/my-app.
Optionally set Cursor CLI path if Cursor is installed in a non-standard location. Leave it blank to auto-detect from:
/Applications/Cursor.app~/Applications/Cursor.appcursoron yourPATH(for example/usr/local/bin/cursor)
Usage
| Trigger | Action |
| --- | --- |
| cursor + space | Search projects and press Return to open the selected project in Cursor |
| cursor (no space) | Open the frontmost Finder window folder in Cursor |
Projects are opened with:
cursor --classic -n /path/to/projectThis opens a new classic editor window rather than focusing an existing Cursor window.
Troubleshooting
Type
cursor DEBUGin the script filter to show debug info (Node version, etc.).If the script filter returns no results, confirm Project directories is set in the workflow configuration.
If projects do not open in Cursor, verify the CLI is installed in Cursor with Shell Command: Install "cursor" command in PATH, or set Cursor CLI path manually in the workflow configuration.
Test Cursor detection from the terminal:
./bin/find-cursor-cli.sh ./open-project.sh /path/to/projectAfter editing workflow files locally, reload the workflow in Alfred (right-click → Reload).
To reinstall from npm:
npm i -g alfred-open-in-cursor
Development
npm install
npm testTest opening a project from the terminal:
./open-project.sh /path/to/projectSee the Releasing wiki page for version bumps, GitHub releases, and npm publishing.
Related
- vivaxy/alfred-open-in-vscode — original Alfred workflow for Visual Studio Code
- vivaxy/alfred-open-in-webstorm — same idea for WebStorm
- Alfy — framework this workflow is built on
- Alfred 4 Workflow Open in VSCode — article about the original workflow
License
GPL-3.0-or-later. See LICENSE and NOTICE.
This project is a modified work based on alfred-open-in-vscode by vivaxy. The original work is copyright vivaxy; modifications are copyright Neil Livingstone.
