Skip to content

feat: cursor shim for ~/.local/bin/cursor#20

Open
ZanzyTHEbar wants to merge 35 commits intowatzon:mainfrom
ZanzyTHEbar:feat/cursor-shim
Open

feat: cursor shim for ~/.local/bin/cursor#20
ZanzyTHEbar wants to merge 35 commits intowatzon:mainfrom
ZanzyTHEbar:feat/cursor-shim

Conversation

@ZanzyTHEbar
Copy link
Contributor

Adds an optional cursor shim that delegates to cursor-installer when no Cursor binary is in PATH.

  • shim.sh: Installed as ~/.local/bin/cursor; finds real cursor in PATH, else runs cursor agent or cursor-installer with args.
  • scripts/ensure-shim.sh: Idempotent install/update; skips if existing file is already our shim; never overwrites a non-shim binary.
  • install.sh: Syncs shim + helper to ~/.local/share/cursor-installer, runs ensure-shim after placing CLI.
  • cursor.sh: Refreshes shim assets from GitHub on --update; runs ensure-shim before install/update.

Guards: only replace ~/.local/bin/cursor when it is already a shim (shebang + marker) or missing.

ZanzyTHEbar and others added 30 commits September 21, 2025 16:27
- Cursor changed their download link behaviour and now how a dynamic HTML page. These changes use HTML scraping instead of jq to grab the download link
- Refactor download info retrieval in cursor.shfix:
- temporary switch to point to my cursor installer script
- Updated FUSE installation checks and improved error handling. - Enhanced architecture verification for the Cursor AppImage and added safeguards for execution permissions.
- Ensured that the right binary version is downloaded
- revert to offcial link for pr
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: ZanzyTHEbar <45744329+ZanzyTHEbar@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Merge pull request #2 from ZanzyTHEbar/copilot/fix-xdg-open-support
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…operation

- Introduced INSTALL_MODE variable to toggle between AppImage and extracted modes.
- Implemented functions to handle extracted installations, including downloading, extracting, and creating launcher scripts.
- Updated installation and README scripts to support the new mode, enhancing usability for environments without FUSE support.
- Added interactive checks for FUSE installation, providing warnings and installation prompts based on terminal interactivity.
- Updated README to inform users about FUSE2 requirements and installation instructions.
- Refined error handling to ensure the script continues gracefully in non-interactive environments.
- Introduced color-coded logging functions in cursor.sh and install.sh for improved user experience.
- Updated installation and uninstallation scripts to utilize logging functions for better visibility of actions and errors.
- Refined README to reflect changes in installation methods and provide clearer instructions for users.
- Added pre-push hook and CI workflow to enforce canonical links and maintain repository integrity.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…bort the script. Guard the find with a directory check and neutralize non-zero status in uninstall.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…der set -e and can terminate the script. Add a directory existence check or tolerate non-zero exit

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
- Updated icon removal logic to delete all 'cursor' and legacy 'co.anysphere.cursor' icons under the hicolor theme.
- Added cleanup for now-empty directories in the icon path.
- Included a step to refresh the desktop database for improved menu visibility.
- Implemented removal of extracted installation directories and related metadata.
Merge latest changes from personal into main
…rective, causing it to fail silently

- Add desktop file reinstallation functionality

- Introduced a new function to reinstall the Cursor desktop file, allowing users to refresh the desktop entry easily.

- Updated the Exec command in the desktop file to remove quotes for better compatibility.
- Enhanced error handling for missing desktop files and added logic to create a minimal desktop entry if extraction fails.
- Ensured the desktop file is updated with the correct icon and MIME type support.
- Added a new command-line option `--reinstall-desktop` for triggering the reinstallation process.
…rective

Merge pull request #4 from ZanzyTHEbar/personal
Merge pull request #5 from ZanzyTHEbar/personal
Rename the installer CLI to cursor-installer and update docs.
Source shared lib.sh in scripts and install it alongside the CLI.
Move safe_remove and validate_path into lib.sh and
reuse them where installer-managed files are removed.
Move find_cursor_appimage into lib.sh and reuse it
in installer and uninstall scripts.
- shim.sh: ~/.local/bin/cursor shim that finds real cursor or delegates to cursor-installer
- scripts/ensure-shim.sh: detect existing shim, skip if already current, else install/update
- install.sh: sync shim + ensure-shim, run helper after placing CLI
- cursor.sh: refresh shim assets from GitHub on update; ensure_shim before install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments