Skip to content

The "worktray" command line tool

Open any folder as a tray straight from your terminal, like code . or cursor .

Worktray for Mac can install a worktray shell command so you can open a folder as a tray from a terminal — the same way code . or cursor . work for other editors.

  1. Open the command palette with Cmd+K.
  2. Type > to switch to command mode.
  3. Choose Install the “worktray” command line tool.

macOS will ask for your administrator password — the command is written to /usr/local/bin, which is a protected location. Once it confirms, the command is ready to use in any terminal.

Run worktray with a path:

Terminal window
worktray . # open the current folder
worktray ~/code/api # open a specific folder

Worktray opens that folder as a folder-backed tray: its files stay ordinary files on disk, and changes you make in Worktray write straight back to the folder. If the folder isn’t already open, it’s added to your trays; if it is, Worktray just brings it to the front.

The command returns immediately and leaves nothing running in your terminal — you can close the terminal window without being asked to end a process. If Worktray is already open, the folder opens in the existing window.

Remove the installed command with:

Terminal window
sudo rm /usr/local/bin/worktray

If you move or delete a folder that’s open as a tray, Worktray notices: the tray is marked Folder unavailable in the tray switcher with a Remove button, and opening it shows a notice instead of a stale, unsaveable file list. Move the folder back to pick up where you left off, or remove the tray.