primethink-cli 1.3.2__tar.gz → 1.3.4__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.4}/PKG-INFO +46 -9
  2. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/README.md +45 -8
  3. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/SPECS.md +8 -3
  4. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/USER_GUIDE.md +51 -10
  5. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/docs/cli-reference.md +133 -11
  6. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink.py +501 -6
  7. {primethink_cli-1.3.2 → primethink_cli-1.3.4/primethink_cli.egg-info}/PKG-INFO +46 -9
  8. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_cli.egg-info/SOURCES.txt +1 -0
  9. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/pyproject.toml +1 -1
  10. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/scripts/publish.sh +1 -0
  11. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/skills/primethink-cli/SKILL.md +10 -3
  12. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_cli.py +53 -2
  13. primethink_cli-1.3.4/tests/test_project_workflows.py +352 -0
  14. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_task_commands.py +13 -7
  15. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/DEVELOPER.md +0 -0
  16. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/LICENSE +0 -0
  17. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/MANIFEST.in +0 -0
  18. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/docs/install.md +0 -0
  19. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/docs/primethink_help_llms.txt +0 -0
  20. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/docs/superpowers/specs/2026-08-16-install-attached-skills-design.md +0 -0
  21. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/install/homebrew/primethink-cli.rb +0 -0
  22. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/install/install.cmd +0 -0
  23. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/install/install.ps1 +0 -0
  24. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/install/install.sh +0 -0
  25. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_cli.egg-info/dependency_links.txt +0 -0
  26. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_cli.egg-info/entry_points.txt +0 -0
  27. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_cli.egg-info/requires.txt +0 -0
  28. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_cli.egg-info/top_level.txt +0 -0
  29. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/primethink_mcp.py +0 -0
  30. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/scripts/build.sh +0 -0
  31. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/scripts/deploy.sh +0 -0
  32. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/setup.cfg +0 -0
  33. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/setup.py +0 -0
  34. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/skills/__init__.py +0 -0
  35. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_agent_commands.py +0 -0
  36. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_env_config.py +0 -0
  37. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_install_developer_skill.py +0 -0
  38. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_install_skill.py +0 -0
  39. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_live_app.py +0 -0
  40. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_mcp_server.py +0 -0
  41. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/tests/test_search_commands.py +0 -0
  42. {primethink_cli-1.3.2 → primethink_cli-1.3.4}/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.4
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,8 @@ 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 |
74
76
  | `pt profile add` | Configure an API token for a profile |
75
77
  | `pt profile use` | Switch the active profile |
76
78
  | `pt profile list` | List configured profiles |
@@ -80,6 +82,7 @@ pt chat send --agent AGENT_ID --message "your message"
80
82
  | `pt chat create` | Create a new chat |
81
83
  | `pt chat rename` | Rename a chat |
82
84
  | `pt chat goal` | Update a chat's goal |
85
+ | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
83
86
  | `pt chat messages` | List a chat's messages (cursor-paginated) |
84
87
  | `pt chat archive` / `pt chat unarchive` | Archive / unarchive a chat |
85
88
  | `pt chat delete` | Delete a chat (asks for confirmation; `--yes` to skip) |
@@ -108,7 +111,9 @@ pt chat send --agent AGENT_ID --message "your message"
108
111
  | `pt task get` | Fetch a task's details as JSON |
109
112
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
110
113
  | `pt task duplicate` | Duplicate a task |
111
- | `pt task publish` / `pt task unpublish` | Make a task public / private |
114
+ | `pt task set-public` / `pt task set-private` | Make a task public / private |
115
+ | `pt task publish` | Create/update a task from a project directory |
116
+ | `pt task test` | Sync a task goal into a new or existing chat |
112
117
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
113
118
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
114
119
  | `pt task create-version` | Snapshot a task's current state as a named version |
@@ -121,6 +126,8 @@ pt chat send --agent AGENT_ID --message "your message"
121
126
 
