@palettelab/cli 0.3.1 → 0.3.2

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 (2) hide show
  1. package/README.md +92 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -26,18 +26,27 @@ pltt <command>
26
26
  Scaffold a new plugin directory from the official template.
27
27
 
28
28
  ```bash
29
- npx @palettelab/cli init data-explorer
29
+ pltt init data-explorer
30
+ pltt init crm-dashboard --template dashboard
30
31
  cd data-explorer
31
32
  ```
32
33
 
33
34
  Creates `data-explorer/` with a valid `palette-plugin.json`, a frontend React entry, and a FastAPI backend entry.
34
35
 
36
+ Templates:
37
+
38
+ - `dashboard`
39
+ - `agent-tool`
40
+ - `external-service`
41
+ - `database`
42
+ - `frontend-only`
43
+
35
44
  ### `pltt dev`
36
45
 
37
46
  Boot the platform locally with your plugin mounted live. Run this from inside your plugin directory.
38
47
 
39
48
  ```bash
40
- npx @palettelab/cli dev
49
+ pltt dev
41
50
  ```
42
51
 
43
52
  Under the hood this runs `docker compose up` with a bundled compose file. It starts:
@@ -57,14 +66,94 @@ Environment variables:
57
66
  | `PALETTE_FRONTEND_PORT` | `3000` | Host port for the frontend |
58
67
  | `PALETTE_BACKEND_PORT` | `8000` | Host port for the backend |
59
68
 
69
+ ### `pltt doctor`
70
+
71
+ Check local tooling and common setup problems.
72
+
73
+ ```bash
74
+ pltt doctor
75
+ ```
76
+
77
+ Checks include Node version, Docker availability, platform image availability, port availability, manifest validity, entry files, and frontend bundling.
78
+
60
79
  ### `pltt build`
61
80
 
62
81
  Validate `palette-plugin.json` and check that all declared entry files exist. Run this before pushing a release.
63
82
 
64
83
  ```bash
65
- npx @palettelab/cli build
84
+ pltt build
85
+ ```
86
+
87
+ Also lints plugin migrations for unsafe RLS patterns when `database.migrations` is declared.
88
+
89
+ ### `pltt test`
90
+
91
+ Run local contract checks before publishing.
92
+
93
+ ```bash
94
+ pltt test
95
+ pltt test --json
96
+ ```
97
+
98
+ Checks include manifest validity, frontend bundling, backend import, route permission gates, route permission declarations, migration linting, frontend sandbox policy, and dependency policy for `package.json` / `pyproject.toml`.
99
+
100
+ ### `pltt package`
101
+
102
+ Bundle the plugin into `dist/<plugin-id>-<version>.tar.gz` without uploading.
103
+
104
+ ```bash
105
+ pltt package
106
+ pltt package --json
107
+ ```
108
+
109
+ Use this to inspect the publishable artifact before sending it to a Palette environment.
110
+
111
+ ### `pltt publish`
112
+
113
+ Build and publish the plugin to a Palette appstore environment.
114
+
115
+ ```bash
116
+ pltt publish --env local
117
+ pltt publish --env staging
118
+ pltt publish --env production
119
+ pltt publish --env production -y
120
+ pltt publish --env staging --json
66
121
  ```
67
122
 
123
+ Publishing bundles frontend/backend artifacts, uploads them, creates a `pending_review` publish record, and prints review/preview URLs when the platform returns them.
124
+
125
+ Environment config is read from `./palette.config.json`, `~/.palette/config.json`, or `PALETTE_<ENV>_URL` plus `PALETTE_<ENV>_TOKEN` / `PALETTE_PUBLISH_TOKEN`.
126
+
127
+ ### `pltt status <publish-id>`
128
+
129
+ Show review status and automated risk report details for a publish.
130
+
131
+ ```bash
132
+ pltt status 123 --env staging
133
+ pltt status --json
134
+ ```
135
+
136
+ If no publish ID is provided, the CLI uses `.palette/last-publish.json` when available.
137
+
138
+ ### `pltt logs [plugin-id]`
139
+
140
+ Fetch or stream telemetry events for a plugin.
141
+
142
+ ```bash
143
+ pltt logs hello-sdk --env staging
144
+ pltt logs --tail 100
145
+ pltt logs --follow
146
+ pltt logs --json
147
+ ```
148
+
149
+ If no plugin ID is provided, the CLI uses the current `palette-plugin.json` or `.palette/last-publish.json`.
150
+
151
+ ## Global Flags
152
+
153
+ - `--json` emits machine-readable output for `package`, `publish`, `status`, `logs`, and `test`.
154
+ - `--env <name>` selects a configured publish/status/logs environment.
155
+ - `-y, --yes` skips production publish confirmation.
156
+
68
157
  ## What gets shipped
69
158
 
70
159
  `@palettelab/cli` itself contains only:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palettelab/cli",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Developer CLI for building Palette platform plugins — no platform source access required.",
5
5
  "bin": {
6
6
  "pltt": "bin/pltt.js"