Workspace Extension

I’ve started work on something I’ve been wanting Bike to do for a long time, which is have a workspace in the sidebar.

What this extension does:

  • on document open, runs a shortcuts:// URL. This points to an Apple Shortcut that runs a JavaScript that lists all .bike files inside Bike’s iCloud directory and outputs them to a JSON array to the clipboard.
  • waits for 1000ms for the shortcut to complete (usually takes way less)
  • takes the JSON array from the clipboard and populates the sidebar with links to files inside the directory using bike:// links.
  • includes Refresh workspace command to manually update workspace if new documents are added, either from the command palette or clicking the Workspace heading in the sidebar

Issues

  • relies on Apple shortcut to work (not sure if there’s currently a better way)
  • obliterates clipboard if there’s no clipboard manager/history
  • doesn’t yet support sub-directories
  • for now, lists only .bike files
  • getting some strange glitches where extension is triggered with Bike in background, not sure if related to autosave or some other process

Demo

Opening files:
workspace-demo

Refresh workspace:
CleanShot 2025-11-13 at 14.37.53

Link to source

Haven’t tested this extensively, but here’s the link if anyone wants to play with it:

1 Like

You could setup a server to perform this work. The extension could fetch a server URL, the server is local and finds the documents, and returns the results directly (JSON documents). That would avoid using the pasteboard, the hardcoded timeout, and requiring the shortcut is installed.

It would require that server is running, but with Claude code in your pocket I think this might be pretty easy to get going.

Can you explain a bit more? What do you mean by “triggered”.

(On thought, if you are doing this work when the extension is loaded, then if you are modifying (which can happen when just browsing it in Finder) the contents of Bike’s extension directory, that would cause Bike to reload all extensions, and thus re-trigger this process)

1 Like

Thanks Jesse!

Managed to get the server running and I can curl to get a good JSON response, but the extension in Bike keeps throwing HTTP Undefined errors at me. Will have to debug some more.

I think it really might have been just Finder, haven’t experienced this again (unexpectedly) after.

EDIT: Will post update to server version soon.

1 Like