Automation
Three ways to drive Ocelot File Manager from outside: an AI assistant through MCP, AppleScript, and Shortcuts. All three read what is open and selected, open folders and show or select items. None of them deletes, moves, renames or creates files, and none reads what is inside a file.
AI assistants (MCP)
An AI assistant that supports the Model Context Protocol (an "MCP client") can see which folders you have open in Ocelot and what is selected, can open folders and show or select items, and can switch between and close the front window's tabs. It starts ocelot-mcp, a small helper inside the app.
- Settings ▸ General ▸ AI assistants (MCP) ▸ Copy Configuration. Copying it also turns on Allow AI assistants to use Ocelot just above: while that switch is off, Ocelot answers every assistant with "turned off" and nothing else.
- Paste it into the assistant's MCP settings. Many assistants keep them in a JSON file with an
mcpServerssection; for an assistant you set up on the command line, Copy Path gives the helper's path to add as the server's command. - Restart the assistant. The first time it asks Ocelot something, macOS asks whether the assistant may control Ocelot File Manager. Allow it.
The copied configuration looks like this, with the path of your copy of the app:
{
"mcpServers" : {
"ocelot" : {
"command" : "/Applications/Ocelot File Manager.app/Contents/MacOS/ocelot-mcp"
}
}
}
The assistant gets nine tools:
| Tool | What it does |
|---|---|
get_selection | The selected items of the front window: path, name, kind, size, modification date. At most 200, with the full count. |
get_front_window | The folder the front window shows, its view, how many items are selected, and its tabs, numbered from 1 at the left. |
list_windows | Every open window: its folder, view and number of tabs. |
open_folder | Opens a folder in a new tab. Asked for several folders, the assistant opens a tab for each. |
navigate | Shows a folder in the current tab instead of a new one; Back returns to the previous folder. |
activate_tab | Switches the front window to one of its tabs, by number. |
close_tab | Closes one of the front window's tabs, by number. The last tab stays open. |
reveal | Shows files or folders selected in their folder, in a new tab. |
select | Selects items of the folder the front window shows. |
Ocelot must be running; the assistant is told so when it is not. If you declined the macOS question, the assistant gets an error that says where to allow it: System Settings ▸ Privacy & Security ▸ Automation, the assistant's entry, Ocelot File Manager.
What to know before you allow it.
- The macOS question is the boundary. An assistant you allow can ask Ocelot anything the tools offer, whenever it runs, and Ocelot answers with its own access to your files: an assistant that could not list a folder itself can learn the names of the items there through Ocelot. The tools only read names, navigate and arrange tabs; they never read a file's contents or change a file.
- File names are text the assistant reads, and a name can be written to look like an instruction to it. That is why the tools cannot move, rename or delete anything: file operations will come later, and only with a confirmation in Ocelot for each one.
- To stop every assistant at once, turn off Allow AI assistants to use Ocelot in Settings ▸ General. The switch is Ocelot's own and is off until you turn it on or copy the configuration; it also covers programs that macOS already lets control Ocelot for other reasons.
- To take the permission back from one assistant: Open Automation Settings… beside the switch (System Settings ▸ Privacy & Security ▸ Automation), or remove the entry from the assistant's settings.
AppleScript
Ocelot uses the terms and codes of Finder's dictionary, so most scripts written for Finder run here once "Finder" is replaced by "Ocelot File Manager". A script addressed to Finder always reaches Finder. Script Editor ▸ File ▸ Open Dictionary lists everything.
tell application "Ocelot File Manager"
-- the folder of the front window
set here to POSIX path of (target of front window as alias)
-- the selection as POSIX paths
set picked to {}
repeat with anItem in (selection as alias list)
set end of picked to POSIX path of anItem
end repeat
-- show a file selected in its folder, in a new tab
reveal POSIX file "/Users/me/Downloads/report.pdf"
-- a new window at a folder
make new Finder window to folder "Documents" of home
-- the view of the front window
set current view of front window to list view
end tell
The application has selection (the items selected in the front window; set it to select items that window shows), insertion location (the front window's folder), home, startup disk, Finder windows (also called windows, front first) and disks.
A Finder window has target (the folder it shows; set it to go to another folder), current view (icon view, list view or flow view; column view gives the list, as Ocelot has no column view), name, id and tabs. Each tab has its own target. Windows and tabs answer to close.
Items are folder, file and disk (folders and disks are containers): folder "Projects" of home, file "notes.txt" of folder "Desktop" of home, item 1 of target of front window. They have name, name extension, kind, size (files only), creation date, modification date, container and URL. Apps and other packages are files. as alias, as alias list and as text (a colon path such as "Macintosh HD:Users:me:") turn items into values other apps take; POSIX path of works on the alias.
Commands:
revealshows items selected in their folder, in a new tab.selectselects items of the folder the front window shows.openopens folders as tabs and shows files selected in their folder. It never launches a file in another app.make new Finder window [to folder]opens a window, at Home withoutto.activatebrings Ocelot, oractivate Finder window 2that window, to the front.existsandcountwork on items and windows;exists POSIX file "/path"looks at the disk.
Commands take references (folder "Docs" of home), files (POSIX file "/tmp"), aliases or POSIX paths as text. A folder that is not on disk, such as a server's address, is refused, and so is a list of more than 1,000 items. For a folder no window shows, Ocelot reads the disk while the script waits, at most a few seconds, and refuses folders of more than 10,000 items.
Shortcuts
Three actions, in every edition:
- Open Folder in Ocelot: opens a folder in a new tab. A file passed in is shown selected in its folder.
- Reveal in Ocelot: shows files and folders selected in their folder.
- Get Ocelot Selection: the items selected in the frontmost pane, as files, for the next action to work on.
The first two take at most 500 items. Items that are not on disk are skipped.
Also
The Services menu ("Open in Ocelot", "Reveal in Ocelot"), the ocelot command for Terminal and the role of default file manager are described in Getting started.