    PLATYPUS(1)                 General Commands Manual                PLATYPUS(1)

    NAME

         platypus – create a macOS application bundle from a command line script.

    SYNOPSIS

         platypus [OPTIONS] scriptPath [destinationPath]

    DESCRIPTION

         platypus is the command line counterpart to the Platypus Mac application.
         It creates a macOS application bundle from a command line script.  See
         https://sveinbjorn.org/platypus for details.

         platypus defaults to creating application bundles, but can also create
         Platypus profiles that are loadable by both the command line program and
         the Platypus application.

         If the scriptPath parameter is '-', script text is read from standard
         input.

         The following option flags are supported (parsed in the order in which
         they are passed):

         -O, --generate-profile
              Create a profile document instead of creating an application bundle.
              When this option is enabled, the "destinationPath" paramater (i.e.
              the final argument to the program) should have a .platypus suffix.
              If the string '-' is provided as destination path, the profile
              property list XML will be dumped to STDOUT.

         -P, --load-profile profilePath
              Loads all settings from a Platypus profile document. It is still
              necessary to specify a destination path for the application.
              Subsequent arguments can override profile settings.

         -a, --name appName
              Specifies the name of the application.  This is can be different
              from the name of the .app bundle itself, and is displayed in the
              application's menus, "About" window and Info.plist property list.

         -o, --interface-type interfaceType
              Specifies the application's interface type, which should be one of
              the following:

              'None' The application does not display any user interface except
              for Dock icon & menu.

              'Progress Bar' The application displays a progress bar while
              running.

              'Text Window' The application displays a window with a text field
              with all script output.

              'Web View' The application displays a window with a web view which
              renders script output as HTML.

              'Status Menu' The application displays a status menu item in the
              menubar which runs the script and displays its output when clicked.

              'Droplet' The application displays a droplet window for dropping
              files on for processing by the script.

              The default interface type is 'Text Window'.

         -i, --app-icon iconPath
              Specifies a file to use as the icon for the application bundle. The
              file must be an Apple .icns file. If not specified, the default
              Platypus app icon will be used. If specified, but left empty (''),
              no application icon will be set for the app.

         -Q, --document-icon iconPath
              Specifies a file to use as icon for the application's documents.
              Must be an Apple .icns file.

         -p, --interpreter interpreterPath
              Sets script interpreter (e.g. /usr/bin/python or /bin/sh). If the
              interpreter is not specified, the command line tool will try to
              guess the correct interpreter. If this fails, the default shell
              interpreter /bin/sh is used.

         -V, --app-version version
              Sets the application bundle's version. This is displayed in the
              Info.plist property list and About window.

         -u, --author authorName
              Sets the name of the application author (e.g. "Apple Computer" or
              "John Smith").  If not specified, this defaults to the current
              user's full user name.

         -f, --bundled-file filePath
              Specifies a file to be bundled with the application. The file will
              be copied over to the Resources folder of the application bundle,
              which is the same folder in which the script runs. Any number of
              files can be bundled in this way.

         -I, --bundle-identifier bundleIdentifier
              Sets the application's bundle identifier. An application identifier
              is a reverse DNS name (e.g. com.apple.iTunes) that uniquely
              identifies the application. If this option is left empty, it will
              default to an identifier of the format "org.username.appname" (e.g.
              org.sveinbjorn.Platypus).

         -A, --admin-privileges
              This flag makes the application request administrator privileges via
              Apple's Security Framework (i.e. prompt for a password) and then
              executes the script with those privileges. For details on the nature
              of these privileges, see the Apple documentation for the
              AuthorizationExecuteWithPrivileges() in Security.framework. This is
              not strictly equivalent to running as root.

         -D, --droppable
              Makes the application droppable, i.e. capable of receiving dragged
              and dropped files as arguments to the script. The application
              bundle's property list is modified so that it can receive dropped
              files in the Dock and Finder. These files are then passed on to the
              script as arguments.

         -F, --text-droppable
              Makes the application text droppable, i.e. makes it accept dragged
              text snippets, which are then passed to script via STDIN.

         -N, --service
              Makes the app register as a Dynamic Service accessible from the
              Services application submenu.

         -B, --background
              This option causes the application to run in the background so its
              icon will not appear in the Dock.  This is done by registering the
              application with LaunchServices as a user interface element
              (LSUIElement).

         -R, --quit-after-execution
              This option makes the application quit once the script has been
              executed.

         -X, --suffixes suffixes
              Only relevant if the application accepts dropped files. This flag
              specifies the file suffixes (e.g. .txt, .wav) that the application
              can open. This should be a |-separated string (e.g. "txt|wav|jpg").

         -T, --uniform-type-identifiers utis
              Only relevant if the application accepts dropped files. This flag
              specifies the Uniform Type Identifiers (UTIs) that the application
              can open.  This should be a |-separated string (e.g.
              "public.item|public.folder"). Suffixes are ignored if this flag is
              used.

         -U, --uri-schemes schemes
              Set application as handler for URI schemes. These can be either
              standard URI schemes such as http or custom URI schemes of your
              choice. See documentation for details. Multiple items should be a
              |-separated string (e.g. "ftp|myscheme|someotherscheme").

         -Z, --file-prompt
              Show an Open File dialog when the application launches.

         -G, --interpreter-args arguments
              Arguments for the script interpreter.  These should be specified as
              a |-separated string (e.g. '-w|-s|-l').

         -C, --script-args arguments
              Arguments for the script.  These should be specified as a
              |-separated string (e.g. '-w|-s|-l').

         -b, --text-background-color hexColor
              Set background color of text (e.g. #ffffff).

         -g, --text-foreground-color hexColor
              Set foreground color of text (e.g. #000000).

         -n, --text-font fontName
              Set font and font size for text view (e.g. 'Monaco 10').

         -K, --status-item-kind kind
              For Status Menu interface type only.  Set display kind for Status
              Menu interface type.  This can be "Text" or "Icon".

         -Y, --status-item-title title
              For Status Menu interface type only.  Set the display title for the
              status item in Status Menu interface type.

         -L, --status-item-icon imagePath
              For Status Menu interface type only.  Set the icon image for the
              status item in Status Menu interface type. Must be an image file in
              one of the formats supported by the Cocoa APIs (e.g. PNG, JPEG, TIFF
              etc.)

         -c, --status-item-sysfont
              For Status Menu interface type only. Makes menu use system font
              instead of user-defined styling.

         -d, --symlink
              A symlink to the original script is created inside the application
              bundle instead of copying the script over. Symlinks are also created
              to any bundled files.

         -l, --optimize-nib
              Strip the bundled application nib file to reduce its size. Makes the
              nib uneditable. Only works if Apple's Xcode is installed.

         -y, --overwrite
              Overwrite any pre-existing files or folders in destination path.

         -v, --version
              Print the version of this program

         -h, --help
              Print help and usage string

         Exits 0 on success, and >0 if an error occurs.

    FILES

         /opt/local/bin/platypus                         program binary
         /opt/local/share/platypus/ScriptExec            executable binary
         /opt/local/share/platypus/MainMenu.nib          nib file for app
         /opt/local/share/platypus/PlatypusDefault.icns  default icon

    EXAMPLES

         platypus -P myProfile.platypus ~/Desktop/MyApplication.app

         platypus -o 'Text Window' script.pl PerlScript.app

         platypus -a 'My App' -p /usr/bin/python myPythonScript.py

         platypus -D -a MyDroplet -o 'Droplet' ~/droplet.sh

    AUTHORS

         Sveinbjorn Thordarson <sveinbjorn@sveinbjorn.org>

    Darwin                         January 18, 2022                         Darwin