Quick answer
OpenCode stores data in `~/.local/share/opencode` on macOS, following the XDG layout rather than the Library folder. UsageAtlas runs as a menu bar app, reads that directory, and shows tokens and cost by session and model. If the folder is missing, check `XDG_DATA_HOME` and whether OpenCode has run at least once.
Where macOS keeps it
| Item | Path |
|---|---|
| Data | `~/.local/share/opencode` |
| Config | `~/.config/opencode` |
| Custom data | `$XDG_DATA_HOME/opencode` |
| App | `/Applications/UsageAtlas.app` |
ls -la ~/.local/share/opencode
echo $XDG_DATA_HOMESet up the menu bar view
- Download the
.dmgfrom UsageAtlas and install it. - Launch and allow access to your home folder.
- Confirm OpenCode is detected.
- Open History for the daily trend.
macOS may hide dotfolders in Finder. Use the app's folder picker or press Cmd+Shift+G to go to the path directly.
What to expect
- Local token and cost history for OpenCode sessions.
- No provider balance, because that is not in the local data.
- No cloud aggregation unless you enable sync.
- Cost accuracy depends on provider-reported pricing.
OpenCode on macOS: where to look
On macOS the database lives under your home directory in a hidden application-data folder, which Finder hides. The CLI reads it directly; for a manual check, Terminal and any SQLite viewer will do.
- List the application data folder and find the OpenCode directory.
- Confirm the database file exists and changes after a session.
- Back it up before upgrading a major version.
- Point UsageAtlas at the path if auto-detection fails.
The database location guide lists the exact folder names, and the Linux guide covers the equivalent path.
Questions, answered
Where does OpenCode store data on Mac?
In ~/.local/share/opencode by default, or under XDG_DATA_HOME if set.
Does UsageAtlas support Apple silicon?
Yes. The macOS build is signed, notarized, and runs natively.
Why can I not find the OpenCode folder in Finder?
It is a hidden dotfolder. Use Go to Folder with the full path, or let the tracker detect it.