powerbase-cli 0.1.3__tar.gz → 0.1.5__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.
Files changed (37) hide show
  1. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/PKG-INFO +15 -3
  2. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/README.md +14 -2
  3. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/pyproject.toml +1 -1
  4. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/agent.py +8 -5
  5. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/auth.py +5 -5
  6. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/branch.py +4 -1
  7. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/context.py +4 -1
  8. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/parser.py +3 -0
  9. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/publish.py +13 -3
  10. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/sandbox.py +20 -2
  11. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli.egg-info/PKG-INFO +15 -3
  12. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_cli_help.py +39 -1
  13. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/setup.cfg +0 -0
  14. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/__init__.py +0 -0
  15. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/__main__.py +0 -0
  16. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/api.py +0 -0
  17. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/certs/powerbase-test-ca.pem +0 -0
  18. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/cli.py +0 -0
  19. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/__init__.py +0 -0
  20. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/config_cmd.py +0 -0
  21. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/database.py +0 -0
  22. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/instance.py +0 -0
  23. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/org.py +0 -0
  24. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/shared.py +0 -0
  25. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/commands/sql.py +0 -0
  26. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/config.py +0 -0
  27. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/session.py +0 -0
  28. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli/transport.py +0 -0
  29. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli.egg-info/SOURCES.txt +0 -0
  30. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli.egg-info/dependency_links.txt +0 -0
  31. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli.egg-info/entry_points.txt +0 -0
  32. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/src/powerbase_cli.egg-info/top_level.txt +0 -0
  33. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_api.py +0 -0
  34. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_cli_commands.py +0 -0
  35. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_config.py +0 -0
  36. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_session.py +0 -0
  37. {powerbase_cli-0.1.3 → powerbase_cli-0.1.5}/tests/test_transport.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: powerbase-cli
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: CLI for operating Powerbase console workflows
5
5
  Author: Powerbase
6
6
  Requires-Python: >=3.11
@@ -240,6 +240,8 @@ powerbase agent login-url --instance-id INSTANCE_ID --provider cursor --json
240
240
 
241
241
  ### Sandbox Agent Chat And Config
242
242
 
243
+ Powerbase provides a coding agent so users can build and evolve Powerbase-hosted apps through chat. `powerbase agent chat` is the default implementation interface for that workflow, while the rest of the CLI supports context, validation, and deployment around it. In the current product workflow, successful `agent chat` runs are also the normal path that produces previewable app changes.
244
+
243
245
  Send one prompt to the sandbox agent and stream events as JSONL:
244
246
 
245
247
  ```bash
@@ -257,6 +259,9 @@ powerbase agent chat \
257
259
  feature branch. `powerbase context use-branch ...` only changes the local default value;
258
260
  it does not switch the remote sandbox by itself.
259
261
 
262
+ Treat `powerbase sandbox files ...`, `powerbase sql run`, and `powerbase publish diff` as inspection and validation tools around the Powerbase coding agent. Treat `powerbase publish run` as an explicit deployment action and do not run it unless the user asks to publish, deploy, release, or promote the result.
263
+ Direct `powerbase sandbox files create-file`, `upload`, or `delete` operations can help inspect or adjust the remote project, but they do not by themselves trigger the preview build flow.
264
+
260
265
  Read and update opencode provider config:
261
266
 
262
267
  ```bash
@@ -278,11 +283,16 @@ When Openclaw or another LLM agent uses `powerbase`:
278
283
  - prefer `--json` on all commands
279
284
  - run discovery commands before write operations
280
285
  - set context for long multi-step tasks
286
+ - treat `powerbase agent chat` as the default implementation interface for Powerbase-hosted apps
287
+ - treat successful `powerbase agent chat` runs as the normal path that produces previewable app changes
281
288
  - use `auth status` before workflows that assume login
282
289
  - use `auth login --json` to generate a login URL, then stop and hand `login_url` to the user
283
290
  - do not have the agent open the browser login URL itself; the user must complete that approval step
284
291
  - after the user confirms approval, run `auth wait --login-id ... --json` to complete login
285
292
  - if a protected command says authentication is missing or expired, rerun `auth login --json` to generate a fresh login URL
293
+ - use `sandbox files`, `sql run`, and `publish diff` for inspection or validation around the Powerbase coding agent
294
+ - do not assume `sandbox files` write operations will trigger preview by themselves
295
+ - do not run `publish run` unless the user explicitly asks to publish, deploy, release, or promote the result
286
296
  - remember that `--json` overrides a saved `config output text` setting for that command
