Skip to content

brianseidman/coda-alfred-JS

Repository files navigation

CodaAlfredJS

Browse Coda in Alfred — written in JavaScript!

CodaAlfredJS

This Alfred workflow was inspired very heavily by Daniel Stieber's original CodAlfred workflow. But CodAlfred was written in PHP, and as of macOS Monterey, Apple has stopped pre-installing PHP on macOS. PHP can be reinstalled and there are methods for reenabling PHP for Alfred, but writing a new Coda/Alfred workflow in JavaScript seemed like a more direct solution — hence, CodaAlfredJS.

Easy setup:

  • 💻 Download and install the CodaAlfredJS workflow.
  • 🔐 Enter your Coda API in the "Configure Workflow" box when prompted.
  • 😀 Browse Coda via Alfred. That's it!

Usage

You will need an API access token from Coda to query your data with the Coda API. To get that token:

  • From any Coda page, choose your avatar, then the three vertical dots, and then "Account Settings" (or follow the Account Settings link).
  • Scroll to "API Settings," and generate an API token with read and write access to your docs.

Commands

Command Function
cd Lists your Coda docs. Type to narrow the list; enter to open the doc in your browser.
cdn Creates a new Coda doc. The workflow will first ask you for a name for the doc; then it will list your Coda folders for where to place the doc. After you choose the folder, the new, blank doc will open in your browser.
cda Opens your Coda doc list.
cdc Opens the Coda forums.
cdf Opens the Coda formula list.
cdapi Opens the Coda API reference.

Preferences

Under the Alfred workflow's User Configuration, doc_limit is set to 10 by default. This controls how many docs are returned by the cd command; modify this for fewer/more results.

Alfred Versioning

CodaAlfredJS is optimized for use with Alfred 5, including the Workflow Configuration function that makes it easy to set up CodaAlfredJS on the first use.

For Alfred 4 and previous, you must create a Workflow Environment Variable called api and then set your Coda API key as the variable. Note that the minimum recommended version of Alfred for using CodaAlfredJS is Alfred 5, and CodaAlfredJS is not optimized for Alfred versions below Alfred 5.

Roadmap

  • Duplicate a doc
  • Browse/modify your Coda documents from the doc to the cell level ...

Privacy

No user data is shared with me via this Alfred workflow. Your Coda API access token is not included if you duplicate or export the workflow.

Thanks