mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 15:18:01 +00:00
Add Allow Cursor To Be Launched From CLI as a Cursor TIL
This commit is contained in:
32
cursor/allow-cursor-to-be-launched-from-cli.md
Normal file
32
cursor/allow-cursor-to-be-launched-from-cli.md
Normal file
@@ -0,0 +1,32 @@
|
||||
# Allow Cursor To Be Launched From CLI
|
||||
|
||||
It is nice to be able to open Cursor for a specific project directly from the
|
||||
terminal like so:
|
||||
|
||||
```bash
|
||||
$ cd ~/dev/my/project
|
||||
|
||||
$ cursor .
|
||||
```
|
||||
|
||||
For the `cursor` launcher binary to be available like that, we have to find it
|
||||
and add it to the path.
|
||||
|
||||
It is probably located in the `/Applications` folder and within that nested down
|
||||
a couple directories is a `bin` directory that contains the binary we're looking
|
||||
for.
|
||||
|
||||
```bash
|
||||
ls /Applications/Cursor.app/Contents/Resources/app/bin
|
||||
bin/
|
||||
├── code*
|
||||
├── cursor*
|
||||
└── cursor-tunnel*
|
||||
```
|
||||
|
||||
The `cursor` binary is what we want, so let's add that to our path. In my case,
|
||||
I'll add this to my `~/.zshrc` file.
|
||||
|
||||
```bash
|
||||
export PATH="/Applications/Cursor.app/Contents/Resources/app/bin:$PATH"
|
||||
```
|
||||
Reference in New Issue
Block a user