Skip to main content

Add tasks to OmniFocus from Linux

Project description

Command line to OmniFocus script, via email or Dropbox and Hazel


Using pip

  1. Install as usual from PyPI.

  2. Put a file in your $PATH with your preferred Python version.

    • I’m using /usr/local/bin/ofpy as an example, change OFPY_DEST if needed

  3. Make it executable.

Python3 Example:

pip3 install ofpy

OFPY_PATH=$(python3 -c 'import ofpy; print(str(ofpy.__path__[0]) + "/")')

echo "/usr/bin/env python3 $OFPY_PATH" > $OFPY_DEST
chmod u+x $OFPY_DEST

Python2 Example:

pip install ofpy

OFPY_PATH=$(python -c "import os; import ofpy; print(os.path.join(os.getcwd(), ofpy.__path__[0], ''))")

echo "/usr/bin/env python $OFPY_PATH" > $OFPY_DEST
chmod u+x $OFPY_DEST

It should ignore the python3 shebang in if done this way. If not, edit the shebang.


Download or git clone

cd ofpy/ofpy
chmod u+x
ln -s $PWD/ /usr/local/bin/ofpy

Set up to default to Python3 – edit the shebang in if you need Python2.


  1. Run ofpy without arguments. You should see a logging message about creating ~/.ofpy_config.

  2. Edit ~/.ofpy_config and fill in your values.


Inline from the command line.

ofpy "This is my first task."

Inline from the command line without quotes (watch out for apostrophes and quotes)

ofpy This is my second task.

Compose the task in your favorite CLI editor (set in config, defaults to vim).


More details at

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ofpy-0.21.tar.gz (4.4 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page