supabase-user-delete-tui 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Navi-th
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include README.md
2
+ include LICENSE
3
+ include requirements.txt
4
+ recursive-include src *.py
@@ -0,0 +1,236 @@
1
+ Metadata-Version: 2.4
2
+ Name: supabase-user-delete-tui
3
+ Version: 0.1.0
4
+ Summary: A terminal UI for deleting user data from Supabase
5
+ Home-page: https://github.com/Navi-th/user-delete-tui
6
+ Author: Navi-th
7
+ Author-email: Navi <navi@rareminds.in>
8
+ License: MIT
9
+ Project-URL: Homepage, https://github.com/Navi-th/user-delete-tui
10
+ Project-URL: Repository, https://github.com/Navi-th/user-delete-tui
11
+ Project-URL: Issues, https://github.com/Navi-th/user-delete-tui/issues
12
+ Classifier: Development Status :: 3 - Alpha
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Software Development :: User Interfaces
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Operating System :: OS Independent
23
+ Requires-Python: >=3.8
24
+ Description-Content-Type: text/markdown
25
+ License-File: LICENSE
26
+ Requires-Dist: textual==0.59.0
27
+ Requires-Dist: supabase==2.12.0
28
+ Requires-Dist: python-dotenv==1.0.0
29
+ Dynamic: author
30
+ Dynamic: home-page
31
+ Dynamic: license-file
32
+ Dynamic: requires-python
33
+
34
+ # Supabase User Delete TUI
35
+
36
+ A terminal UI for deleting user data from Supabase — runs in any terminal
37
+ on **Mac** and **Windows PowerShell**.
38
+
39
+ Built with Python + [Textual](https://textual.textualize.io/).
40
+
41
+ ---
42
+
43
+ ## Installation
44
+
45
+ ### Install from PyPI (when published)
46
+
47
+ ```bash
48
+ pip install supabase-user-delete-tui
49
+ ```
50
+
51
+ ### Install from source
52
+
53
+ ```bash
54
+ # Clone the repository
55
+ git clone https://github.com/Navi-th/user-delete-tui.git
56
+ cd user-delete-tui
57
+
58
+ # Install in development mode
59
+ pip install -e .
60
+ ```
61
+
62
+ ### Quick Start
63
+
64
+ After installation, you can run the tool using:
65
+
66
+ ```bash
67
+ supabase-user-delete
68
+ ```
69
+
70
+ Or if installed locally:
71
+
72
+ ```bash
73
+ python -m src.app
74
+ ```
75
+
76
+ ---
77
+
78
+ ## Configuration
79
+
80
+ Before using the tool, you need to set up your Supabase credentials:
81
+
82
+ 1. Create a `.env` file in your working directory (or copy from `.env.example`)
83
+ 2. Add your Supabase credentials:
84
+
85
+ ```env
86
+ SUPABASE_URL=your_project_url
87
+ SUPABASE_SERVICE_KEY=your_service_role_key
88
+ ```
89
+
90
+ ### Getting your Supabase credentials
91
+
92
+ 1. Go to https://supabase.com/dashboard
93
+ 2. Open your project → **Settings** → **API**
94
+ 3. Copy **Project URL** → `SUPABASE_URL`
95
+ 4. Copy **service_role** key (not anon!) → `SUPABASE_SERVICE_KEY`
96
+
97
+ ---
98
+
99
+ ## Project structure
100
+
101
+ ```
102
+ user-delete-tui/
103
+ ├── main.py ← entry point
104
+ ├── requirements.txt
105
+ ├── .env.example ← copy to .env and fill in credentials
106
+ ├── .gitignore
107
+ ├── src/
108
+ │ ├── app.py ← Textual TUI app
109
+ │ ├── db.py ← all Supabase queries
110
+ │ ├── audit.py ← audit log writer
111
+ │ └── modals.py ← confirm + mode picker dialogs
112
+ └── tests/
113
+ └── test_db.py ← unit tests
114
+ ```
115
+
116
+ ---
117
+
118
+ ## Development Setup
119
+
120
+ If you want to contribute or modify the tool:
121
+
122
+ ### Mac
123
+
124
+ ```bash
125
+ # 1. Clone / open in Kiro
126
+ cd user-delete-tui
127
+
128
+ # 2. Create virtual environment
129
+ python3 -m venv .venv
130
+ source .venv/bin/activate
131
+
132
+ # 3. Install dependencies
133
+ pip install -r requirements.txt
134
+
135
+ # 4. Add credentials
136
+ cp .env.example .env
137
+ # open .env and fill in SUPABASE_URL and SUPABASE_SERVICE_KEY
138
+
139
+ # 5. Run
140
+ python main.py
141
+ ```
142
+
143
+ ### Windows (PowerShell)
144
+
145
+ ```powershell
146
+ # 1. Open PowerShell in the project folder
147
+
148
+ # 2. Create virtual environment
149
+ python -m venv .venv
150
+ .venv\Scripts\Activate.ps1
151
+
152
+ # 3. Install dependencies
153
+ pip install -r requirements.txt
154
+
155
+ # 4. Add credentials
156
+ Copy-Item .env.example .env
157
+ # open .env in notepad and fill in credentials
158
+
159
+ # 5. Run
160
+ python main.py
161
+ ```
162
+
163
+ > **Windows note:** if you see `cannot be loaded because running scripts is disabled`,
164
+ > run this once: `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`
165
+
166
+ ---
167
+
168
+ ## Getting your Supabase credentials
169
+
170
+ 1. Go to https://supabase.com/dashboard
171
+ 2. Open your project → **Settings** → **API**
172
+ 3. Copy **Project URL** → `SUPABASE_URL`
173
+ 4. Copy **service_role** key (not anon!) → `SUPABASE_SERVICE_KEY`
174
+
175
+ ---
176
+
177
+ ## Usage
178
+
179
+ | Key | Action |
180
+ |-----------|-------------------------------------|
181
+ | `f` | Fetch all tables for a user_id |
182
+ | `m` | Open mode picker |
183
+ | `d` | Delete (respects current mode) |
184
+ | `a` | Select all rows in current table |
185
+ | `Escape` | Clear current selection |
186
+ | `Enter` | Select/deselect a row in the table |
187
+ | `Ctrl+C` | Quit |
188
+
189
+ ### Selection modes
190
+
191
+ | Mode | Behaviour |
192
+ |--------------|---------------------------------------------------|
193
+ | Multi-select | Toggle individual rows on/off, any number |
194
+ | Single-select| Only one row selected at a time |
195
+ | Whole table | Deletes every row in the table for that user |
196
+
197
+ ---
198
+
199
+ ## Audit log
200
+
201
+ Every delete writes a JSON line to `audit.log`:
202
+
203
+ ```json
204
+ {
205
+ "ts": "2026-06-03T10:22:01.123456",
206
+ "kind": "rows",
207
+ "table": "results",
208
+ "user_id": "1234",
209
+ "deleted_ids": ["10", "20"],
210
+ "count": 2
211
+ }
212
+ ```
213
+
214
+ ---
215
+
216
+ ## Run tests
217
+
218
+ ```bash
219
+ pip install pytest
220
+ pytest tests/
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Adding a new table
226
+
227
+ Open `src/db.py` and add your table + its user FK column to `TABLE_USER_COL`:
228
+
229
+ ```python
230
+ TABLE_USER_COL = {
231
+ "your_table": "user_id", # ← add here
232
+ ...
233
+ }
234
+ ```
235
+
236
+ That's it — it will appear automatically in the sidebar on next fetch.
@@ -0,0 +1,203 @@
1
+ # Supabase User Delete TUI
2
+
3
+ A terminal UI for deleting user data from Supabase — runs in any terminal
4
+ on **Mac** and **Windows PowerShell**.
5
+
6
+ Built with Python + [Textual](https://textual.textualize.io/).
7
+
8
+ ---
9
+
10
+ ## Installation
11
+
12
+ ### Install from PyPI (when published)
13
+
14
+ ```bash
15
+ pip install supabase-user-delete-tui
16
+ ```
17
+
18
+ ### Install from source
19
+
20
+ ```bash
21
+ # Clone the repository
22
+ git clone https://github.com/Navi-th/user-delete-tui.git
23
+ cd user-delete-tui
24
+
25
+ # Install in development mode
26
+ pip install -e .
27
+ ```
28
+
29
+ ### Quick Start
30
+
31
+ After installation, you can run the tool using:
32
+
33
+ ```bash
34
+ supabase-user-delete
35
+ ```
36
+
37
+ Or if installed locally:
38
+
39
+ ```bash
40
+ python -m src.app
41
+ ```
42
+
43
+ ---
44
+
45
+ ## Configuration
46
+
47
+ Before using the tool, you need to set up your Supabase credentials:
48
+
49
+ 1. Create a `.env` file in your working directory (or copy from `.env.example`)
50
+ 2. Add your Supabase credentials:
51
+
52
+ ```env
53
+ SUPABASE_URL=your_project_url
54
+ SUPABASE_SERVICE_KEY=your_service_role_key
55
+ ```
56
+
57
+ ### Getting your Supabase credentials
58
+
59
+ 1. Go to https://supabase.com/dashboard
60
+ 2. Open your project → **Settings** → **API**
61
+ 3. Copy **Project URL** → `SUPABASE_URL`
62
+ 4. Copy **service_role** key (not anon!) → `SUPABASE_SERVICE_KEY`
63
+
64
+ ---
65
+
66
+ ## Project structure
67
+
68
+ ```
69
+ user-delete-tui/
70
+ ├── main.py ← entry point
71
+ ├── requirements.txt
72
+ ├── .env.example ← copy to .env and fill in credentials
73
+ ├── .gitignore
74
+ ├── src/
75
+ │ ├── app.py ← Textual TUI app
76
+ │ ├── db.py ← all Supabase queries
77
+ │ ├── audit.py ← audit log writer
78
+ │ └── modals.py ← confirm + mode picker dialogs
79
+ └── tests/
80
+ └── test_db.py ← unit tests
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Development Setup
86
+
87
+ If you want to contribute or modify the tool:
88
+
89
+ ### Mac
90
+
91
+ ```bash
92
+ # 1. Clone / open in Kiro
93
+ cd user-delete-tui
94
+
95
+ # 2. Create virtual environment
96
+ python3 -m venv .venv
97
+ source .venv/bin/activate
98
+
99
+ # 3. Install dependencies
100
+ pip install -r requirements.txt
101
+
102
+ # 4. Add credentials
103
+ cp .env.example .env
104
+ # open .env and fill in SUPABASE_URL and SUPABASE_SERVICE_KEY
105
+
106
+ # 5. Run
107
+ python main.py
108
+ ```
109
+
110
+ ### Windows (PowerShell)
111
+
112
+ ```powershell
113
+ # 1. Open PowerShell in the project folder
114
+
115
+ # 2. Create virtual environment
116
+ python -m venv .venv
117
+ .venv\Scripts\Activate.ps1
118
+
119
+ # 3. Install dependencies
120
+ pip install -r requirements.txt
121
+
122
+ # 4. Add credentials
123
+ Copy-Item .env.example .env
124
+ # open .env in notepad and fill in credentials
125
+
126
+ # 5. Run
127
+ python main.py
128
+ ```
129
+
130
+ > **Windows note:** if you see `cannot be loaded because running scripts is disabled`,
131
+ > run this once: `Set-ExecutionPolicy -Scope CurrentUser RemoteSigned`
132
+
133
+ ---
134
+
135
+ ## Getting your Supabase credentials
136
+
137
+ 1. Go to https://supabase.com/dashboard
138
+ 2. Open your project → **Settings** → **API**
139
+ 3. Copy **Project URL** → `SUPABASE_URL`
140
+ 4. Copy **service_role** key (not anon!) → `SUPABASE_SERVICE_KEY`
141
+
142
+ ---
143
+
144
+ ## Usage
145
+
146
+ | Key | Action |
147
+ |-----------|-------------------------------------|
148
+ | `f` | Fetch all tables for a user_id |
149
+ | `m` | Open mode picker |
150
+ | `d` | Delete (respects current mode) |
151
+ | `a` | Select all rows in current table |
152
+ | `Escape` | Clear current selection |
153
+ | `Enter` | Select/deselect a row in the table |
154
+ | `Ctrl+C` | Quit |
155
+
156
+ ### Selection modes
157
+
158
+ | Mode | Behaviour |
159
+ |--------------|---------------------------------------------------|
160
+ | Multi-select | Toggle individual rows on/off, any number |
161
+ | Single-select| Only one row selected at a time |
162
+ | Whole table | Deletes every row in the table for that user |
163
+
164
+ ---
165
+
166
+ ## Audit log
167
+
168
+ Every delete writes a JSON line to `audit.log`:
169
+
170
+ ```json
171
+ {
172
+ "ts": "2026-06-03T10:22:01.123456",
173
+ "kind": "rows",
174
+ "table": "results",
175
+ "user_id": "1234",
176
+ "deleted_ids": ["10", "20"],
177
+ "count": 2
178
+ }
179
+ ```
180
+
181
+ ---
182
+
183
+ ## Run tests
184
+
185
+ ```bash
186
+ pip install pytest
187
+ pytest tests/
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Adding a new table
193
+
194
+ Open `src/db.py` and add your table + its user FK column to `TABLE_USER_COL`:
195
+
196
+ ```python
197
+ TABLE_USER_COL = {
198
+ "your_table": "user_id", # ← add here
199
+ ...
200
+ }
201
+ ```
202
+
203
+ That's it — it will appear automatically in the sidebar on next fetch.
@@ -0,0 +1,44 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "supabase-user-delete-tui"
7
+ version = "0.1.0"
8
+ description = "A terminal UI for deleting user data from Supabase"
9
+ readme = "README.md"
10
+ authors = [
11
+ {name = "Navi", email = "navi@rareminds.in"}
12
+ ]
13
+ license = {text = "MIT"}
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "Topic :: Software Development :: User Interfaces",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.8",
21
+ "Programming Language :: Python :: 3.9",
22
+ "Programming Language :: Python :: 3.10",
23
+ "Programming Language :: Python :: 3.11",
24
+ "Programming Language :: Python :: 3.12",
25
+ "Operating System :: OS Independent",
26
+ ]
27
+ requires-python = ">=3.8"
28
+ dependencies = [
29
+ "textual==0.59.0",
30
+ "supabase==2.12.0",
31
+ "python-dotenv==1.0.0",
32
+ ]
33
+
34
+ [project.urls]
35
+ Homepage = "https://github.com/Navi-th/user-delete-tui"
36
+ Repository = "https://github.com/Navi-th/user-delete-tui"
37
+ Issues = "https://github.com/Navi-th/user-delete-tui/issues"
38
+
39
+ [project.scripts]
40
+ supabase-user-delete = "src.app:main"
41
+
42
+ [tool.setuptools.packages.find]
43
+ where = ["."]
44
+ include = ["src*"]
@@ -0,0 +1,3 @@
1
+ textual==0.59.0
2
+ supabase==2.12.0
3
+ python-dotenv==1.0.0
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,40 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ with open("README.md", "r", encoding="utf-8") as fh:
4
+ long_description = fh.read()
5
+
6
+ with open("requirements.txt", "r", encoding="utf-8") as fh:
7
+ requirements = [line.strip() for line in fh if line.strip() and not line.startswith("#")]
8
+
9
+ setup(
10
+ name="supabase-user-delete-tui",
11
+ version="0.1.0",
12
+ author="Navi-th",
13
+ author_email="navi@example.com",
14
+ description="A terminal UI for deleting user data from Supabase",
15
+ long_description=long_description,
16
+ long_description_content_type="text/markdown",
17
+ url="https://github.com/Navi-th/user-delete-tui",
18
+ packages=find_packages(),
19
+ classifiers=[
20
+ "Development Status :: 3 - Alpha",
21
+ "Intended Audience :: Developers",
22
+ "Topic :: Software Development :: User Interfaces",
23
+ "License :: OSI Approved :: MIT License",
24
+ "Programming Language :: Python :: 3",
25
+ "Programming Language :: Python :: 3.8",
26
+ "Programming Language :: Python :: 3.9",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ "Operating System :: OS Independent",
31
+ ],
32
+ python_requires=">=3.8",
33
+ install_requires=requirements,
34
+ entry_points={
35
+ "console_scripts": [
36
+ "supabase-user-delete=src.app:main",
37
+ ],
38
+ },
39
+ include_package_data=True,
40
+ )
File without changes