A terminal UI for deleting user data from Supabase
Project description
Supabase User Delete TUI
A terminal UI for deleting user data from Supabase — runs in any terminal on Mac and Windows PowerShell.
Built with Python + Textual.
Installation
Install from PyPI (when published)
pip install supabase-user-delete-tui
Install from source
# Clone the repository
git clone https://github.com/Navi-th/user-delete-tui.git
cd user-delete-tui
# Install in development mode
pip install -e .
Quick Start
After installation, you can run the tool using:
supabase-user-delete
Or if installed locally:
python -m src.app
Configuration
Before using the tool, you need to set up your Supabase credentials:
- Create a
.envfile in your working directory (or copy from.env.example) - Add your Supabase credentials:
SUPABASE_URL=your_project_url
SUPABASE_SERVICE_KEY=your_service_role_key
Getting your Supabase credentials
- Go to https://supabase.com/dashboard
- Open your project → Settings → API
- Copy Project URL →
SUPABASE_URL - Copy service_role key (not anon!) →
SUPABASE_SERVICE_KEY
Project structure
user-delete-tui/
├── main.py ← entry point
├── requirements.txt
├── .env.example ← copy to .env and fill in credentials
├── .gitignore
├── src/
│ ├── app.py ← Textual TUI app
│ ├── db.py ← all Supabase queries
│ ├── audit.py ← audit log writer
│ └── modals.py ← confirm + mode picker dialogs
└── tests/
└── test_db.py ← unit tests
Development Setup
If you want to contribute or modify the tool:
Mac
# 1. Clone / open in Kiro
cd user-delete-tui
# 2. Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Add credentials
cp .env.example .env
# open .env and fill in SUPABASE_URL and SUPABASE_SERVICE_KEY
# 5. Run
python main.py
Windows (PowerShell)
# 1. Open PowerShell in the project folder
# 2. Create virtual environment
python -m venv .venv
.venv\Scripts\Activate.ps1
# 3. Install dependencies
pip install -r requirements.txt
# 4. Add credentials
Copy-Item .env.example .env
# open .env in notepad and fill in credentials
# 5. Run
python main.py
Windows note: if you see
cannot be loaded because running scripts is disabled, run this once:Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
Getting your Supabase credentials
- Go to https://supabase.com/dashboard
- Open your project → Settings → API
- Copy Project URL →
SUPABASE_URL - Copy service_role key (not anon!) →
SUPABASE_SERVICE_KEY
Usage
| Key | Action |
|---|---|
f |
Fetch all tables for a user_id |
m |
Open mode picker |
d |
Delete (respects current mode) |
a |
Select all rows in current table |
Escape |
Clear current selection |
Enter |
Select/deselect a row in the table |
Ctrl+C |
Quit |
Selection modes
| Mode | Behaviour |
|---|---|
| Multi-select | Toggle individual rows on/off, any number |
| Single-select | Only one row selected at a time |
| Whole table | Deletes every row in the table for that user |
Audit log
Every delete writes a JSON line to audit.log:
{
"ts": "2026-06-03T10:22:01.123456",
"kind": "rows",
"table": "results",
"user_id": "1234",
"deleted_ids": ["10", "20"],
"count": 2
}
Run tests
pip install pytest
pytest tests/
Adding a new table
Open src/db.py and add your table + its user FK column to TABLE_USER_COL:
TABLE_USER_COL = {
"your_table": "user_id", # ← add here
...
}
That's it — it will appear automatically in the sidebar on next fetch.
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 supabase_user_delete_tui-0.2.0.tar.gz.
File metadata
- Download URL: supabase_user_delete_tui-0.2.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ac23053899fb8c572b222c9972e58b713cb9f8cdd963e49b49a101bda032809
|
|
| MD5 |
24f74db932be5f98d9142ae5a2a57230
|
|
| BLAKE2b-256 |
2ce9625803d8cf4586c4e0811d5a899e9060e2d188b68f4904a9bacf8c469ad1
|
File details
Details for the file supabase_user_delete_tui-0.2.0-py3-none-any.whl.
File metadata
- Download URL: supabase_user_delete_tui-0.2.0-py3-none-any.whl
- Upload date:
- Size: 13.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5ec19fa09ed636fda0037cc0c1578d3701a86d5238d6d25cdaf22960a2afeef
|
|
| MD5 |
ef8ee0279f9756ec54fef19f3cd84495
|
|
| BLAKE2b-256 |
e93bb894bb9c796aedfa44223c5c9c8371f88b84abe76c472ab7fe181997d4a2
|