Desktop app
Best for visual setup, provider health, allocations, and protection settings.
Download from GitHub Releases ↗
Docs
QuotaFence user guide
Install QuotaFence, sync a provider, give each project a weekly budget, then turn on protection. Your allocations and usage ledger stay on this device.
01
Choose the desktop app, the CLI, or both. They use the same local database, so allocations created in one appear in the other.
Best for visual setup, provider health, allocations, and protection settings.
Download from GitHub Releases ↗Best for terminal-first workflows, scripts, and managed agent launches.
npm install --global @quotafence/cliDesktop builds may be unsigned. Download only from the official release page, verify the supplied checksum, then follow your operating system’s “Open anyway” flow. Do not disable system-wide security.
02
QuotaFence reads the allowance information already available to Codex or Claude Code on your device. It does not ask you to paste provider credentials into the app.
Make sure Codex or Claude Code already works on this computer.
Choose Sync. The 5-hour and weekly windows should show their remaining percentage and reset time.
If a provider temporarily rate-limits refreshes, QuotaFence keeps the last successful checkpoint and shows its real age.
or from the terminal
qfence syncqfence status03
An allocation gives a local folder a percentage of the provider’s full weekly allowance. Five-hour limits remain provider-wide and are not divided between projects.
Select the actual project folder so QuotaFence can match work to it.
For example, 30% reserves a project budget equal to 30 percentage points of the provider’s weekly window.
QuotaFence uses unallocated quota first. If there is not enough, select another project to reduce.
qfence allocations add --provider codex --percent 30Run the command inside the project folder, or add --path /path/to/project. Use --provider claude for Claude Code.
04
Budget left and Safe quota answer different questions. This distinction prevents a low-priority project from spending quota promised to projects above it.
How much of this project’s own weekly budget has not been used.
How much can be spent now without consuming quota protected for projects above it.
Drag projects in the desktop app or use Shift+K and Shift+J in qfence top. A project can have budget left but Safe quota equal to zero when higher-priority reservations consume the provider’s remaining capacity.
05
Protection checks the current project, provider, allocation, priority, and policy before supported work begins. A warning tells you capacity is running low; Stop blocks work that would consume protected quota.
Open Settings, choose Codex or Claude Code, and enable protection. Start a new task or conversation after enabling hooks; an already-open task cannot attach newly installed hooks. Send the first prompt, then use Check now in QuotaFence.
Start the agent through QuotaFence so admission and reconciliation use the current folder’s allocation.
qfence codexqfence claudeCheck that the task belongs to the allocated folder, sync the provider, and inspect Safe quota—not only Budget left. Temporary provider refresh failures should not be treated as fresh data.
06
See all providers, allowance windows, sync age, and recent local activity.
Sync 5-hour and weekly windows, review reset times, and manage that provider’s project allocations.
Add folders, change weekly budgets, transfer quota, reorder priorities, and inspect full paths.
Configure general behavior and open provider-specific integration health and protection controls.
07
Run qfence top for the interactive dashboard. It shows allowances, projects, and history using the same data as the desktop app.
qfence statusRefresh and show allowance statusqfence allocationsList project budgets and decisionsqfence historyShow basic daily usage historyqfence hereShow the project mapped to this folderqfence policyShow the effective Warn and Stop policyqfence --helpSee the complete command reference08
The desktop activity map and qfence history use a rolling local history. Provider movement that cannot be safely mapped to one project remains unattributed instead of being guessed.
qfence historyqfence history codex --days 9009
qfence is not foundOpen a new terminal after npm installation. Confirm npm’s global binary directory is in your PATH, then run npm install --global @quotafence/cli again.
Wait briefly before syncing again. Providers can rate-limit repeated refreshes. QuotaFence displays the age of the last successful checkpoint rather than claiming stale data is current.
Create a new provider task after hooks are enabled, send its first prompt, then select Check now. Existing tasks cannot load hooks installed after they were opened.
Look at Safe quota and project priority. Higher-priority projects may reserve all currently remaining provider quota. Reorder priorities, change allocations, or wait for the weekly reset.
Run qfence here inside the folder. QuotaFence uses the most specific allocated ancestor. Remove or correct an unintended parent-folder allocation if necessary.
Still stuck? Open a GitHub issue ↗ without attaching prompts, source code, credentials, or the local database.
10
QuotaFence is local-first. The open-source core does not intentionally upload prompts, responses, source files, transcripts, provider credentials, or its SQLite ledger. Folder paths, allocations, policies, checkpoints, and basic history remain on your device.
It stores the minimum metadata needed to match a local folder to an allocation and reconcile provider-level quota movement. Provider APIs expose aggregate allowance data, so exact token usage by project is not always available.
Ready to begin?