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.
Install the command
Section titled “Install the command”- Open the command palette with Cmd+K.
- Type
>to switch to command mode. - 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.
Open a folder
Section titled “Open a folder”Run worktray with a path:
worktray . # open the current folderworktray ~/code/api # open a specific folderWorktray 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.
Uninstall the command
Section titled “Uninstall the command”Remove the installed command with:
sudo rm /usr/local/bin/worktrayIf a folder goes missing
Section titled “If a folder goes missing”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.