---
slug: "pi-usage"
source_type: "readme"
source_url: "https://cdn.jsdelivr.net/gh/iefnaf/pi-usage@master/README.md"
repo: "https://github.com/iefnaf/pi-usage"
source_file: "README.md"
branch: "master"
---
# pi-usage

A lightweight pi extension that provides a single `/usage` command to display the **current provider's** daily and weekly usage limits.

## Install

```
pi install npm:pi-usage
```

## Usage

In pi, type:

```
/usage
```

A panel appears showing the current provider's daily and weekly limits with progress bars. Press Enter or Escape to close.

## Supported Providers

| Provider | Auth Method |
|----------|-------------|
| Codex (OpenAI) | OAuth (`/login`) |
| Anthropic (Claude) | OAuth (`/login`) |
| Z.AI | API key |
| Gemini CLI | OAuth (`/login`) |
| Antigravity (Google) | OAuth (`/login`) |

## Credits

The usage fetching, auth handling, and provider detection logic are adapted from [pi-usage-bars](https://github.com/ajarellanod/pi-usage-bars) by [@ajarellanod](https://github.com/ajarellanod). Many thanks for the excellent work that made this lightweight version possible.

## License

MIT
