primethink-cli 1.3.2__tar.gz → 1.3.3__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 (42) hide show
  1. {primethink_cli-1.3.2/primethink_cli.egg-info → primethink_cli-1.3.3}/PKG-INFO +48 -9
  2. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/README.md +47 -8
  3. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/SPECS.md +9 -3
  4. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/USER_GUIDE.md +43 -10
  5. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/docs/cli-reference.md +129 -11
  6. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink.py +563 -5
  7. {primethink_cli-1.3.2 → primethink_cli-1.3.3/primethink_cli.egg-info}/PKG-INFO +48 -9
  8. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_cli.egg-info/SOURCES.txt +1 -0
  9. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/pyproject.toml +1 -1
  10. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/scripts/publish.sh +1 -0
  11. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/skills/primethink-cli/SKILL.md +8 -2
  12. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_cli.py +1 -2
  13. primethink_cli-1.3.3/tests/test_project_workflows.py +471 -0
  14. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_task_commands.py +13 -7
  15. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/DEVELOPER.md +0 -0
  16. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/LICENSE +0 -0
  17. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/MANIFEST.in +0 -0
  18. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/docs/install.md +0 -0
  19. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/docs/primethink_help_llms.txt +0 -0
  20. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/docs/superpowers/specs/2026-08-16-install-attached-skills-design.md +0 -0
  21. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/install/homebrew/primethink-cli.rb +0 -0
  22. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/install/install.cmd +0 -0
  23. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/install/install.ps1 +0 -0
  24. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/install/install.sh +0 -0
  25. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_cli.egg-info/dependency_links.txt +0 -0
  26. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_cli.egg-info/entry_points.txt +0 -0
  27. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_cli.egg-info/requires.txt +0 -0
  28. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_cli.egg-info/top_level.txt +0 -0
  29. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/primethink_mcp.py +0 -0
  30. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/scripts/build.sh +0 -0
  31. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/scripts/deploy.sh +0 -0
  32. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/setup.cfg +0 -0
  33. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/setup.py +0 -0
  34. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/skills/__init__.py +0 -0
  35. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_agent_commands.py +0 -0
  36. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_env_config.py +0 -0
  37. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_install_developer_skill.py +0 -0
  38. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_install_skill.py +0 -0
  39. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_live_app.py +0 -0
  40. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_mcp_server.py +0 -0
  41. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_search_commands.py +0 -0
  42. {primethink_cli-1.3.2 → primethink_cli-1.3.3}/tests/test_whoami.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: primethink-cli
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: PrimeThink CLI - A powerful tool for interacting with PrimeThink AI API
5
5
  Author-email: PrimeThink <support@primethink.ai>
6
6
  License-Expression: MIT
@@ -71,6 +71,9 @@ pt chat send --agent AGENT_ID --message "your message"
71
71
  | `pt install-skill` | Install the bundled CLI agent skill for Claude Code and compatible agents |
72
72
  | `pt install-developer-skill` | Install the complete public PrimeThink developer skill, including nested resources |
73
73
  | `pt live-app new` | Scaffold a React or HTML Live App from a GitHub template catalog |
74
+ | `pt live-app publish` | Create/update a Live App task and sync its flat artifact |
75
+ | `pt live-app test` | Sync a Live App into a new or existing chat |
76
+ | `pt live-app test-ui` | Run Kiro/Playwright tests against an existing Live App chat |
74
77
  | `pt profile add` | Configure an API token for a profile |
75
78
  | `pt profile use` | Switch the active profile |
76
79
  | `pt profile list` | List configured profiles |
@@ -80,6 +83,7 @@ pt chat send --agent AGENT_ID --message "your message"
80
83
  | `pt chat create` | Create a new chat |
81
84
  | `pt chat rename` | Rename a chat |
82
85
  | `pt chat goal` | Update a chat's goal |
86
+ | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
83
87
  | `pt chat messages` | List a chat's messages (cursor-paginated) |
84
88
  | `pt chat archive` / `pt chat unarchive` | Archive / unarchive a chat |
85
89
  | `pt chat delete` | Delete a chat (asks for confirmation; `--yes` to skip) |
@@ -108,7 +112,9 @@ pt chat send --agent AGENT_ID --message "your message"
108
112
  | `pt task get` | Fetch a task's details as JSON |
109
113
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
110
114
  | `pt task duplicate` | Duplicate a task |
111
- | `pt task publish` / `pt task unpublish` | Make a task public / private |
115
+ | `pt task set-public` / `pt task set-private` | Make a task public / private |
116
+ | `pt task publish` | Create/update a task from a project directory |
117
+ | `pt task test` | Sync a task goal into a new or existing chat |
112
118
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
113
119
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
114
120
  | `pt task create-version` | Snapshot a task's current state as a named version |
@@ -287,13 +293,23 @@ pt task upload-image 99 ./cover.png
287
293
  pt task export 99 --output tasks/briefing.json
288
294
  pt task import tasks/briefing.json --profile production
289
295
 
296
+ # Publish a conventional task project (GOAL.md required); pass an ID to update
297
+ pt task publish ./tasks/briefing --virtual-assistant-id 7
298
+ pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
299
+
300
+ # Make the resulting task public/private, or test its goal in a chat
301
+ pt task set-public 99
302
+ pt task set-private 99
303
+ pt task test ./tasks/briefing
304
+ pt task test ./tasks/briefing --chat-id EXISTING_CHAT_ID
305
+
290
306
  # Generate an image with AI
291
307
  pt image generate --prompt "A lighthouse at dawn" --output lighthouse.png
292
308
  ```
293
309
 
294
- ## Live App Scaffolding
310
+ ## Live App Workflows
295
311
 
296
- Create a new Live App project without configuring an API profile:
312
+ Scaffold a new Live App project without configuring an API profile:
297
313
 
298
314
  ```bash
299
315
  # Default: React + Tailwind + Flowbite
@@ -309,13 +325,36 @@ pt live-app new ./my-live-app \
309
325
  --ref v2.0.0
310
326
  ```
311
327
 
312
- The destination must not already exist. Flowbite requires Tailwind. The command downloads a public GitHub repository and selects a template from `live-app-templates/manifest.json`; it never runs `npm install` or any generated code. Read the generated `README.md` for preview, build, and deployment instructions.
328
+ The destination must not already exist. Flowbite requires Tailwind. The command downloads a public GitHub repository and selects a template from `live-app-templates/manifest.json`; it never runs `npm install` or generated code.
329
+
330
+ After building, publish the Live App as a task or synchronize it directly into a test chat. Artifact discovery checks `dist/`, then `app/`, then the project root; use `--app-dir` to override it. The artifact must contain `index.html` (or `canvas.html`, deployed as `index.html`) and should be flat.
331
+
332
+ ```bash
333
+ # Create a Live App task; add --task-id 123 to update it
334
+ pt live-app publish ./my-live-app --virtual-assistant-id 7
335
+ pt live-app publish ./my-live-app --task-id 123 --virtual-assistant-id 7
336
+
337
+ # Create a temporary test chat, or update an existing chat in place
338
+ pt live-app test ./my-live-app
339
+ pt live-app test ./my-live-app --chat-id EXISTING_CHAT_ID
340
+
341
+ # Change any chat's renderer explicitly
342
+ pt chat type EXISTING_CHAT_ID live-app
343
+ pt chat type EXISTING_CHAT_ID chat
344
+
345
+ # Run the agentic Playwright guide against that exact chat
346
+ pt live-app test-ui ./my-live-app EXISTING_CHAT_ID \
347
+ --guide ./AGENTIC_UI_TESTING.md \
348
+ --instructions "Verify create, edit, and delete"
349
+ ```
350
+
351
+ Project metadata follows the reference-script conventions: `.name.config`, `.description.config`, `GOAL.md`, and optional `INITIAL_PROMPT.md`; `.image.png` is uploaded when publishing a Live App. Existing same-named app documents receive a new `Production` version, while identical content is reported as unchanged. `test-ui` reuses an authenticated browser session, trusts only browser interaction/inspection tools by default, captures Kiro's final Markdown response, and writes the required report itself; `--trust-all-tools` is an explicit opt-in for reviewed guides that need broader access.
313
352
 
314
353
  ## MCP Server
315
354
 
316
355
  The same code that powers the `pt` CLI can run as an [MCP](https://modelcontextprotocol.io)
317
- server, exposing every API command as a tool that MCP clients (Claude Code,
318
- Claude Desktop, and others) can call directly — no shelling out to `pt`.
356
+ server, exposing the core PrimeThink API management operations as tools for MCP clients (Claude Code,
357
+ Claude Desktop, and others) to call directly — no shelling out to `pt`. Local scaffolding and project publish/test orchestration remain CLI workflows.
319
358
 
320
359
  The MCP SDK is an optional dependency, so CLI-only installs stay lean:
321
360
 
@@ -342,8 +381,8 @@ example (Claude Desktop / Claude Code `mcpServers` config):
342
381
 
343
382
  Without `PRIMETHINK_TOKEN` in the client config, the server falls back to your
344
383
  configured active profile (`~/.primethink/config.json`); individual tools also
345
- accept optional `profile` and `api_url` arguments. Every CLI command has a tool
346
- equivalent — messaging, chats, collections, tasks, agents, semantic search, and
384
+ accept optional `profile` and `api_url` arguments. Core API management operations have tool
385
+ equivalents — messaging, chats, collections, tasks, agents, semantic search, and
347
386
  image generation. See the [CLI reference](docs/cli-reference.md#mcp-server-pt-mcp)
348
387
  for the full tool list.
349
388
 
@@ -37,6 +37,9 @@ pt chat send --agent AGENT_ID --message "your message"
37
37
  | `pt install-skill` | Install the bundled CLI agent skill for Claude Code and compatible agents |
38
38
  | `pt install-developer-skill` | Install the complete public PrimeThink developer skill, including nested resources |
39
39
  | `pt live-app new` | Scaffold a React or HTML Live App from a GitHub template catalog |
40
+ | `pt live-app publish` | Create/update a Live App task and sync its flat artifact |
41
+ | `pt live-app test` | Sync a Live App into a new or existing chat |
42
+ | `pt live-app test-ui` | Run Kiro/Playwright tests against an existing Live App chat |
40
43
  | `pt profile add` | Configure an API token for a profile |
41
44
  | `pt profile use` | Switch the active profile |
42
45
  | `pt profile list` | List configured profiles |
@@ -46,6 +49,7 @@ pt chat send --agent AGENT_ID --message "your message"
46
49
  | `pt chat create` | Create a new chat |
47
50
  | `pt chat rename` | Rename a chat |
48
51
  | `pt chat goal` | Update a chat's goal |
52
+ | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
49
53
  | `pt chat messages` | List a chat's messages (cursor-paginated) |
50
54
  | `pt chat archive` / `pt chat unarchive` | Archive / unarchive a chat |
51
55
  | `pt chat delete` | Delete a chat (asks for confirmation; `--yes` to skip) |
@@ -74,7 +78,9 @@ pt chat send --agent AGENT_ID --message "your message"
74
78
  | `pt task get` | Fetch a task's details as JSON |
75
79
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
76
80
  | `pt task duplicate` | Duplicate a task |
77
- | `pt task publish` / `pt task unpublish` | Make a task public / private |
81
+ | `pt task set-public` / `pt task set-private` | Make a task public / private |
82
+ | `pt task publish` | Create/update a task from a project directory |
83
+ | `pt task test` | Sync a task goal into a new or existing chat |
78
84
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
79
85
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
80
86
  | `pt task create-version` | Snapshot a task's current state as a named version |
@@ -253,13 +259,23 @@ pt task upload-image 99 ./cover.png
253
259
  pt task export 99 --output tasks/briefing.json
254
260
  pt task import tasks/briefing.json --profile production
255
261
 
262
+ # Publish a conventional task project (GOAL.md required); pass an ID to update
263
+ pt task publish ./tasks/briefing --virtual-assistant-id 7
264
+ pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
265
+
266
+ # Make the resulting task public/private, or test its goal in a chat
267
+ pt task set-public 99
268
+ pt task set-private 99
269
+ pt task test ./tasks/briefing
270
+ pt task test ./tasks/briefing --chat-id EXISTING_CHAT_ID
271
+
256
272
  # Generate an image with AI
257
273
  pt image generate --prompt "A lighthouse at dawn" --output lighthouse.png
258
274
  ```
259
275
 
260
- ## Live App Scaffolding
276
+ ## Live App Workflows
261
277
 
262
- Create a new Live App project without configuring an API profile:
278
+ Scaffold a new Live App project without configuring an API profile:
263
279
 
264
280
  ```bash
265
281
  # Default: React + Tailwind + Flowbite
@@ -275,13 +291,36 @@ pt live-app new ./my-live-app \
275
291
  --ref v2.0.0
276
292
  ```
277
293
 
278
- The destination must not already exist. Flowbite requires Tailwind. The command downloads a public GitHub repository and selects a template from `live-app-templates/manifest.json`; it never runs `npm install` or any generated code. Read the generated `README.md` for preview, build, and deployment instructions.
294
+ The destination must not already exist. Flowbite requires Tailwind. The command downloads a public GitHub repository and selects a template from `live-app-templates/manifest.json`; it never runs `npm install` or generated code.
295
+
296
+ After building, publish the Live App as a task or synchronize it directly into a test chat. Artifact discovery checks `dist/`, then `app/`, then the project root; use `--app-dir` to override it. The artifact must contain `index.html` (or `canvas.html`, deployed as `index.html`) and should be flat.
297
+
298
+ ```bash
299
+ # Create a Live App task; add --task-id 123 to update it
300
+ pt live-app publish ./my-live-app --virtual-assistant-id 7
301
+ pt live-app publish ./my-live-app --task-id 123 --virtual-assistant-id 7
302
+
303
+ # Create a temporary test chat, or update an existing chat in place
304
+ pt live-app test ./my-live-app
305
+ pt live-app test ./my-live-app --chat-id EXISTING_CHAT_ID
306
+
307
+ # Change any chat's renderer explicitly
308
+ pt chat type EXISTING_CHAT_ID live-app
309
+ pt chat type EXISTING_CHAT_ID chat
310
+
311
+ # Run the agentic Playwright guide against that exact chat
312
+ pt live-app test-ui ./my-live-app EXISTING_CHAT_ID \
313
+ --guide ./AGENTIC_UI_TESTING.md \
314
+ --instructions "Verify create, edit, and delete"
315
+ ```
316
+
317
+ Project metadata follows the reference-script conventions: `.name.config`, `.description.config`, `GOAL.md`, and optional `INITIAL_PROMPT.md`; `.image.png` is uploaded when publishing a Live App. Existing same-named app documents receive a new `Production` version, while identical content is reported as unchanged. `test-ui` reuses an authenticated browser session, trusts only browser interaction/inspection tools by default, captures Kiro's final Markdown response, and writes the required report itself; `--trust-all-tools` is an explicit opt-in for reviewed guides that need broader access.
279
318
 
280
319
  ## MCP Server
281
320
 
282
321
  The same code that powers the `pt` CLI can run as an [MCP](https://modelcontextprotocol.io)
283
- server, exposing every API command as a tool that MCP clients (Claude Code,
284
- Claude Desktop, and others) can call directly — no shelling out to `pt`.
322
+ server, exposing the core PrimeThink API management operations as tools for MCP clients (Claude Code,
323
+ Claude Desktop, and others) to call directly — no shelling out to `pt`. Local scaffolding and project publish/test orchestration remain CLI workflows.
285
324
 
286
325
  The MCP SDK is an optional dependency, so CLI-only installs stay lean:
287
326
 
@@ -308,8 +347,8 @@ example (Claude Desktop / Claude Code `mcpServers` config):
308
347
 
309
348
  Without `PRIMETHINK_TOKEN` in the client config, the server falls back to your
310
349
  configured active profile (`~/.primethink/config.json`); individual tools also
311
- accept optional `profile` and `api_url` arguments. Every CLI command has a tool
312
- equivalent — messaging, chats, collections, tasks, agents, semantic search, and
350
+ accept optional `profile` and `api_url` arguments. Core API management operations have tool
351
+ equivalents — messaging, chats, collections, tasks, agents, semantic search, and
313
352
  image generation. See the [CLI reference](docs/cli-reference.md#mcp-server-pt-mcp)
314
353
  for the full tool list.
315
354
 
@@ -41,6 +41,7 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
41
41
  | `pt chat create` | `POST /api/v1/chats` |
42
42
  | `pt chat rename` | `PUT /api/v1/chats/{chat_id}/name` |
43
43
  | `pt chat goal` | `PUT /api/v1/chats/{chat_id}/goal` |
44
+ | `pt chat type` | `PUT /api/v1/chats/{chat_id}/page_type?page_type=html\|chat` |
44
45
  | `pt chat messages` | `GET /api/v1/chats/{chat_id}/messages` |
45
46
  | `pt chat archive` / `unarchive` | `POST /api/v1/chats/{chat_id}/archive/{true\|false}` |
46
47
  | `pt chat delete` | `DELETE /api/v1/chats/{chat_id}` |
@@ -63,7 +64,12 @@ To obtain an API key, go to `Settings > API Keys` in the PrimeThink app and gene
63
64
  | `pt task get` | `GET /api/v1/tasks/{task_id}` |
64
65
  | `pt task delete` | `DELETE /api/v1/tasks/{task_id}` |
65
66
  | `pt task duplicate` | `POST /api/v1/tasks/{task_id}/duplicate` |
66
- | `pt task publish` / `unpublish` | `PATCH /api/v1/tasks/{task_id}/public-status?task_type=public\|private` |
67
+ | `pt task set-public` / `set-private` | `PATCH /api/v1/tasks/{task_id}/public-status?task_type=public\|private` |
68
+ | `pt task publish` | `POST /api/v1/tasks/` or `PATCH /api/v1/tasks/{task_id}` |
69
+ | `pt task test` | `POST /api/v1/chats` (new only), `PUT /api/v1/chats/{chat_id}/page_type` (existing only), `PUT /api/v1/chats/{chat_id}/goal` |
70
+ | `pt live-app publish` | task create/update + task version + task directory/document/version endpoints |
71
+ | `pt live-app test` | chat create/page-type/goal + chat directory/document/version endpoints |
72
+ | `pt live-app test-ui` | Local `kiro-cli` process; no PrimeThink API request by this command |
67
73
  | `pt task export` | `GET /api/v1/tasks/{task_id}` (portable fields filtered client-side) |
68
74
  | `pt task import` | `POST /api/v1/tasks/` |
69
75
  | `pt task create-version` | `POST /api/v1/tasks/{task_id}/versions` |
@@ -493,8 +499,8 @@ pt task duplicate TASK_ID
493
499
 
494
500
  **CLI Commands** (the CLI exposes the public/private pair; use `pt task update --type` for the rest):
495
501
  ```bash
496
- pt task publish TASK_ID # task_type=public
497
- pt task unpublish TASK_ID # task_type=private
502
+ pt task set-public TASK_ID # task_type=public
503
+ pt task set-private TASK_ID # task_type=private
498
504
  ```
499
505
 
500
506
  ---
@@ -73,7 +73,7 @@ pt version
73
73
 
74
74
  You should see output like:
75
75
  ```
76
- PrimeThink CLI v1.1.0
76
+ PrimeThink CLI v1.3.3
77
77
  ```
78
78
 
79
79
  ## Getting Started
@@ -689,22 +689,30 @@ pt task update 99 --description "Updated description"
689
689
  pt task update 99 --schedule-nl "every Friday at 17:00"
690
690
  ```
691
691
 
692
- ### Duplicate, publish, or delete a task
692
+ ### Duplicate, publish, test, change visibility, or delete a task
693
693
 
694
694
  ```bash
695
695
  # Clone a task (prints the new task's JSON, including its id)
696
696
  pt task duplicate 99
697
697
 
698
+ # Publish a conventional task project; GOAL.md is required
699
+ pt task publish ./tasks/briefing --virtual-assistant-id 7
700
+ pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
701
+
702
+ # Sync the project goal into a new temporary chat or an existing chat
703
+ pt task test ./tasks/briefing
704
+ pt task test ./tasks/briefing --chat-id CHAT_UUID
705
+
698
706
  # Toggle a task's visibility (its type) between public and private
699
- pt task publish 99
700
- pt task unpublish 99
707
+ pt task set-public 99
708
+ pt task set-private 99
701
709
 
702
710
  # Delete a task — prompts for confirmation unless you pass --yes
703
711
  pt task delete 99
704
712
  pt task delete 99 --yes
705
713
  ```
706
714
 
707
- For type changes other than public/private (e.g. `group` or `catalog`), use `pt task update 99 --type group`.
715
+ A project directory can override its folder name with `.name.config`, its description with `.description.config`, and its initial prompt with `INITIAL_PROMPT.md`. For type changes other than public/private (e.g. `group` or `catalog`), use `pt task update 99 --type group`.
708
716
 
709
717
  ### Version a task
710
718
 
@@ -786,13 +794,37 @@ pt live-app new ./company-app \
786
794
 
787
795
  The URL must be a public HTTPS GitHub repository. A custom catalog defines its variants in `live-app-templates/manifest.json`; see the [CLI Reference](docs/cli-reference.md#pt-live-app-new) for the schema. Downloads and extracted files are size-limited and validated, and extraction is atomic.
788
796
 
797
+ ### Publish and test a Live App
798
+
799
+ After building, the CLI discovers a flat artifact in `dist/`, then `app/`, then the project root. Override discovery with `--app-dir`. The artifact must contain `index.html` or `canvas.html` (deployed as `index.html`).
800
+
801
+ ```bash
802
+ # Create or update the reusable Live App task
803
+ pt live-app publish ./my-live-app --virtual-assistant-id 7
804
+ pt live-app publish ./my-live-app --task-id 42 --virtual-assistant-id 7
805
+
806
+ # Iterate in a new temporary chat or update one chat in place
807
+ pt live-app test ./my-live-app
808
+ pt live-app test ./my-live-app --chat-id CHAT_UUID --open
809
+
810
+ # Explicitly switch any existing chat's renderer
811
+ pt chat type CHAT_UUID live-app
812
+ pt chat type CHAT_UUID chat
813
+
814
+ # Agentic Playwright testing against that exact chat
815
+ pt live-app test-ui ./my-live-app CHAT_UUID --guide ./AGENTIC_UI_TESTING.md
816
+ ```
817
+
818
+ The commands read `.name.config`, `.description.config`, and optional `GOAL.md`; publish also uploads `.image.png` when present. Same-named app documents are updated as new `Production` versions, preserving their IDs and relative links. `test-ui` reuses an existing authenticated browser session, trusts only browser interaction/inspection tools by default, captures Kiro's final Markdown response, and writes the report itself. Use `--trust-all-tools` only when a reviewed testing guide genuinely requires broader access.
819
+
789
820
  ## MCP Server
790
821
 
791
- Everything the CLI can do, PrimeThink can also expose over the [Model Context
822
+ Core API management operations can also be exposed over the [Model Context
792
823
  Protocol (MCP)](https://modelcontextprotocol.io) — the same code, running as a
793
824
  server that AI assistants talk to directly. Instead of an assistant shelling out
794
825
  to `pt`, it calls typed tools like `send_message`, `list_chats`, `create_task`,
795
- and `search_documents`.
826
+ and `search_documents`. Local scaffolding and project publish/test orchestration
827
+ remain CLI workflows.
796
828
 
797
829
  ### When to use it
798
830
 
@@ -834,9 +866,10 @@ overrides.
834
866
 
835
867
  A few things to know:
836
868
 
837
- - Every CLI command has a tool equivalent (messaging, chats, collections, tasks,
838
- agents, semantic search, images). Field-heavy tools like `create_task` expose
839
- common fields plus an `extra_fields` object for anything else.
869
+ - Core API management operations have tool equivalents (messaging, chats, collections, tasks,
870
+ agents, semantic search, images). Local scaffolding and project publish/test orchestration
871
+ remain CLI workflows. Field-heavy tools like `create_task` expose common fields plus an
872
+ `extra_fields` object for anything else.
840
873
  - File and sync tools read and write on the machine where the server runs — your
841
874
  own machine, for a locally launched server.
842
875
  - Unlike the CLI, delete tools don't prompt for confirmation; your MCP client is
@@ -1,6 +1,6 @@
1
1
  # PrimeThink CLI — Command Reference
2
2
 
3
- Complete reference for every command in the PrimeThink CLI (`pt`), version 1.2.0.
3
+ Complete reference for every command in the PrimeThink CLI (`pt`), version 1.3.3.
4
4
 
5
5
  Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collection`, `agent`, `task`, `search`, and `image`.
6
6
 
@@ -15,6 +15,9 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
15
15
  - [`pt install-developer-skill`](#pt-install-developer-skill)
16
16
  - [Live Apps: `pt live-app`](#live-apps-pt-live-app)
17
17
  - [`pt live-app new`](#pt-live-app-new)
18
+ - [`pt live-app publish`](#pt-live-app-publish)
19
+ - [`pt live-app test`](#pt-live-app-test)
20
+ - [`pt live-app test-ui`](#pt-live-app-test-ui)
18
21
  - [Profiles: `pt profile`](#profiles-pt-profile)
19
22
  - [`pt profile add`](#pt-profile-add)
20
23
  - [`pt profile use`](#pt-profile-use)
@@ -26,6 +29,7 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
26
29
  - [`pt chat create`](#pt-chat-create)
27
30
  - [`pt chat rename`](#pt-chat-rename)
28
31
  - [`pt chat goal`](#pt-chat-goal)
32
+ - [`pt chat type`](#pt-chat-type)
29
33
  - [`pt chat messages`](#pt-chat-messages)
30
34
  - [`pt chat archive`](#pt-chat-archive)
31
35
  - [`pt chat unarchive`](#pt-chat-unarchive)
@@ -58,8 +62,10 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
58
62
  - [`pt task get`](#pt-task-get)
59
63
  - [`pt task delete`](#pt-task-delete)
60
64
  - [`pt task duplicate`](#pt-task-duplicate)
65
+ - [`pt task set-public`](#pt-task-set-public)
66
+ - [`pt task set-private`](#pt-task-set-private)
61
67
  - [`pt task publish`](#pt-task-publish)
62
- - [`pt task unpublish`](#pt-task-unpublish)
68
+ - [`pt task test`](#pt-task-test)
63
69
  - [`pt task export`](#pt-task-export)
64
70
  - [`pt task import`](#pt-task-import)
65
71
  - [`pt task create-version`](#pt-task-create-version)
@@ -132,7 +138,7 @@ Display the CLI version.
132
138
 
133
139
  ```bash
134
140
  pt version
135
- # PrimeThink CLI v1.2.0
141
+ # PrimeThink CLI v1.3.3
136
142
  ```
137
143
 
138
144
  ### `pt whoami`
@@ -150,7 +156,7 @@ pt whoami --profile production
150
156
 
151
157
  ### `pt mcp`
152
158
 
153
- Run PrimeThink as an [MCP](https://modelcontextprotocol.io) server over stdio, exposing every API command as a tool that MCP clients can call. See [MCP Server (`pt mcp`)](#mcp-server-pt-mcp) for the full tool list and client configuration.
159
+ Run PrimeThink as an [MCP](https://modelcontextprotocol.io) server over stdio, exposing core API management operations as tools that MCP clients can call. See [MCP Server (`pt mcp`)](#mcp-server-pt-mcp) for the full tool list and client configuration.
154
160
 
155
161
  ```bash
156
162
  pt mcp
@@ -227,7 +233,7 @@ pt install-developer-skill --force --ref <TAG_OR_COMMIT>
227
233
 
228
234
  ## Live Apps: `pt live-app`
229
235
 
230
- Create a local PrimeThink Live App project from a public GitHub template catalog. This group is local-only and does not require an API token or profile. The command downloads files but does not execute generated code or run a package manager.
236
+ Create, publish, synchronize, and test PrimeThink Live Apps. `pt live-app new` is local-only and does not require an API token; the publishing and chat-test commands use the normal profile connection options.
231
237
 
232
238
  ### `pt live-app new`
233
239
 
@@ -297,6 +303,71 @@ A custom repository provides `live-app-templates/manifest.json` at its root. Eac
297
303
 
298
304
  Each requested combination must match exactly one entry. For compatibility, repositories without a manifest can use the default catalog's conventional directory names, but new catalogs should always include the manifest.
299
305
 
306
+ ### `pt live-app publish`
307
+
308
+ Create a new private Live App task from a project directory, or update one when `--task-id` is supplied. The command reads project metadata, creates a `Production` task version, and synchronizes the flat app artifact into the task's `@app` folder.
309
+
310
+ ```bash
311
+ pt live-app publish DIRECTORY --virtual-assistant-id ID [OPTIONS]
312
+ ```
313
+
314
+ | Option | Default | Description |
315
+ |---|---|---|
316
+ | `--task-id ID` | create | Update this task instead of creating one |
317
+ | `--virtual-assistant-id ID` | required | Agent assigned to the task |
318
+ | `--app-dir DIRECTORY` | auto | Flat artifact directory; otherwise checks `dist/`, `app/`, then project root |
319
+ | `--version-name NAME` | `Production` | Name used for the task version and document versions |
320
+ | `--profile`, `--api-url` | active profile | Connection selection |
321
+
322
+ The artifact requires `index.html`, or `canvas.html` (uploaded as `index.html`). Files are uploaded at the top level. A same-named remote document receives a new version, preserving its ID and relative references; an identical version is reported as unchanged. If `DIRECTORY/.image.png` exists, it is uploaded as the task image.
323
+
324
+ ```bash
325
+ pt live-app publish ./decision-board --virtual-assistant-id 7
326
+ pt live-app publish ./decision-board --task-id 42 --virtual-assistant-id 7
327
+ ```
328
+
329
+ ### `pt live-app test`
330
+
331
+ Synchronize a Live App into a newly created temporary chat, or update an explicit existing chat in place. The command sets the chat page type to HTML, applies `GOAL.md` when present, and versions/uploads the app files under `@app`.
332
+
333
+ ```bash
334
+ pt live-app test DIRECTORY [OPTIONS]
335
+ ```
336
+
337
+ | Option | Default | Description |
338
+ |---|---|---|
339
+ | `--chat-id CHAT_ID` | create | Reuse this existing chat |
340
+ | `--workspace-id ID` | unset | Workspace for a newly created chat |
341
+ | `--temporary` / `--permanent` | temporary | Lifetime of a newly created chat |
342
+ | `--app-dir DIRECTORY` | auto | Override flat artifact discovery |
343
+ | `--version-name NAME` | `Production` | Document version name |
344
+ | `--open` | off | Open the resulting chat in a browser |
345
+ | `--web-url URL` | `https://app.primethink.ai` | Web URL used for output/opening |
346
+
347
+ ```bash
348
+ pt live-app test ./decision-board
349
+ pt live-app test ./decision-board --chat-id CHAT_UUID --open
350
+ ```
351
+
352
+ ### `pt live-app test-ui`
353
+
354
+ Launch `kiro-cli` in non-interactive agent mode to follow an agentic Playwright guide against one exact existing chat. It reads optional `SPECS.md`, adds any specific instructions, captures the agent's final Markdown response, and writes `test_results.md` under a timestamped `DIRECTORY/tests/` folder unless `--output-dir` is set.
355
+
356
+ ```bash
357
+ pt live-app test-ui DIRECTORY CHAT_ID [OPTIONS]
358
+ ```
359
+
360
+ | Option | Default | Description |
361
+ |---|---|---|
362
+ | `--instructions TEXT`, `--test TEXT` | unset | Additional test focus |
363
+ | `--guide FILE` | discover `AGENTIC_UI_TESTING.md` | Testing guide |
364
+ | `--output-dir DIRECTORY` | `DIRECTORY/tests/TIMESTAMP` | Report directory |
365
+ | `--trust-all-tools` | off | Explicitly allow every configured Kiro tool instead of the restricted browser interaction/inspection allowlist |
366
+ | `--timeout SECONDS` | `1800` | Positive maximum runtime for the Kiro UI test process |
367
+ | `--web-url URL` | `https://app.primethink.ai` | PrimeThink web URL |
368
+
369
+ The command reuses an existing authenticated browser session and does not accept or place credentials in the Kiro prompt/process arguments. It fails if authentication blocks testing, Kiro exits nonzero, exceeds `--timeout`, or does not create the required `test_results.md`. Treat testing guides and project specs as untrusted content; use `--trust-all-tools` only after reviewing them and only when the restricted default cannot complete the test.
370
+
300
371
  ---
301
372
 
302
373
  ## Profiles: `pt profile`
@@ -475,6 +546,17 @@ pt chat goal 123 --goal "Track the Q3 launch checklist"
475
546
  pt chat goal 123 --goal-file ./goal.md
476
547
  ```
477
548
 
549
+ ### `pt chat type`
550
+
551
+ Switch a chat between the Live App renderer and the normal chat view. `live-app` maps to API page type `html`; `chat` maps to API page type `chat`.
552
+
553
+ ```bash
554
+ pt chat type CHAT_ID (live-app|chat) [--profile NAME] [--api-url URL]
555
+
556
+ pt chat type 123 live-app
557
+ pt chat type 123 chat
558
+ ```
559
+
478
560
  ### `pt chat messages`
479
561
 
480
562
  List messages in a chat. With no options, the server returns the latest page (25 messages). Pagination is cursor-based on message IDs, not page numbers.
@@ -998,20 +1080,56 @@ pt task duplicate TASK_ID [--profile NAME] [--api-url URL]
998
1080
  pt task duplicate 99 | jq '.id'
999
1081
  ```
1000
1082
 
1083
+ ### `pt task set-public`
1084
+
1085
+ Make a task public via the task public-status endpoint.
1086
+
1087
+ ```bash
1088
+ pt task set-public TASK_ID [--profile NAME] [--api-url URL]
1089
+ ```
1090
+
1091
+ ### `pt task set-private`
1092
+
1093
+ Make a task private via the task public-status endpoint. For other task types (`group`, `system`, `catalog`), use `pt task update TASK_ID --type TYPE`.
1094
+
1095
+ ```bash
1096
+ pt task set-private TASK_ID [--profile NAME] [--api-url URL]
1097
+ ```
1098
+
1001
1099
  ### `pt task publish`
1002
1100
 
1003
- Make a task public sets its type to `public` via the task public-status endpoint.
1101
+ Create a private task from a conventional project directory, or synchronize the metadata into an existing task when `--task-id` is passed.
1102
+
1103
+ ```bash
1104
+ pt task publish DIRECTORY --virtual-assistant-id ID [--task-id ID] [--profile NAME] [--api-url URL]
1105
+ ```
1106
+
1107
+ `GOAL.md` is required and must not be empty. The task name defaults to the directory name and can be overridden by `.name.config`; the description defaults to the name and can be overridden by `.description.config`; optional `INITIAL_PROMPT.md` supplies the initial prompt. Creation uses the same conservative defaults as the reference workflow (private, published, standard chat, optional features disabled). Updating synchronizes name, description, goal, initial prompt, and virtual assistant without replacing unrelated server fields.
1004
1108
 
1005
1109
  ```bash
1006
- pt task publish TASK_ID [--profile NAME] [--api-url URL]
1110
+ pt task publish ./tasks/morning-briefing --virtual-assistant-id 7
1111
+ pt task publish ./tasks/morning-briefing --task-id 99 --virtual-assistant-id 7
1007
1112
  ```
1008
1113
 
1009
- ### `pt task unpublish`
1114
+ ### `pt task test`
1115
+
1116
+ Apply a task project's required `GOAL.md` to a newly created chat or an explicit existing chat. Existing chats are switched to normal chat mode.
1010
1117
 
1011
- Make a task private — sets its type to `private` via the task public-status endpoint. For other type changes (`group`, `system`, `catalog`), use `pt task update TASK_ID --type TYPE`.
1118
+ ```bash
1119
+ pt task test DIRECTORY [OPTIONS]
1120
+ ```
1121
+
1122
+ | Option | Default | Description |
1123
+ |---|---|---|
1124
+ | `--chat-id CHAT_ID` | create | Reuse this existing chat |
1125
+ | `--workspace-id ID` | unset | Workspace for a newly created chat |
1126
+ | `--temporary` / `--permanent` | temporary | Lifetime of a newly created chat |
1127
+ | `--open` | off | Open the resulting chat in a browser |
1128
+ | `--web-url URL` | `https://app.primethink.ai` | Web URL used for output/opening |
1012
1129
 
1013
1130
  ```bash
1014
- pt task unpublish TASK_ID [--profile NAME] [--api-url URL]
1131
+ pt task test ./tasks/morning-briefing
1132
+ pt task test ./tasks/morning-briefing --chat-id CHAT_UUID --permanent
1015
1133
  ```
1016
1134
 
1017
1135
  ### `pt task export`
@@ -1233,7 +1351,7 @@ Point an MCP client's server config at `pt mcp`:
1233
1351
 
1234
1352
  ### Tools
1235
1353
 
1236
- Every API command has a tool equivalent. Names are snake_case (e.g. the CLI's `pt chat send` → the `send_message` tool, `pt chat list` → `list_chats`):
1354
+ Core API management commands have tool equivalents; local scaffolding and the project publish/test orchestration commands remain CLI workflows. Tool names are snake_case (e.g. the CLI's `pt chat send` → the `send_message` tool, `pt chat list` → `list_chats`):
1237
1355
 
1238
1356
  | Group | Tools |
1239
1357
  |---|---|