Skip to main content

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:

  1. Create a .env file in your working directory (or copy from .env.example)
  2. Add your Supabase credentials:
SUPABASE_URL=your_project_url
SUPABASE_SERVICE_KEY=your_service_role_key

Getting your Supabase credentials

  1. Go to https://supabase.com/dashboard
  2. Open your project → Settings → API
  3. Copy Project URL → SUPABASE_URL
  4. 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

  1. Go to https://supabase.com/dashboard
  2. Open your project → Settings → API
  3. Copy Project URL → SUPABASE_URL
  4. 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.

Metadata

Release files for supabase-user-delete-tui 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for supabase-user-delete-tui 1.0.0
File Size Uploaded Provenance Actions
supabase_user_delete_tui-1.0.0.tar.gz 22.9 kB Without provenance Details for supabase_user_delete_tui-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for supabase-user-delete-tui 1.0.0
File Interpreter ABI Platform Actions
supabase_user_delete_tui-1.0.0-py3-none-any.whl Python 3 none any Details for supabase_user_delete_tui-1.0.0-py3-none-any.whl

Total release size: 44.2 kB

Release files / supabase_user_delete_tui-1.0.0.tar.gz

Download URL supabase_user_delete_tui-1.0.0.tar.gz
Size 22.9 kB
Tags Source
SHA-256 checksum
How to use checksums
f8f701b55e3a4e8f2f33c43f66aa000425095eca983d149797a76985b56944c4
BLAKE2b-256 checksum
How to use checksums
8b8d60f1c9551acdc49776b6cd112889699e9ed4da8385d5431e14ec0bc34e30
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Release files / supabase_user_delete_tui-1.0.0-py3-none-any.whl

Download URL supabase_user_delete_tui-1.0.0-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c118b5d3650a12098c611863e69085a5dd890f73f53c35898d9f7244c15a3a87
BLAKE2b-256 checksum
How to use checksums
d3bddb7845d7577e9d08e9c5cd8caf54d5bb515938a3e84f51694909bed6d168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.7

Security for supabase-user-delete-tui 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page