From da585ec5a4ad34353226cb57565e60b162ec84a7 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Mon, 27 Oct 2025 21:37:59 -0500 Subject: [PATCH] Add Allow Cursor To Be Launched From CLI as a Cursor TIL --- README.md | 6 +++- .../allow-cursor-to-be-launched-from-cli.md | 32 +++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 cursor/allow-cursor-to-be-launched-from-cli.md diff --git a/README.md b/README.md index c49fc96..9b25d04 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1669 TILs and counting..._ +_1670 TILs and counting..._ See some of the other learning resources I work on: @@ -205,6 +205,10 @@ If you've learned something here, support my efforts writing daily TILs by - [Style A Background With A Linear Gradient](css/style-a-background-with-a-linear-gradient.md) - [Using Maps In SCSS](css/using-maps-in-scss.md) +### Cursor + +- [Allow Cursor To Be Launched From CLI](cursor/allow-cursor-to-be-launched-from-cli.md) + ### Deno - [Read In The Contents Of A File](deno/read-in-the-contents-of-a-file.md) diff --git a/cursor/allow-cursor-to-be-launched-from-cli.md b/cursor/allow-cursor-to-be-launched-from-cli.md new file mode 100644 index 0000000..354c7d2 --- /dev/null +++ b/cursor/allow-cursor-to-be-launched-from-cli.md @@ -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" +```