@polterware/polter 0.0.0
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.
- package/LICENSE +21 -0
- package/README.md +405 -0
- package/dist/index.js +2935 -0
- package/package.json +58 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Polterware
|
|
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.
|
package/README.md
ADDED
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
# @polterware/polter
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@polterware/polter)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
[](https://nodejs.org/)
|
|
8
|
+
|
|
9
|
+
An optimized interactive CLI for managing Supabase CLI workflows with more speed, consistency, and discoverability.
|
|
10
|
+
|
|
11
|
+
Polter is a productivity layer on top of the official `supabase` CLI. Instead of memorizing command trees, you browse one unified board, add extra args interactively, attach global flags, and pin common workflows for one-click reuse.
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Interactive Command Builder**: Guided flow for command + subcommand + extra args
|
|
16
|
+
- **Suggested Subcommand Picker**: Select common args (for example `db pull`) from boxed sections before typing custom args
|
|
17
|
+
- **Unified Command Board**: Pinned runs, pinned commands, grouped categories, and actions in boxed sections on one screen
|
|
18
|
+
- **Global Flags Picker**: Add common global flags in one step
|
|
19
|
+
- **Pinned Commands and Runs**: Toggle base command pins with `→` and pin exact runs after success
|
|
20
|
+
- **Custom Command Mode**: Run raw Supabase arguments like `-v` or `status -o json`
|
|
21
|
+
- **Built-in Self-Update**: Update Polter for the current repository or globally through npm
|
|
22
|
+
- **Shell Execution**: Resolves `supabase` from the current repository first, then falls back to `PATH`
|
|
23
|
+
- **TypeScript-based CLI**: Strongly typed internal implementation
|
|
24
|
+
- **App Workflows**: Explicit `polter app ...` flows for repository-aware setup, linking, migrations, runtime configuration, and app installation
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
### Run one-off without installing
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx @polterware/polter@latest
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Install in a repository
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npm install -D @polterware/polter
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Then run it from that repository with:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npx polter
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Install globally
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm install -g @polterware/polter
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then run:
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
polter
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Use a repository install when you want the CLI version pinned to one project.
|
|
61
|
+
Use a global install when you want the same CLI version across every repository.
|
|
62
|
+
|
|
63
|
+
### Update
|
|
64
|
+
|
|
65
|
+
If you installed it globally, update it with:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npm install -g @polterware/polter@latest
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
If you installed it in a repository, update it there with:
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
npm install -D @polterware/polter@latest
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
You can also run the same update flow from inside Polter:
|
|
78
|
+
|
|
79
|
+
1. Go to the `Actions` section
|
|
80
|
+
2. Choose `Update Polter`
|
|
81
|
+
3. Choose `Current repository` or `Global install`
|
|
82
|
+
4. Confirm the npm update command
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Requirements
|
|
87
|
+
|
|
88
|
+
- **Node.js**: `>= 18`
|
|
89
|
+
- **Supabase CLI**: installed globally in `PATH` or locally in the current repository
|
|
90
|
+
|
|
91
|
+
Check your environment:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
node -v
|
|
95
|
+
supabase --version
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Install Supabase CLI (official docs):
|
|
99
|
+
|
|
100
|
+
- [Supabase CLI Guide](https://supabase.com/docs/guides/cli)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Quick Reference
|
|
105
|
+
|
|
106
|
+
### App Workflows
|
|
107
|
+
|
|
108
|
+
Polter keeps generic Supabase execution separate from app-specific automation.
|
|
109
|
+
Use the `app` namespace when you want project-aware workflows:
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
polter app setup ops --path .
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
```bash
|
|
116
|
+
polter app link ops --path .
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
polter app migrate ops push --path .
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
```bash
|
|
124
|
+
polter app configure ops --path .
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
polter app install ops
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
polter app update ops
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
`setup ops` installs dependencies, collects Supabase connection data, links the project, pushes migrations, and writes the runtime bootstrap payload used by the desktop app.
|
|
136
|
+
|
|
137
|
+
`configure ops` refreshes the runtime connection payload without reinstalling the app.
|
|
138
|
+
|
|
139
|
+
`install ops` is currently macOS-only. By default it resolves the latest GitHub release from `polterware/ops`, accepts `--version <version>` to pin a release, and still supports `--artifact-url` or `POLTER_OPS_MACOS_ARTIFACT_URL` as manual overrides.
|
|
140
|
+
|
|
141
|
+
`update ops` is also macOS-only. It replaces the installed `ops.app` with a newer release while preserving the persisted runtime configuration, local settings, and Supabase session state stored outside the app bundle.
|
|
142
|
+
|
|
143
|
+
Use `POLTER_OPS_GITHUB_REPO=owner/repo` when you need to resolve releases from a fork or a different repository.
|
|
144
|
+
|
|
145
|
+
### Execution Model
|
|
146
|
+
|
|
147
|
+
Polter executes workflow commands as:
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
supabase <command> <extra-args> <global-flags>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The self-update action is the only built-in exception and can run one of:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npm install -g @polterware/polter@latest
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
npm install -D @polterware/polter@latest
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Typical Flow
|
|
164
|
+
|
|
165
|
+
1. Choose a command from the unified board
|
|
166
|
+
2. Optionally pin/unpin with `→`
|
|
167
|
+
3. Choose suggested args or type custom extra args
|
|
168
|
+
4. Pick optional global flags
|
|
169
|
+
5. Confirm and execute
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Command Categories
|
|
174
|
+
|
|
175
|
+
### Quick Start
|
|
176
|
+
|
|
177
|
+
- `bootstrap` - Bootstrap a Supabase project from a starter template
|
|
178
|
+
|
|
179
|
+
### Local Development
|
|
180
|
+
|
|
181
|
+
- `db` - Manage Postgres databases
|
|
182
|
+
- `gen` - Run code generation tools
|
|
183
|
+
- `init` - Initialize a local project
|
|
184
|
+
- `inspect` - Inspect Supabase project resources
|
|
185
|
+
- `link` - Link local project to remote Supabase project
|
|
186
|
+
- `login` - Authenticate with Supabase access token
|
|
187
|
+
- `logout` - Remove local auth token
|
|
188
|
+
- `migration` - Manage migration scripts
|
|
189
|
+
- `seed` - Seed project from `supabase/config.toml`
|
|
190
|
+
- `services` - Show local service versions
|
|
191
|
+
- `start` - Start local Supabase containers
|
|
192
|
+
- `status` - Show local container status
|
|
193
|
+
- `stop` - Stop local Supabase containers
|
|
194
|
+
- `test` - Run tests against local stack
|
|
195
|
+
- `unlink` - Unlink local project
|
|
196
|
+
|
|
197
|
+
### Management APIs
|
|
198
|
+
|
|
199
|
+
- `backups`
|
|
200
|
+
- `branches`
|
|
201
|
+
- `config`
|
|
202
|
+
- `domains`
|
|
203
|
+
- `encryption`
|
|
204
|
+
- `functions`
|
|
205
|
+
- `network-bans`
|
|
206
|
+
- `network-restrictions`
|
|
207
|
+
- `orgs`
|
|
208
|
+
- `postgres-config`
|
|
209
|
+
- `projects`
|
|
210
|
+
- `secrets`
|
|
211
|
+
- `snippets`
|
|
212
|
+
- `ssl-enforcement`
|
|
213
|
+
- `sso`
|
|
214
|
+
- `storage`
|
|
215
|
+
- `vanity-subdomains`
|
|
216
|
+
|
|
217
|
+
### Additional Commands
|
|
218
|
+
|
|
219
|
+
- `completion` - Generate shell completion script
|
|
220
|
+
- `help` - Show Supabase command help
|
|
221
|
+
|
|
222
|
+
### Custom Command / Check Version
|
|
223
|
+
|
|
224
|
+
Use this mode for free-form args like:
|
|
225
|
+
|
|
226
|
+
- `-v`
|
|
227
|
+
- `status -o json`
|
|
228
|
+
- `db pull`
|
|
229
|
+
- `projects list`
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Global Flags
|
|
234
|
+
|
|
235
|
+
Available global flags in the interactive selector:
|
|
236
|
+
|
|
237
|
+
- `--create-ticket` - Create support ticket on error
|
|
238
|
+
- `--debug` - Enable debug logs
|
|
239
|
+
- `--experimental` - Enable experimental features
|
|
240
|
+
- `--yes` - Auto-confirm prompts
|
|
241
|
+
|
|
242
|
+
---
|
|
243
|
+
|
|
244
|
+
## Pinned Commands
|
|
245
|
+
|
|
246
|
+
Polter supports two pinned sections at the top of the main menu:
|
|
247
|
+
|
|
248
|
+
- `Pinned Runs` for exact commands like `db pull --debug`
|
|
249
|
+
- `Pinned Commands` for base commands like `db` or `start`
|
|
250
|
+
|
|
251
|
+
The main menu and the suggested-args screen group related options into boxed sections so pinned items, command groups, and actions stay visually separated.
|
|
252
|
+
|
|
253
|
+
Use `→` on a selected base command to pin or unpin it.
|
|
254
|
+
Use `→` on the suggested subcommand screen to pin exact runs like `db pull` before executing.
|
|
255
|
+
After a successful execution, Polter can also pin that exact command into `Pinned Runs`.
|
|
256
|
+
|
|
257
|
+
Pins are persisted locally using OS-level app config storage.
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## Usage Examples
|
|
262
|
+
|
|
263
|
+
### Bootstrap Ops from source
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
polter app setup ops --path /absolute/path/to/ops
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Reconfigure an installed Ops app
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
polter app configure ops
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Install the latest released Ops app
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
polter app install ops
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Install a specific release:
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
polter app install ops --version 1.0.0
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Update an existing installation without re-running runtime configuration:
|
|
288
|
+
|
|
289
|
+
```bash
|
|
290
|
+
polter app update ops
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
### Check Supabase CLI version
|
|
294
|
+
|
|
295
|
+
Interactive path:
|
|
296
|
+
|
|
297
|
+
1. `Custom Command / Check Version`
|
|
298
|
+
2. Input: `-v`
|
|
299
|
+
|
|
300
|
+
Executed command:
|
|
301
|
+
|
|
302
|
+
```bash
|
|
303
|
+
supabase -v
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Start local stack with debug
|
|
307
|
+
|
|
308
|
+
Interactive path:
|
|
309
|
+
|
|
310
|
+
1. `Local Development`
|
|
311
|
+
2. Command: `start`
|
|
312
|
+
3. Extra args: none
|
|
313
|
+
4. Flags: `--debug`
|
|
314
|
+
|
|
315
|
+
Executed command:
|
|
316
|
+
|
|
317
|
+
```bash
|
|
318
|
+
supabase start --debug
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### List projects
|
|
322
|
+
|
|
323
|
+
Interactive path:
|
|
324
|
+
|
|
325
|
+
1. `Management APIs`
|
|
326
|
+
2. Command: `projects`
|
|
327
|
+
3. Extra args: `list`
|
|
328
|
+
|
|
329
|
+
Executed command:
|
|
330
|
+
|
|
331
|
+
```bash
|
|
332
|
+
supabase projects list
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Run DB pull and auto-confirm prompts
|
|
336
|
+
|
|
337
|
+
Interactive path:
|
|
338
|
+
|
|
339
|
+
1. `Local Development`
|
|
340
|
+
2. Command: `db`
|
|
341
|
+
3. Extra args: `pull`
|
|
342
|
+
4. Flags: `--yes`
|
|
343
|
+
|
|
344
|
+
Executed command:
|
|
345
|
+
|
|
346
|
+
```bash
|
|
347
|
+
supabase db pull --yes
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Troubleshooting
|
|
353
|
+
|
|
354
|
+
### `supabase: command not found`
|
|
355
|
+
|
|
356
|
+
Supabase CLI is not installed in the current repository and is not available in your `PATH`.
|
|
357
|
+
|
|
358
|
+
Fix:
|
|
359
|
+
|
|
360
|
+
1. Install Supabase CLI globally or in the current repository
|
|
361
|
+
2. Restart terminal
|
|
362
|
+
3. Run `supabase --version`
|
|
363
|
+
|
|
364
|
+
### Command exits with non-zero code
|
|
365
|
+
|
|
366
|
+
Polter forwards execution to Supabase CLI. Use `--debug` and re-run to inspect detailed logs.
|
|
367
|
+
|
|
368
|
+
### Pinned commands are missing
|
|
369
|
+
|
|
370
|
+
Pins are managed directly in the board. Select a base command and press `→` to pin it, or pin an exact run after a successful execution.
|
|
371
|
+
|
|
372
|
+
### Interactive prompt did not open correctly
|
|
373
|
+
|
|
374
|
+
Ensure you are running in a terminal that supports interactive TTY prompts.
|
|
375
|
+
|
|
376
|
+
---
|
|
377
|
+
|
|
378
|
+
## Security Notes
|
|
379
|
+
|
|
380
|
+
- Polter executes local shell commands through your installed Supabase CLI.
|
|
381
|
+
- Keep Supabase tokens out of shared shells and CI logs.
|
|
382
|
+
- Prefer short-lived tokens and least-privileged project access.
|
|
383
|
+
|
|
384
|
+
---
|
|
385
|
+
|
|
386
|
+
## Contributing
|
|
387
|
+
|
|
388
|
+
1. Fork the repository
|
|
389
|
+
2. Create a feature branch
|
|
390
|
+
3. Commit changes with clear messages
|
|
391
|
+
4. Open a pull request
|
|
392
|
+
|
|
393
|
+
Repository:
|
|
394
|
+
|
|
395
|
+
- [polterware/polter](https://github.com/polterware/polter)
|
|
396
|
+
|
|
397
|
+
---
|
|
398
|
+
|
|
399
|
+
## License
|
|
400
|
+
|
|
401
|
+
MIT License - see the [LICENSE](LICENSE) file for details.
|
|
402
|
+
|
|
403
|
+
## Author
|
|
404
|
+
|
|
405
|
+
[Polterware](https://www.polterware.com)
|