287
297
 
288
298
  Recommended agent sequence:
@@ -296,7 +306,9 @@ Recommended agent sequence:
296
306
  7. Use `powerbase database ...` only for the advanced bring-your-own-database path
297
307
  8. Set context with `powerbase context use-instance ...`
298
308
  9. If you want the sandbox agent preview on a non-main branch, run `powerbase branch switch ...`
299
- 10. Continue with `branch`, `sql`, `publish`, `sandbox files`, or `agent` commands
309
+ 10. Use `powerbase agent chat ...` as the primary implementation step for Powerbase-hosted app changes
310
+ 11. Use `sandbox files`, `sql`, and `publish diff` to inspect or validate the result
311
+ 12. Run `publish run` only when the user explicitly wants deployment or publication
300
312
 
301
313
  ## Testing
302
314
 
@@ -316,7 +328,7 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m py_compile src/powerbase_cli
316
328
 
317
329
  A project skill for Cursor/Openclaw-style agent usage lives in:
318
330
 
319
- `./.cursor/skills/powerbase-cli-openclaw/SKILL.md`
331
+ `./skills/powerbase-cli/SKILL.md`
320
332
 
321
333
  Design and auth review notes live in:
322
334
 
@@ -232,6 +232,8 @@ powerbase agent login-url --instance-id INSTANCE_ID --provider cursor --json
232
232
 
233
233
  ### Sandbox Agent Chat And Config
234
234
 
235
+ Powerbase provides a coding agent so users can build and evolve Powerbase-hosted apps through chat. `powerbase agent chat` is the default implementation interface for that workflow, while the rest of the CLI supports context, validation, and deployment around it. In the current product workflow, successful `agent chat` runs are also the normal path that produces previewable app changes.
236
+
235
237
  Send one prompt to the sandbox agent and stream events as JSONL:
236
238
 
237
239
  ```bash
@@ -249,6 +251,9 @@ powerbase agent chat \
249
251
  feature branch. `powerbase context use-branch ...` only changes the local default value;
250
252
  it does not switch the remote sandbox by itself.
251
253
 
254
+ Treat `powerbase sandbox files ...`, `powerbase sql run`, and `powerbase publish diff` as inspection and validation tools around the Powerbase coding agent. Treat `powerbase publish run` as an explicit deployment action and do not run it unless the user asks to publish, deploy, release, or promote the result.
255
+ Direct `powerbase sandbox files create-file`, `upload`, or `delete` operations can help inspect or adjust the remote project, but they do not by themselves trigger the preview build flow.
256
+
252
257
  Read and update opencode provider config:
253
258
 
254
259
  ```bash
@@ -270,11 +275,16 @@ When Openclaw or another LLM agent uses `powerbase`:
270
275
  - prefer `--json` on all commands
271
276
  - run discovery commands before write operations
272
277
  - set context for long multi-step tasks
278
+ - treat `powerbase agent chat` as the default implementation interface for Powerbase-hosted apps
279
+ - treat successful `powerbase agent chat` runs as the normal path that produces previewable app changes
273
280
  - use `auth status` before workflows that assume login
274
281
  - use `auth login --json` to generate a login URL, then stop and hand `login_url` to the user
275
282
  - do not have the agent open the browser login URL itself; the user must complete that approval step
276
283
  - after the user confirms approval, run `auth wait --login-id ... --json` to complete login
277
284
  - if a protected command says authentication is missing or expired, rerun `auth login --json` to generate a fresh login URL
285
+ - use `sandbox files`, `sql run`, and `publish diff` for inspection or validation around the Powerbase coding agent
286
+ - do not assume `sandbox files` write operations will trigger preview by themselves
287
+ - do not run `publish run` unless the user explicitly asks to publish, deploy, release, or promote the result
278
288
  - remember that `--json` overrides a saved `config output text` setting for that command
279
289
 
280
290
  Recommended agent sequence:
@@ -288,7 +298,9 @@ Recommended agent sequence:
288
298
  7. Use `powerbase database ...` only for the advanced bring-your-own-database path
289
299
  8. Set context with `powerbase context use-instance ...`
290
300
  9. If you want the sandbox agent preview on a non-main branch, run `powerbase branch switch ...`
291
- 10. Continue with `branch`, `sql`, `publish`, `sandbox files`, or `agent` commands
301
+ 10. Use `powerbase agent chat ...` as the primary implementation step for Powerbase-hosted app changes
302
+ 11. Use `sandbox files`, `sql`, and `publish diff` to inspect or validate the result
303
+ 12. Run `publish run` only when the user explicitly wants deployment or publication
292
304
 
293
305
  ## Testing
294
306
 
@@ -308,7 +320,7 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m py_compile src/powerbase_cli
308
320
 
309
321
  A project skill for Cursor/Openclaw-style agent usage lives in:
310
322
 
311
- `./.cursor/skills/powerbase-cli-openclaw/SKILL.md`
323
+ `./skills/powerbase-cli/SKILL.md`
312
324
 
313
325
  Design and auth review notes live in:
314
326
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "powerbase-cli"
7
- version = "0.1.3"
7
+ version = "0.1.5"
8
8
  description = "CLI for operating Powerbase console workflows"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -115,11 +115,14 @@ def register_agent_commands(subparsers: argparse._SubParsersAction[argparse.Argu
115
115
  "chat",
116
116
  help="Send a prompt to the sandbox agent.",
117
117
  description=(
118
- "Send one prompt to the sandbox agent running in an instance. Use this when you want the sandbox "
119
- "itself to inspect or modify the project. The automatic preview build follows the sandbox's current "
120
- "branch, so run `powerbase branch switch` first when you want a feature-branch preview. By default "
121
- "the command collects all streamed events and prints them as JSON. Use --stream-jsonl to print one "
122
- "JSON event per line as events arrive."
118
+ "Send one prompt to the Powerbase coding agent running in an instance. This is the default "
119
+ "implementation interface when you want to build or evolve a Powerbase-hosted app through chat, "
120
+ "while the rest of the CLI handles context, validation, and deployment around that workflow. "
121
+ "In the current product workflow, successful runs here are also the normal path that produces "
122
+ "previewable app changes. "
123
+ "The automatic preview build follows the sandbox's current branch, so run `powerbase branch switch` "
124
+ "first when you want a feature-branch preview. By default the command collects all streamed events "
125
+ "and prints them as JSON. Use --stream-jsonl to print one JSON event per line as events arrive."
123
126
  ),
124
127
  )
125
128
  p.add_argument("--instance-id", help="Instance ID. Falls back to context.json.")
@@ -75,8 +75,8 @@ def handle_auth_login(args: argparse.Namespace) -> int:
75
75
  "poll_interval": data.get("poll_interval", 2),
76
76
  "next_action": "ask_user_to_open_url",
77
77
  "message": (
78
- "Give login_url to the user and stop here. "
79
- "Do not poll yet. After the user confirms browser approval, run "
78
+ "Return login_url to the user and stop. "
79
+ "Do not open the URL or poll yet. After the user confirms approval, run "
80
80
  f"`powerbase auth wait --login-id {login_id} --json`."
81
81
  ),
82
82
  },
@@ -149,9 +149,9 @@ def register_auth_commands(subparsers: argparse._SubParsersAction[argparse.Argum
149
149
  "login",
150
150
  help="Generate browser login URL.",
151
151
  description=(
152
- "Start browser-based login and return a login URL plus login_id. "
153
- "Give the login_url to the user, wait for them to confirm approval in their own browser, "
154
- "then run `powerbase auth wait --login-id ...` to complete login."
152
+ "Start browser login and return login_url plus login_id. "
153
+ "Give the URL to the user. Do not open it or poll yet. "
154
+ "After the user confirms approval, run `powerbase auth wait --login-id ...`."
155
155
  ),
156
156
  )
157
157
  p.set_defaults(handler=handle_auth_login)
@@ -67,7 +67,10 @@ def register_branch_commands(subparsers: argparse._SubParsersAction[argparse.Arg
67
67
  p = branch_sub.add_parser(
68
68
  "switch",
69
69
  help="Switch the sandbox branch.",
70
- description="Switch the sandbox branch and update context.json.",
70
+ description=(
71
+ "Switch the remote sandbox branch and update context.json. Use this before `powerbase agent chat` "
72
+ "when you want the coding agent and preview build to target a specific branch."
73
+ ),
71
74
  )
72
75
  p.add_argument("branch_name", help="Branch slug to switch to.")
73
76
  p.add_argument("--instance-id", help="Instance ID. Falls back to context.json.")
@@ -69,7 +69,10 @@ def register_context_commands(subparsers: argparse._SubParsersAction[argparse.Ar
69
69
  p = context_sub.add_parser(
70
70
  "use-branch",
71
71
  help="Set the default branch.",
72
- description="Set the default branch slug, such as main or feature/my-change.",
72
+ description=(
73
+ "Set the default branch slug, such as main or feature/my-change. This updates only the local default "
74
+ "context value; it does not switch the remote sandbox branch used by previews or `powerbase agent chat`."
75
+ ),
73
76
  )
74
77
  p.add_argument("branch")
75
78
  p.set_defaults(handler=lambda args: _save_context_update(args, branch=args.branch))
@@ -62,6 +62,9 @@ def build_parser() -> argparse.ArgumentParser:
62
62
  prog="powerbase",
63
63
  description=(
64
64
  "Operate Powerbase console workflows from the command line. "
65
+ "Powerbase supports agent-driven development for Powerbase-hosted apps, with "
66
+ "`powerbase agent chat` as the default implementation interface and the rest of the CLI "
67
+ "covering auth, context, resources, validation, and publish operations. "
65
68
  "Default instance creation uses the managed Powerbase database flow; "
66
69
  "`powerbase database ...` is the advanced bring-your-own-database path."
67
70
  ),
@@ -25,9 +25,17 @@ def handle_publish_run(args: argparse.Namespace) -> int:
25
25
 
26
26
 
27
27
  def register_publish_commands(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
28
- publish = subparsers.add_parser("publish", help="Publish commands.", description="Generate diffs and publish an instance.")
28
+ publish = subparsers.add_parser(
29
+ "publish",
30
+ help="Publish commands.",
31
+ description="Inspect publish diffs and publish an instance when the user explicitly wants deployment.",
32
+ )
29
33
  publish_sub = publish.add_subparsers(dest="publish_command")
30
- p = publish_sub.add_parser("diff", help="Show publish diff.", description="Generate publish diff for the current instance.")
34
+ p = publish_sub.add_parser(
35
+ "diff",
36
+ help="Show publish diff.",
37
+ description="Generate publish diff for the current instance as an inspection step before deployment.",
38
+ )
31
39
  p.add_argument("--instance-id", help="Instance ID. Falls back to context.json.")
32
40
  p.add_argument("--target", default="prod", help="Publish target. Default: prod")
33
41
  p.set_defaults(handler=handle_publish_diff)
@@ -35,7 +43,9 @@ def register_publish_commands(subparsers: argparse._SubParsersAction[argparse.Ar
35
43
  "run",
36
44
  help="Run publish flow.",
37
45
  description=(
38
- "Publish the current instance. If --sql is omitted, the command first runs publish diff and uses its SQL."
46
+ "Publish the current instance. Use this only when the user explicitly asks to publish, deploy, "
47
+ "release, or promote the result. If --sql is omitted, the command first runs publish diff and uses "
48
+ "its SQL."
39
49
  ),
40
50
  )
41
51
  p.add_argument("--instance-id", help="Instance ID. Falls back to context.json.")
@@ -48,9 +48,27 @@ def handle_files_delete(args: argparse.Namespace) -> int:
48
48
 
49
49
 
50
50
  def register_sandbox_commands(subparsers: argparse._SubParsersAction[argparse.ArgumentParser]) -> None:
51
- sandbox = subparsers.add_parser("sandbox", help="Sandbox commands.", description="Read or modify sandbox files.")
51
+ sandbox = subparsers.add_parser(
52
+ "sandbox",
53
+ help="Sandbox commands.",
54
+ description=(
55
+ "Inspect or modify the remote sandbox filesystem for a Powerbase instance. Treat this as the "
56
+ "remote inspection and control surface around the Powerbase coding agent, not the default full-app "
57
+ "implementation interface. Direct file operations here do not by themselves trigger the preview "
58
+ "build flow."
59
+ ),
60
+ )
52
61
  sandbox_sub = sandbox.add_subparsers(dest="sandbox_command")
53
- files = sandbox_sub.add_parser("files", help="Sandbox file commands.", description="Read or modify sandbox files.")
62
+ files = sandbox_sub.add_parser(
63
+ "files",
64
+ help="Sandbox file commands.",
65
+ description=(
66
+ "Read or modify files in the remote Powerbase sandbox. Use these commands for inspection, validation, "
67
+ "and targeted file operations around agent-driven development. Successful `powerbase agent chat` runs "
68
+ "are the normal path for previewable app changes; these file operations do not trigger preview by "
69
+ "themselves."
70
+ ),
71
+ )
54
72
  files_sub = files.add_subparsers(dest="files_command")
55
73
  p = files_sub.add_parser("list", help="List a directory.", description="List sandbox files at one path.")
56
74
  p.add_argument("--instance-id", help="Instance ID. Falls back to context.json.")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: powerbase-cli
3
- Version: 0.1.3
3
+ Version: 0.1.5
4
4
  Summary: CLI for operating Powerbase console workflows
5
5
  Author: Powerbase
6
6
  Requires-Python: >=3.11
@@ -240,6 +240,8 @@ powerbase agent login-url --instance-id INSTANCE_ID --provider cursor --json
240
240
 
241
241
  ### Sandbox Agent Chat And Config
242
242
 
243
+ Powerbase provides a coding agent so users can build and evolve Powerbase-hosted apps through chat. `powerbase agent chat` is the default implementation interface for that workflow, while the rest of the CLI supports context, validation, and deployment around it. In the current product workflow, successful `agent chat` runs are also the normal path that produces previewable app changes.
244
+
243
245
  Send one prompt to the sandbox agent and stream events as JSONL:
244
246
 
245
247
  ```bash
@@ -257,6 +259,9 @@ powerbase agent chat \
257
259
  feature branch. `powerbase context use-branch ...` only changes the local default value;
258
260
  it does not switch the remote sandbox by itself.
259
261
 
262
+ Treat `powerbase sandbox files ...`, `powerbase sql run`, and `powerbase publish diff` as inspection and validation tools around the Powerbase coding agent. Treat `powerbase publish run` as an explicit deployment action and do not run it unless the user asks to publish, deploy, release, or promote the result.
263
+ Direct `powerbase sandbox files create-file`, `upload`, or `delete` operations can help inspect or adjust the remote project, but they do not by themselves trigger the preview build flow.
264
+
260
265
  Read and update opencode provider config:
261
266
 
262
267
  ```bash
@@ -278,11 +283,16 @@ When Openclaw or another LLM agent uses `powerbase`:
278
283
  - prefer `--json` on all commands
279
284
  - run discovery commands before write operations
280
285
  - set context for long multi-step tasks
286
+ - treat `powerbase agent chat` as the default implementation interface for Powerbase-hosted apps
287
+ - treat successful `powerbase agent chat` runs as the normal path that produces previewable app changes
281
288
  - use `auth status` before workflows that assume login
282
289
  - use `auth login --json` to generate a login URL, then stop and hand `login_url` to the user
283
290
  - do not have the agent open the browser login URL itself; the user must complete that approval step
284
291
  - after the user confirms approval, run `auth wait --login-id ... --json` to complete login
285
292
  - if a protected command says authentication is missing or expired, rerun `auth login --json` to generate a fresh login URL
293
+ - use `sandbox files`, `sql run`, and `publish diff` for inspection or validation around the Powerbase coding agent
294
+ - do not assume `sandbox files` write operations will trigger preview by themselves
295
+ - do not run `publish run` unless the user explicitly asks to publish, deploy, release, or promote the result
286
296
  - remember that `--json` overrides a saved `config output text` setting for that command
287
297
 
288
298
  Recommended agent sequence:
@@ -296,7 +306,9 @@ Recommended agent sequence:
296
306
  7. Use `powerbase database ...` only for the advanced bring-your-own-database path
297
307
  8. Set context with `powerbase context use-instance ...`
298
308
  9. If you want the sandbox agent preview on a non-main branch, run `powerbase branch switch ...`
299
- 10. Continue with `branch`, `sql`, `publish`, `sandbox files`, or `agent` commands
309
+ 10. Use `powerbase agent chat ...` as the primary implementation step for Powerbase-hosted app changes
310
+ 11. Use `sandbox files`, `sql`, and `publish diff` to inspect or validate the result
311
+ 12. Run `publish run` only when the user explicitly wants deployment or publication
300
312
 
301
313
  ## Testing
302
314
 
@@ -316,7 +328,7 @@ PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python3 -m py_compile src/powerbase_cli
316
328
 
317
329
  A project skill for Cursor/Openclaw-style agent usage lives in:
318
330
 
319
- `./.cursor/skills/powerbase-cli-openclaw/SKILL.md`
331
+ `./skills/powerbase-cli/SKILL.md`
320
332
 
321
333
  Design and auth review notes live in:
322
334
 
@@ -19,6 +19,8 @@ class CliHelpTests(unittest.TestCase):
19
19
  self.assertIn("command flags", help_text)
20
20
  self.assertIn("environment", help_text)
21
21
  self.assertIn("Operate Powerbase console workflows", help_text)
22
+ self.assertIn("agent-driven development", help_text)
23
+ self.assertIn("default implementation interface", help_text)
22
24
  self.assertIn("--insecure", help_text)
23
25
  self.assertIn("--ca-cert", help_text)
24
26
 
@@ -28,6 +30,7 @@ class CliHelpTests(unittest.TestCase):
28
30
  login_parser = auth_parser._subparsers._group_actions[0].choices["login"]
29
31
  help_text = login_parser.format_help()
30
32
  self.assertIn("login_id", help_text)
33
+ self.assertIn("Do not open", help_text)
31
34
  self.assertIn("powerbase auth wait", help_text)
32
35
 
33
36
  def test_auth_wait_help_mentions_timeout(self) -> None:
@@ -69,10 +72,21 @@ class CliHelpTests(unittest.TestCase):
69
72
  agent_parser = parser._subparsers._group_actions[0].choices["agent"]
70
73
  chat_parser = agent_parser._subparsers._group_actions[0].choices["chat"]
71
74
  help_text = chat_parser.format_help()
72
- self.assertIn("sandbox agent", help_text)
75
+ self.assertIn("Powerbase coding agent", help_text)
76
+ self.assertIn("default implementation interface", help_text)
77
+ self.assertIn("previewable app changes", help_text)
73
78
  self.assertIn("stream-jsonl", help_text)
74
79
  self.assertIn("feature-branch preview", help_text)
75
80
 
81
+ def test_sandbox_files_help_mentions_remote_control_surface(self) -> None:
82
+ parser = build_parser()
83
+ sandbox_parser = parser._subparsers._group_actions[0].choices["sandbox"]
84
+ files_parser = sandbox_parser._subparsers._group_actions[0].choices["files"]
85
+ help_text = files_parser.format_help()
86
+ self.assertIn("remote Powerbase sandbox", help_text)
87
+ self.assertIn("targeted file operations around agent-driven", help_text)
88
+ self.assertIn("do not trigger preview", help_text)
89
+
76
90
  def test_agent_help_does_not_expose_custom_provider_commands(self) -> None:
77
91
  parser = build_parser()
78
92
  agent_parser = parser._subparsers._group_actions[0].choices["agent"]
@@ -103,6 +117,30 @@ class CliHelpTests(unittest.TestCase):
103
117
  self.assertIn("--json", help_text)
104
118
  self.assertIn("config.toml says `text`", help_text)
105
119
 
120
+ def test_context_use_branch_help_mentions_remote_sandbox(self) -> None:
121
+ parser = build_parser()
122
+ context_parser = parser._subparsers._group_actions[0].choices["context"]
123
+ use_parser = context_parser._subparsers._group_actions[0].choices["use-branch"]
124
+ help_text = use_parser.format_help()
125
+ self.assertIn("does not switch the remote sandbox", help_text)
126
+ self.assertIn("powerbase agent chat", help_text)
127
+
128
+ def test_branch_switch_help_mentions_coding_agent(self) -> None:
129
+ parser = build_parser()
130
+ branch_parser = parser._subparsers._group_actions[0].choices["branch"]
131
+ switch_parser = branch_parser._subparsers._group_actions[0].choices["switch"]
132
+ help_text = switch_parser.format_help()
133
+ self.assertIn("coding agent", help_text)
134
+ self.assertIn("preview build", help_text)
135
+
136
+ def test_publish_run_help_mentions_explicit_user_request(self) -> None:
137
+ parser = build_parser()
138
+ publish_parser = parser._subparsers._group_actions[0].choices["publish"]
139
+ run_parser = publish_parser._subparsers._group_actions[0].choices["run"]
140
+ help_text = run_parser.format_help()
141
+ self.assertIn("user explicitly asks to", help_text)
142
+ self.assertIn("release", help_text)
143
+
106
144
  def test_normalize_global_argv_moves_root_flags_forward(self) -> None:
107
145
  normalized = normalize_global_argv(["auth", "status", "--json", "--config-dir", "/tmp/pb", "--insecure"])
108
146
  self.assertEqual(normalized, ["--json", "--config-dir", "/tmp/pb", "--insecure", "auth", "status"])
File without changes