Raycast Script Commands

repository·master·Indexed 27 days ago

https://github.com/raycast/script-commands

A collection of examples and templates for extending Raycast functionality using scripting languages such as Bash, Python, and Swift. Includes integrations for apps and services including Agenda, Mullvad VPN, NotePlan3, Swift Playground, Pulse Secure VPN, Safari, Tailscale, Things, and DuckDuckGo Email Protection.

Tokens
119.7K
Snippets
236
Records
829
Agent score
89%

What's inside raycast-script-commands

  1. Overview of Raycast Script Commands

    master
    Raycast Script Commands allow you to execute scripts from anywhere on your desktop using keystrokes. This enables quick automation of everyday tasks such as data conversion, opening bookmarks, or triggering developer workflows. This repository serves as a collection of sample commands and documentation for creating your own scripts.
  2. System Script Commands

    master

    The system directory contains a variety of script commands for managing macOS system settings, hardware, and processes. These scripts are written in multiple languages including Bash, Swift, AppleScript, Python, and Ruby.

    Key capabilities include:

    • Hardware & Battery: Check battery info, toggle Bluetooth/Wi-Fi, manage brightness, and check AirPods/Bluetooth headphone battery levels.
    • Display & Appearance: Toggle Dark/Light mode, manage screen brightness, rotate screens, and toggle desktop icons or hidden files.
    • Process Management: Kill specific processes, find processes using high CPU/RAM, and restart the Dock or Finder.
    • File & Finder Management: Create new files, empty the trash, move downloads to trash, and rename video/picture files in bulk.
    • Audio Control: List audio devices, switch audio output, toggle microphone, and manage AirPods connectivity.
    • Network & VPN: Check network status/quality, flush DNS, and manage VPN connections via vpn or vpnutil scripts.
  3. Developer Utilities Script Commands

    master

    The developer-utils directory contains a variety of Raycast script commands designed for common developer workflows. These scripts support multiple languages including Bash, AppleScript, Python, and Node.js.

    Key categories of utilities include:

    • Encoding/Decoding: Base64 (encode/decode), URL (encode/decode), and JWT decoding.
    • Data Conversion: JSON to Go Struct, Base Converter, and JSON Stringify.
    • Security: SSH key management, Password generation (iOS style or random), and MD5 hashing.
    • Network/Web: Domain availability checks, Ping/Ping Monitor, TTFB (Time to First Byte) measurement, and Microlink API integration.
    • System/File Management: Xcode junk cleanup, .gitignore generation, and copying focused Finder window paths.
    • Formatting: Swift formatting and JSON prettifying.
  4. Navigation Script Commands

    master

    The navigation category contains various script commands to automate macOS navigation tasks. These scripts are available in multiple languages including AppleScript, Bash, and Swift.

    Key capabilities include:

    • Application Management: Hide the current application, quit an application, or restart an application.
    • Finder Navigation: Open specific folders like Applications, Desktop, Documents, Downloads, Home, or Library. Open the current Finder directory in Terminal or iTerm, and vice versa.
    • Clipboard Actions: Open a URL from the clipboard in a desktop app or browser, and open an image from the clipboard directly in Pixelmator Pro.
    • Web & Documentation Search: Search specifically within Dash or Devdocs.
  5. Developer Utilities Script Commands

    master
    The developer-utils directory contains a collection of Raycast Script Commands designed for developer workflows. These scripts cover tasks such as running bash commands, managing URLs, generating passwords, and performing text transformations. Many of these scripts are written in Bash, while others use Node.js.
  6. Use DuckDuckGo Email Protection to generate unique addresses

    master

    Once configured, this script command allows you to quickly generate two types of addresses from Raycast:

    1. Personal @duck.com addresses: Unique addresses connected to your primary email that strip tracking/analytics before forwarding.
    2. Private/Throw-away @duck.com addresses: Randomly generated addresses used for temporary purposes that forward to your actual email address.
  7. Web Search Script Commands

    master

    The repository contains a variety of script commands for performing web searches across different platforms. Many of these commands support arguments (Args: ✅) allowing you to pass queries directly from Raycast.

    Commonly supported search platforms include:

    • Developer Tools: GitHub, MDN, Stack Overflow (via various scripts), npm, PyPI, Rust (crates.io), Go (pkg.go.dev), PHP Docs, Python 3 Docs, and Swift Package Index.
    • General Search: Google, DuckDuckGo, Baidu, Yandex, Ecosia, and Wikipedia.
    • Media & Social: YouTube, Netflix, Twitter, LinkedIn, Giphy, and IMDB.
    • Specialized: arXiv (academic), Unsplash (images), and Emojipedia.

    Most scripts are written in Bash, but some use Node.js, Ruby, or AppleScript.

  8. Browse available Script Commands in the Browsing category

    master

    The browsing category contains various script commands for interacting with web browsers and URLs. These include:

    • URL Manipulation: Convert Twitter to Nitter, shorten URLs (via Shlink, Tiny URL, Bitly, GitHub, or Emojis), and peek at links using Peekalink.io.
    • Browser Control: Copy current page URLs from Safari or Chrome, copy all URLs from a Safari window, open new browser windows, or open sites in private/guest profiles.
    • Web Utilities: Take screenshots of websites using pageres, open multiple websites in Safari, and open YouTube Shorts in a standard video player by modifying the URL.
  9. DevUtils Script Commands

    master

    The apps/devutils directory contains several script commands designed for developer utilities, primarily using Bash. These scripts interact with the system clipboard to perform transformations or parsing tasks.

    Available DevUtils commands:

    • Unix Time Converter (apps/devutils/unixtime.sh): Parses and displays the UNIX timestamp string currently in your clipboard.
    • XML Beautify/Minify (apps/devutils/xmlformatter.sh): Beautifies or minifies the XML content currently in your clipboard.
    • YAML to JSON (apps/devutils/yaml2json.sh): Converts the current clipboard content from YAML format to JSON format.
  10. Explore Mood Meter Script Commands

    master

    The mood-meter category uses Node.js to manage and display mood data:

    • Add Mood: Add mood value to current or specified date (supports Arguments).
    • Display Mood Month: Displays month mood table.
    • Display Mood Year: Displays year mood table (supports Arguments).