Streamlit app for managing Windsurf credit caps
Project description
Windsurf Credit Throttle
A Streamlit application for managing Windsurf add-on credit caps.
Features
- Verify Credit Caps: Check team-level and individual user credit configurations
- Set Team Cap: Configure organization-wide add-on credit limits
- Set Individual Caps: Set custom caps for specific users or bulk import from CSV
Installation
Using uvx (recommended)
# Run directly from GitHub
uvx --from git+https://github.com/PFPT-Internal/windsurf-throttle windsurf-throttle
# Or from PyPI (when published)
uvx windsurf-throttle
Using pip
pip install windsurf-throttle
windsurf-throttle
From source
git clone https://github.com/PFPT-Internal/windsurf-throttle.git
cd windsurf-throttle
uv sync
uv run windsurf-throttle
Configuration
Set your Windsurf service key as an environment variable:
export WINDSURF_SERVICE_KEY=your_service_key_here
Or create a .env file in your working directory:
WINDSURF_SERVICE_KEY=your_service_key_here
Optional Configuration
# Override the API base URL (default: https://server.codeium.com)
export WINDSURF_BASE_URL=https://custom.server.com
Usage
Running the App
# Using the CLI
windsurf-throttle
# Or run Streamlit directly
streamlit run src/windsurf_throttle/app.py
Credit Cap Strategy
The app implements the following strategy:
- Base Credits: Each user gets 500 base credits
- Organization Cap: Set a default add-on cap for all users (e.g., 1000)
- Individual Caps: For high-usage users, set individual caps = current add-on usage + buffer
Example:
- User with 1200 total credits used → 700 add-on credits used
- Individual cap = 700 + 500 buffer = 1200 add-on credits
- Total available = 500 base + 1200 add-on = 1700 credits
Bulk CSV Import
Upload a CSV with these columns:
email(required): User email addresscredits_used(required): Current total credit usagename(optional): User display name
Development
# Clone and install dev dependencies
git clone https://github.com/PFPT-Internal/windsurf-throttle.git
cd windsurf-throttle
uv sync --all-extras
# Run tests
uv run pytest
# Run linting
uv run ruff check src tests
uv run mypy src
# Install pre-commit hooks
uv run pre-commit install
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file windsurf_throttle-1.0.1.tar.gz.
File metadata
- Download URL: windsurf_throttle-1.0.1.tar.gz
- Upload date:
- Size: 101.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9645dd3aa31a3c4ca518ef379a67d9c80a6328042ed61ba2096299ed1f97db65
|
|
| MD5 |
7b2795e3d5ddab9cd9d992da1f0cf52e
|
|
| BLAKE2b-256 |
a55f0ab21d1fddf59ef4fca6cddc60defbe8565d1f80008c97e08e22e6848edd
|
Provenance
The following attestation bundles were made for windsurf_throttle-1.0.1.tar.gz:
Publisher:
publish.yml on rappdw/windsurf-throttle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
windsurf_throttle-1.0.1.tar.gz -
Subject digest:
9645dd3aa31a3c4ca518ef379a67d9c80a6328042ed61ba2096299ed1f97db65 - Sigstore transparency entry: 872260039
- Sigstore integration time:
-
Permalink:
rappdw/windsurf-throttle@e16af64ed0a82ea3017d41debd648b631eff397e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rappdw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e16af64ed0a82ea3017d41debd648b631eff397e -
Trigger Event:
release
-
Statement type:
File details
Details for the file windsurf_throttle-1.0.1-py3-none-any.whl.
File metadata
- Download URL: windsurf_throttle-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d485cd4afc7a1166ecddf34ce5c439e049a39e1fe0906ab88467dfb9d2d24140
|
|
| MD5 |
68945ba7bb4757cffc79c3be032c48b4
|
|
| BLAKE2b-256 |
ffba92f7476f6d13b363d567e20c70b6b6feef01f73717a4d47eb98682f2e9d5
|
Provenance
The following attestation bundles were made for windsurf_throttle-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on rappdw/windsurf-throttle
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
windsurf_throttle-1.0.1-py3-none-any.whl -
Subject digest:
d485cd4afc7a1166ecddf34ce5c439e049a39e1fe0906ab88467dfb9d2d24140 - Sigstore transparency entry: 872260044
- Sigstore integration time:
-
Permalink:
rappdw/windsurf-throttle@e16af64ed0a82ea3017d41debd648b631eff397e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/rappdw
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e16af64ed0a82ea3017d41debd648b631eff397e -
Trigger Event:
release
-
Statement type: