---
title: "Security and privacy"
url: https://phatdev.net/en/docs/aiusage/bao-mat
lang: en
updated: 2026-10-23
alternate:
  vi: https://phatdev.net/docs/aiusage/bao-mat
markdown: https://phatdev.net/en/docs/aiusage/bao-mat.md
---

# Security and privacy

Part of the doc set: [AIUsage](https://phatdev.net/en/docs/aiusage.md)

> What is stored and where, the widget sandbox and remote sources.

AIUsage is designed so that your data stays on your Mac. This page states what is stored, where, and what is never stored.

## Principles

- **No intermediary server.** No data is sent to a server belonging to this project. The app only calls services you have signed in to yourself: claude.ai, the Anthropic Console, OpenAI, Google and your own remote host.
- **No API keys or passwords in the source code.** The Gemini service account lives in the Keychain. The Codex token is read from Codex's own sign-in file.
- **The app does not type credentials for you.** You sign in yourself in the helper's window; the session is kept in the WebKit data store tied to the helper.

## What is stored

| Data | Where |
|---|---|
| Usage figures (percentages, costs, counts) | A JSON cache file in the user's home folder |
| claude.ai, Console and AI Studio sessions | The helper's WebKit data store |
| Gemini service account | The Keychain |
| Remote host incremental-read state | A state file in the cache folder on that machine |

The cache holds usage figures only, never the content of conversations. The Claude Code and Codex analysis only counts and groups; project and folder names are labels shown on your own Mac.

## The widget runs in a sandbox

The widget only reads the cache file and writes a trigger file when the refresh button is pressed. Everything that needs the network or a sign-in is done by the background scripts.

## Remote sources

Only read commands run on the host you list, over key-based SSH without a password prompt. Apart from the incremental state file in its cache folder, nothing is written to that machine.

## Images in this documentation

Every illustration in this documentation uses sample data.