122
127
  Every command that calls the API also accepts `--profile` (use a specific profile for one request) and `--api-url`/`-u` (override the API URL for one request). See the [full CLI reference](docs/cli-reference.md) for every option and example.
123
128
 
129
+ `--help` works in either position: `pt chat send --help`, `pt chat --help send`, and `pt --help chat send` all print the same page.
130
+
124
131
  > **Tip:** `-p` is the short flag for `--profile` in the `pt task`, `pt agent`, and `pt search` groups, `pt image generate`, and `pt whoami`, but in the `pt chat` and `pt collection` groups there is no `-p` for profile — there `-p` means `--path` (a directory inside the chat/collection) on the file commands. Use the long form `--profile` when in doubt.
125
132
 
126
133
  ## Configuration
@@ -287,13 +294,23 @@ pt task upload-image 99 ./cover.png
287
294
  pt task export 99 --output tasks/briefing.json
288
295
  pt task import tasks/briefing.json --profile production
289
296
 
297
+ # Publish a conventional task project (GOAL.md required); pass an ID to update
298
+ pt task publish ./tasks/briefing --virtual-assistant-id 7
299
+ pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
300
+
301
+ # Make the resulting task public/private, or test its goal in a chat
302
+ pt task set-public 99
303
+ pt task set-private 99
304
+ pt task test ./tasks/briefing
305
+ pt task test ./tasks/briefing --chat-id EXISTING_CHAT_ID
306
+
290
307
  # Generate an image with AI
291
308
  pt image generate --prompt "A lighthouse at dawn" --output lighthouse.png
292
309
  ```
293
310
 
294
- ## Live App Scaffolding
311
+ ## Live App Workflows
295
312
 
296
- Create a new Live App project without configuring an API profile:
313
+ Scaffold a new Live App project without configuring an API profile:
297
314
 
298
315
  ```bash
299
316
  # Default: React + Tailwind + Flowbite
@@ -309,13 +326,33 @@ pt live-app new ./my-live-app \
309
326
  --ref v2.0.0
310
327
  ```
311
328
 
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.
329
+ 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.
330
+
331
+ 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.
332
+
333
+ ```bash
334
+ # Create a Live App task; add --task-id 123 to update it
335
+ pt live-app publish ./my-live-app --virtual-assistant-id 7
336
+ pt live-app publish ./my-live-app --task-id 123 --virtual-assistant-id 7
337
+
338
+ # Create a temporary test chat, or update an existing chat in place
339
+ pt live-app test ./my-live-app
340
+ pt live-app test ./my-live-app --chat-id EXISTING_CHAT_ID
341
+
342
+ # Change any chat's renderer explicitly
343
+ pt chat type EXISTING_CHAT_ID live-app
344
+ pt chat type EXISTING_CHAT_ID chat
345
+ ```
346
+
347
+ 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.
348
+
349
+ Automated Live App UI testing is no longer a `pt` command. It now lives in the `primethink-developer` skill as a deterministic, plan-driven workflow: the skill authors a reviewable `tests/test_plan.yaml`, runs it with a bundled Playwright runner (no LLM in the execution loop), reads the structured results, and heals failing selectors before re-running. Install it with `pt install-developer-skill`.
313
350
 
314
351
  ## MCP Server
315
352
 
316
353
  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`.
354
+ server, exposing the core PrimeThink API management operations as tools for MCP clients (Claude Code,
355
+ Claude Desktop, and others) to call directly — no shelling out to `pt`. Local scaffolding and project publish/test orchestration remain CLI workflows.
319
356
 
320
357
  The MCP SDK is an optional dependency, so CLI-only installs stay lean:
321
358
 
@@ -342,8 +379,8 @@ example (Claude Desktop / Claude Code `mcpServers` config):
342
379
 
343
380
  Without `PRIMETHINK_TOKEN` in the client config, the server falls back to your
344
381
  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
