This repository contains an automated installation and update script for Cursor AI IDE on Linux systems. The script handles both fresh installations and updates of the Cursor AI IDE AppImage.
- 🚀 One-command installation and updates
- 🔄 Automatic version management
- 🖥️ Desktop integration with application menu
- 🛠️ Shell integration with convenient
cursor
command - 📦 Dependency management
- 🔒 Safe update process with running instance detection
- Linux operating system
curl
(will be automatically installed if missing)sudo
privileges
- Download the installation script:
curl -O https://raw.githubusercontent.com/your-username/cursor-install-script/main/cursor-install.sh
- Make the script executable:
chmod +x cursor-install.sh
- Run the script:
./cursor-install.sh
- Checks Dependencies: Ensures required tools are installed
- Fetches Latest Version: Queries Cursor's API for the latest stable version
- Installs/Updates AppImage: Downloads and sets up the Cursor AppImage in
/opt/cursor/
- Creates Desktop Entry: Adds Cursor to your application menu
- Shell Integration: Adds a
cursor
command to your shell configuration - Version Management: Handles updates when a new version is available
After installation, you can launch Cursor AI IDE in two ways:
- From the application menu (search for "Cursor AI IDE")
- From the terminal:
cursor [path]
- Running
cursor
without arguments opens Cursor with the current directory - Running
cursor path/to/directory
opens Cursor with the specified directory
- Running
To check for and install updates, simply run the script again:
./cursor-install.sh
The script will:
- Check your current version against the latest available version
- Update only if a newer version is available
- Prevent updates while Cursor is running to ensure data safety
- AppImage:
/opt/cursor/cursor.AppImage
- Icon:
/opt/cursor/cursor.png
- Desktop Entry:
/usr/share/applications/cursor.desktop
- Shell Function: Added to your shell's RC file (
~/.bashrc
or~/.zshrc
)
- Cursor won't update: Ensure all Cursor instances are closed before updating
- Command not found: Restart your terminal or run
source ~/.bashrc
(or~/.zshrc
) - Permission denied: Ensure the script has execute permissions (
chmod +x
)
Feel free to submit issues and enhancement requests!