Skip to content

Python Script Usage

Elliot Jordan edited this page Nov 30, 2020 · 5 revisions

The command-line Python script has a few more features than the Mac app, and its output might be easier to read in your Terminal app. To use it:

  1. Download and install the latest version from the releases page, or choose an older version if desired.

  2. Open Terminal and create a symlink in your path:

    [[ -d /usr/local/bin ]] || mkdir -p /usr/local/bin
    ln -s /Applications/Recipe\ Robot.app/Contents/Resources/scripts/recipe-robot /usr/local/bin/recipe-robot
    
  3. Now you can invoke Recipe Robot using the recipe-robot command, followed by your desired arguments and input. Start by reading the help:

    recipe-robot --help
    
  4. Now configure your preferred settings:

    recipe-robot --config
    

    Among the settings you'll be prompted for are:

    • Desired recipe identifier prefix (often com.github.<your_github_username>)
    • Types of recipes you wish to build (if you're not sure, start with download and pkg until you get familiar)
    • Where you wish to save the created recipes (~/Library/AutoPkg/Recipe Robot Output by default)
  5. Now you're ready to build some recipes:

    recipe-robot --verbose <input>
    

    For <input>, you can use one of several types of information:

    • The path to a Mac app.
    • The path to a zip, dmg, or pkg installer for a Mac app.
    • The URL to an app's Sparkle feed.
    • The direct download URL for an app (which usually ends with .zip or .dmg).
    • The GitHub, BitBucket, or SourceForge project URL for an app.

Here's what the Recipe Robot command-line script looks like in action. The command I used was: /Applications/Recipe\ Robot.app/Contents/Resources/scripts/recipe-robot --verbose /Applications/Mountee.app

Demo of Recipe Robot script

This animation hasn't been sped up. Recipe Robot really is that fast! Most of the time, the longest part of the process is the app download, which will depend on your individual internet connection speed.

I always use --verbose mode. It's fun to see the details, and it proves very useful for troubleshooting.

Cloning the Recipe Robot repo

If you want access to the latest in-progress features, or if you wish to contribute to the project, you can use a bleeding-edge development version of Recipe Robot. You'll need Git installed already, and then follow these steps:

  1. First, change to the directory where you'd like to store the Recipe Robot repository:

     cd ~/Developer
    
  2. Then, clone the repository:

     git clone ssh://git@github.com/homebysix/recipe-robot.git
    
  3. Switch to whichever development branch you wish to use:

     cd recipe-robot
     git checkout origin/dev
    
  4. Finally, create or modify the symlink in your PATH:

     ln -s /Users/yourname/Developer/recipe-robot/scripts/recipe-robot /usr/local/bin/recipe-robot
    

See the Development page for more information on contributing to the project.