382
+ accept optional `profile` and `api_url` arguments. Core API management operations have tool
383
+ equivalents — messaging, chats, collections, tasks, agents, semantic search, and
347
384
  image generation. See the [CLI reference](docs/cli-reference.md#mcp-server-pt-mcp)
348
385
  for the full tool list.
349
386
 
@@ -37,6 +37,8 @@ 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 |
40
42
  | `pt profile add` | Configure an API token for a profile |
41
43
  | `pt profile use` | Switch the active profile |
42
44
  | `pt profile list` | List configured profiles |
@@ -46,6 +48,7 @@ pt chat send --agent AGENT_ID --message "your message"
46
48
  | `pt chat create` | Create a new chat |
47
49
  | `pt chat rename` | Rename a chat |
48
50
  | `pt chat goal` | Update a chat's goal |
51
+ | `pt chat type` | Switch a chat between `live-app` and `chat` mode |
49
52
  | `pt chat messages` | List a chat's messages (cursor-paginated) |
50
53
  | `pt chat archive` / `pt chat unarchive` | Archive / unarchive a chat |
51
54
  | `pt chat delete` | Delete a chat (asks for confirmation; `--yes` to skip) |
@@ -74,7 +77,9 @@ pt chat send --agent AGENT_ID --message "your message"
74
77
  | `pt task get` | Fetch a task's details as JSON |
75
78
  | `pt task delete` | Delete a task (asks for confirmation; `--yes` to skip) |
76
79
  | `pt task duplicate` | Duplicate a task |
77
- | `pt task publish` / `pt task unpublish` | Make a task public / private |
80
+ | `pt task set-public` / `pt task set-private` | Make a task public / private |
81
+ | `pt task publish` | Create/update a task from a project directory |
82
+ | `pt task test` | Sync a task goal into a new or existing chat |
78
83
  | `pt task export` | Export a task's portable config as JSON (for `pt task import`) |
79
84
  | `pt task import` | Create a new task from an exported JSON file (deploy across environments with `--profile`) |
80
85
  | `pt task create-version` | Snapshot a task's current state as a named version |
@@ -87,6 +92,8 @@ pt chat send --agent AGENT_ID --message "your message"
87
92
 
88
93
  Every command that calls the API also accepts `--profile` (use a specific profile for one request) and `--api-url`/`-u` (override the API URL for one request). See the [full CLI reference](docs/cli-reference.md) for every option and example.
89
94
 
95
+ `--help` works in either position: `pt chat send --help`, `pt chat --help send`, and `pt --help chat send` all print the same page.
96
+
90
97
  > **Tip:** `-p` is the short flag for `--profile` in the `pt task`, `pt agent`, and `pt search` groups, `pt image generate`, and `pt whoami`, but in the `pt chat` and `pt collection` groups there is no `-p` for profile — there `-p` means `--path` (a directory inside the chat/collection) on the file commands. Use the long form `--profile` when in doubt.
91
98
 
92
99
  ## Configuration
@@ -253,13 +260,23 @@ pt task upload-image 99 ./cover.png
253
260
  pt task export 99 --output tasks/briefing.json
254
261
  pt task import tasks/briefing.json --profile production
255
262
 
263
+ # Publish a conventional task project (GOAL.md required); pass an ID to update
264
+ pt task publish ./tasks/briefing --virtual-assistant-id 7
265
+ pt task publish ./tasks/briefing --task-id 99 --virtual-assistant-id 7
266
+
267
+ # Make the resulting task public/private, or test its goal in a chat
268
+ pt task set-public 99
269
+ pt task set-private 99
270
+ pt task test ./tasks/briefing
271
+ pt task test ./tasks/briefing --chat-id EXISTING_CHAT_ID
272
+
256
273
  # Generate an image with AI
257
274
  pt image generate --prompt "A lighthouse at dawn" --output lighthouse.png
258
275
  ```
259
276
 
260
- ## Live App Scaffolding
277
+ ## Live App Workflows
261
278
 
262
- Create a new Live App project without configuring an API profile:
279
+ Scaffold a new Live App project without configuring an API profile:
263
280
 
264
281
  ```bash
265
282
  # Default: React + Tailwind + Flowbite
@@ -275,13 +292,33 @@ pt live-app new ./my-live-app \
275
292
  --ref v2.0.0
276
293
  ```
277
294
 
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.
295
+ 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.
296
+
297
+ 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.
298
+
299
+ ```bash
300
+ # Create a Live App task; add --task-id 123 to update it
301
+ pt live-app publish ./my-live-app --virtual-assistant-id 7
302
+ pt live-app publish ./my-live-app --task-id 123 --virtual-assistant-id 7
303
+
304
+ # Create a temporary test chat, or update an existing chat in place
305
+ pt live-app test ./my-live-app
306
+ pt live-app test ./my-live-app --chat-id EXISTING_CHAT_ID
307
+
308
+ # Change any chat's renderer explicitly
309
+ pt chat type EXISTING_CHAT_ID live-app
310
+ pt chat type EXISTING_CHAT_ID chat
311
+ ```
312
+
313
+ 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.
314
+
315
+ Automated Live App UI testing is no longer a `pt` command. It now lives in the `primethink-developer` skill as a deterministic, plan-driven workflow: the skill authors a reviewable `tests/test_plan.yaml`, runs it with a bundled Playwright runner (no LLM in the execution loop), reads the structured results, and heals failing selectors before re-running. Install it with `pt install-developer-skill`.
279
316
 
280
317
  ## MCP Server
281
318
 
282
319
  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`.
320
+ server, exposing the core PrimeThink API management operations as tools for MCP clients (Claude Code,
321
+ Claude Desktop, and others) to call directly — no shelling out to `pt`. Local scaffolding and project publish/test orchestration remain CLI workflows.
285
322
 
286
323
  The MCP SDK is an optional dependency, so CLI-only installs stay lean:
287
324
 
@@ -308,8 +345,8 @@ example (Claude Desktop / Claude Code `mcpServers` config):
308
345
 
309
346
  Without `PRIMETHINK_TOKEN` in the client config, the server falls back to your
310
347
  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
348
+ accept optional `profile` and `api_url` arguments. Core API management operations have tool
349
+ equivalents — messaging, chats, collections, tasks, agents, semantic search, and
313
350
  image generation. See the [CLI reference](docs/cli-reference.md#mcp-server-pt-mcp)
314
351
  for the full tool list.
315
352
 
@@ -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,11 @@ 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 |
67
72
  | `pt task export` | `GET /api/v1/tasks/{task_id}` (portable fields filtered client-side) |
68
73
  | `pt task import` | `POST /api/v1/tasks/` |
69
74
  | `pt task create-version` | `POST /api/v1/tasks/{task_id}/versions` |
@@ -493,8 +498,8 @@ pt task duplicate TASK_ID
493
498
 
494
499
  **CLI Commands** (the CLI exposes the public/private pair; use `pt task update --type` for the rest):
495
500
  ```bash
496
- pt task publish TASK_ID # task_type=public
497
- pt task unpublish TASK_ID # task_type=private
501
+ pt task set-public TASK_ID # task_type=public
502
+ pt task set-private TASK_ID # task_type=private
498
503
  ```
499
504
 
500
505
  ---
@@ -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,36 @@ 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
+
815
+ 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.
816
+
817
+ Automated UI testing of a Live App is not part of the CLI. It is a deterministic, plan-driven workflow provided by the `primethink-developer` skill (`pt install-developer-skill`): the skill captures the running app's accessibility snapshot, authors a reviewable `tests/test_plan.yaml`, runs it with a bundled Playwright runner without an LLM in the execution loop, reads the structured results, and heals failing selectors before re-running.
818
+
789
819
  ## MCP Server
790
820
 
791
- Everything the CLI can do, PrimeThink can also expose over the [Model Context
821
+ Core API management operations can also be exposed over the [Model Context
792
822
  Protocol (MCP)](https://modelcontextprotocol.io) — the same code, running as a
793
823
  server that AI assistants talk to directly. Instead of an assistant shelling out
794
824
  to `pt`, it calls typed tools like `send_message`, `list_chats`, `create_task`,
795
- and `search_documents`.
825
+ and `search_documents`. Local scaffolding and project publish/test orchestration
826
+ remain CLI workflows.
796
827
 
797
828
  ### When to use it
798
829
 
@@ -834,9 +865,10 @@ overrides.
834
865
 
835
866
  A few things to know:
836
867
 
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.
868
+ - Core API management operations have tool equivalents (messaging, chats, collections, tasks,
869
+ agents, semantic search, images). Local scaffolding and project publish/test orchestration
870
+ remain CLI workflows. Field-heavy tools like `create_task` expose common fields plus an
871
+ `extra_fields` object for anything else.
840
872
  - File and sync tools read and write on the machine where the server runs — your
841
873
  own machine, for a locally launched server.
842
874
  - Unlike the CLI, delete tools don't prompt for confirmation; your MCP client is
@@ -1333,6 +1365,15 @@ pt task create --help
1333
1365
  pt chat sync-to --help
1334
1366
  ```
1335
1367
 
1368
+ `--help` also works *before* the command it describes — the CLI resolves the rest
1369
+ of the command path, so `pt --help chat send` and `pt chat --help send` print the
1370
+ same page as `pt chat send --help`:
1371
+
1372
+ ```bash
1373
+ pt --help chat send
1374
+ pt chat --help send
1375
+ ```
1376
+
1336
1377
  ### Documentation
1337
1378
 
1338
1379
  - [README](README.md) - Quick start guide
@@ -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,8 @@ 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)
18
20
  - [Profiles: `pt profile`](#profiles-pt-profile)
19
21
  - [`pt profile add`](#pt-profile-add)
20
22
  - [`pt profile use`](#pt-profile-use)
@@ -26,6 +28,7 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
26
28
  - [`pt chat create`](#pt-chat-create)
27
29
  - [`pt chat rename`](#pt-chat-rename)
28
30
  - [`pt chat goal`](#pt-chat-goal)
31
+ - [`pt chat type`](#pt-chat-type)
29
32
  - [`pt chat messages`](#pt-chat-messages)
30
33
  - [`pt chat archive`](#pt-chat-archive)
31
34
  - [`pt chat unarchive`](#pt-chat-unarchive)
@@ -58,8 +61,10 @@ Commands are organized into noun groups: `profile`, `live-app`, `chat`, `collect
58
61
  - [`pt task get`](#pt-task-get)
59
62
  - [`pt task delete`](#pt-task-delete)
60
63
  - [`pt task duplicate`](#pt-task-duplicate)
64
+ - [`pt task set-public`](#pt-task-set-public)
65
+ - [`pt task set-private`](#pt-task-set-private)
61
66
  - [`pt task publish`](#pt-task-publish)
62
- - [`pt task unpublish`](#pt-task-unpublish)
67
+ - [`pt task test`](#pt-task-test)
63
68
  - [`pt task export`](#pt-task-export)
64
69
  - [`pt task import`](#pt-task-import)
65
70
  - [`pt task create-version`](#pt-task-create-version)
@@ -94,6 +99,23 @@ Every command that calls the API accepts these two options:
94
99
  > `--path` (a directory inside the chat/collection) on the file commands. When in doubt,
95
100
  > use the long forms.
96
101
 
102
+ ### Getting help
103
+
104
+ `--help` can be written before or after the command it describes — the CLI resolves
105
+ the whole command path that follows the flag, so these three are equivalent:
106
+
107
+ ```bash
108
+ pt chat send --help
109
+ pt chat --help send
110
+ pt --help chat send
111
+ ```
112
+
113
+ A leading `--help` never errors: it descends as far as the path is recognized, so
114
+ `pt --help chat nope` describes `pt chat`, and `pt --help nope` describes `pt`. A
115
+ *trailing* `--help` keeps Click's own behavior, where the command path has to
116
+ resolve before the flag is reached — `pt chat nope --help` is still a
117
+ `No such command 'nope'` error.
118
+
97
119
  ### Output
98
120
 
99
121
  - Commands that call the API print the JSON response, pretty-printed with 2-space indentation, to stdout. This makes output easy to pipe into `jq` or redirect to a file.
@@ -132,7 +154,7 @@ Display the CLI version.
132
154
 
133
155
  ```bash
134
156
  pt version
135
- # PrimeThink CLI v1.2.0
157
+ # PrimeThink CLI v1.3.3
136
158
  ```
137
159
 
138
160
  ### `pt whoami`
@@ -150,7 +172,7 @@ pt whoami --profile production
150
172
 
151
173
  ### `pt mcp`
152
174
 
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.
175
+ 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
176
 
155
177
  ```bash
156
178
  pt mcp
@@ -227,7 +249,7 @@ pt install-developer-skill --force --ref <TAG_OR_COMMIT>
227
249
 
228
250
  ## Live Apps: `pt live-app`
229
251
 
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.
252
+ 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
253
 
232
254
  ### `pt live-app new`
233
255
 
@@ -297,6 +319,59 @@ A custom repository provides `live-app-templates/manifest.json` at its root. Eac
297
319
 
298
320
  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
321
 
322
+ ### `pt live-app publish`
323
+
324
+ 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.
325
+
326
+ ```bash
327
+ pt live-app publish DIRECTORY --virtual-assistant-id ID [OPTIONS]
328
+ ```
329
+
330
+ | Option | Default | Description |
331
+ |---|---|---|
332
+ | `--task-id ID` | create | Update this task instead of creating one |
333
+ | `--virtual-assistant-id ID` | required | Agent assigned to the task |
334
+ | `--app-dir DIRECTORY` | auto | Flat artifact directory; otherwise checks `dist/`, `app/`, then project root |
335
+ | `--version-name NAME` | `Production` | Name used for the task version and document versions |
336
+ | `--profile`, `--api-url` | active profile | Connection selection |
337
+
338
+ 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.
339
+
340
+ ```bash
341
+ pt live-app publish ./decision-board --virtual-assistant-id 7
342
+ pt live-app publish ./decision-board --task-id 42 --virtual-assistant-id 7
343
+ ```
344
+
345
+ ### `pt live-app test`
346
+
347
+ 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`.
348
+
349
+ ```bash
350
+ pt live-app test DIRECTORY [OPTIONS]
351
+ ```
352
+
353
+ | Option | Default | Description |
354
+ |---|---|---|
355
+ | `--chat-id CHAT_ID` | create | Reuse this existing chat |
356
+ | `--workspace-id ID` | unset | Workspace for a newly created chat |
357
+ | `--temporary` / `--permanent` | temporary | Lifetime of a newly created chat |
358
+ | `--app-dir DIRECTORY` | auto | Override flat artifact discovery |
359
+ | `--version-name NAME` | `Production` | Document version name |
360
+ | `--open` | off | Open the resulting chat in a browser |
361
+ | `--web-url URL` | derived from API URL | Web URL used for output/opening (defaults to the active profile's API host, mapping `api.` → `app.`) |
362
+
363
+ ```bash
364
+ pt live-app test ./decision-board
365
+ pt live-app test ./decision-board --chat-id CHAT_UUID --open
366
+ ```
367
+
368
+ > **UI testing moved out of the CLI.** Automated Live App UI testing is now a
369
+ > deterministic, plan-driven workflow owned by the `primethink-developer` skill
370
+ > rather than a `pt` subcommand — the skill authors a reviewable
371
+ > `tests/test_plan.yaml`, runs it with a bundled Playwright runner (no LLM in the
372
+ > execution loop), and heals failing selectors. See the skill's UI-testing guide.
373
+ > This removes the CLI's `kiro-cli` dependency.
374
+
300
375
  ---
301
376
 
302
377
  ## Profiles: `pt profile`
@@ -475,6 +550,17 @@ pt chat goal 123 --goal "Track the Q3 launch checklist"
475
550
  pt chat goal 123 --goal-file ./goal.md
476
551
  ```
477
552
 
553
+ ### `pt chat type`
554
+
555
+ 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`.
556
+
557
+ ```bash
558
+ pt chat type CHAT_ID (live-app|chat) [--profile NAME] [--api-url URL]
559
+
560
+ pt chat type 123 live-app
561
+ pt chat type 123 chat
562
+ ```
563
+
478
564
  ### `pt chat messages`
479
565
 
480
566
  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 +1084,56 @@ pt task duplicate TASK_ID [--profile NAME] [--api-url URL]
998
1084
  pt task duplicate 99 | jq '.id'
999
1085
  ```
1000
1086
 
1087
+ ### `pt task set-public`
1088
+
1089
+ Make a task public via the task public-status endpoint.
1090
+
1091
+ ```bash
1092
+ pt task set-public TASK_ID [--profile NAME] [--api-url URL]
1093
+ ```
1094
+
1095
+ ### `pt task set-private`
1096
+
1097
+ 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`.
1098
+
1099
+ ```bash
1100
+ pt task set-private TASK_ID [--profile NAME] [--api-url URL]
1101
+ ```
1102
+
1001
1103
  ### `pt task publish`
1002
1104
 
1003
- Make a task public sets its type to `public` via the task public-status endpoint.
1105
+ Create a private task from a conventional project directory, or synchronize the metadata into an existing task when `--task-id` is passed.
1106
+
1107
+ ```bash
1108
+ pt task publish DIRECTORY --virtual-assistant-id ID [--task-id ID] [--profile NAME] [--api-url URL]
1109
+ ```
1110
+
1111
+ `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
1112
 
1005
1113
  ```bash
1006
- pt task publish TASK_ID [--profile NAME] [--api-url URL]
1114
+ pt task publish ./tasks/morning-briefing --virtual-assistant-id 7
1115
+ pt task publish ./tasks/morning-briefing --task-id 99 --virtual-assistant-id 7
1007
1116
  ```
1008
1117
 
1009
- ### `pt task unpublish`
1118
+ ### `pt task test`
1119
+
1120
+ 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
1121
 
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`.
1122
+ ```bash
1123
+ pt task test DIRECTORY [OPTIONS]
1124
+ ```
1125
+
1126
+ | Option | Default | Description |
1127
+ |---|---|---|
1128
+ | `--chat-id CHAT_ID` | create | Reuse this existing chat |
1129
+ | `--workspace-id ID` | unset | Workspace for a newly created chat |
1130
+ | `--temporary` / `--permanent` | temporary | Lifetime of a newly created chat |
1131
+ | `--open` | off | Open the resulting chat in a browser |
1132
+ | `--web-url URL` | derived from API URL | Web URL used for output/opening (defaults to the active profile's API host, mapping `api.` → `app.`) |
1012
1133
 
1013
1134
  ```bash
1014
- pt task unpublish TASK_ID [--profile NAME] [--api-url URL]
1135
+ pt task test ./tasks/morning-briefing
1136
+ pt task test ./tasks/morning-briefing --chat-id CHAT_UUID --permanent
1015
1137
  ```
1016
1138
 
1017
1139
  ### `pt task export`
@@ -1233,7 +1355,7 @@ Point an MCP client's server config at `pt mcp`:
1233
1355
 
1234
1356
  ### Tools
1235
1357
 
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`):
1358
+ 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
1359
 
1238
1360
  | Group | Tools |
1239
1361
  |---|---|