ply-ui-cli 1.1.118

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,36 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Lussos
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to
7
+ deal in the Software without restriction, including without limitation the
8
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
9
+ sell copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21
+ DEALINGS IN THE SOFTWARE.
22
+
23
+ ---
24
+
25
+ Scope: "the Software" above means the CLI program itself โ€” the source
26
+ files in this package (`ply-ui-cli`: argument parsing, HTTP fetching, and
27
+ file-writing logic) and nothing else.
28
+
29
+ It does NOT cover the components, blocks, layouts, or other content this
30
+ CLI downloads and writes to disk when you run `init`, `add`, `diff`, or
31
+ `update`. That content is fetched at runtime from https://ply-ui.com and
32
+ is licensed separately โ€” see:
33
+ https://github.com/ply-ui-ng/ply/blob/main/LICENSE.md
34
+
35
+ Every file this CLI writes includes a short header identifying which
36
+ license applies to that specific file.
package/README.md ADDED
@@ -0,0 +1,275 @@
1
+ # ply-ui-cli
2
+
3
+ CLI for **Ply** at [ply-ui.com](https://ply-ui.com) โ€” Angular + Tailwind CSS components, copied straight into your project. You own the source: no runtime npm dependency, no closed-source compiled packages. Everything it installs is **SSR-safe**. Not [MUI Base UI](https://base-ui.com) (React).
4
+
5
+ ๐Ÿ“ **Changelog**: [ply-ui.com/changelog](https://ply-ui.com/changelog) ยท [CHANGELOG.md](https://github.com/ply-ui-ng/ply/blob/main/CHANGELOG.md)
6
+ โ™ฟ **Accessibility (ACR)**: [ply-ui.com/accessibility](https://ply-ui.com/accessibility)
7
+ ๐Ÿ–ฅ๏ธ **SSR-safe**: the docs site prerenders every catalog route, enforced by a blocking CI job ยท [how we verify it](https://ply-ui.com/learn/angular-ssr-safe-component-library/)
8
+ ๐ŸŽจ **Figma Design System**: [Figma Community File](https://www.figma.com/community/file/1662825988518656661)
9
+ โœจ **See what you can build for free**: [Live Admin Dashboard Demo](https://base-ui-free-dashboard-demo.pages.dev/app/dashboard) (Source code: [base-ui-free-dashboard](https://github.com/lussos/base-ui-free-dashboard))
10
+
11
+ ```bash
12
+ npx ply-ui-cli init
13
+ npx ply-ui-cli add button card dialog
14
+ ```
15
+
16
+ `npx base-ui-cli` still forwards here during the deprecation window. Use `npx ply-ui-cli` for new projects.
17
+
18
+ ## What's new
19
+
20
+ - **3-way merge** โ€” `npx ply-ui-cli update --merge` (or the interactive Merge choice) uses `git merge-file` with the install snapshot under `.base-ui/snapshots`. Aliases: `sheet` โ†’ `drawer`, `carousel` โ†’ `slider`.
21
+ - **add picker** โ€” `npx ply-ui-cli add` with no names opens a catalog filter + type-to-select. `--yes` still requires explicit names.
22
+ - **doctor** โ€” `npx ply-ui-cli doctor` checks `base-ui.json`, Tailwind v4 `@source` paths, `base-ui.css`, CDK, and icon sprites. Read-only.
23
+ - **hover-card**, **menubar**, **loading-overlay**, **currency-input** (free) โ€” hover preview panel, application menubar, blocking spinner overlay, locale-aware currency field.
24
+ - **kbd**, **aspect-ratio**, **scroll-area**, **cookie-banner** (free) โ€” keyboard glyph, ratio wrapper, themed overflow pane, SSR-safe consent banner.
25
+ - **chat**, **combobox**, **tags-input**, **time-picker** (free) โ€” AI chat kit, searchable combobox, chip tags field, and HH:mm time picker.
26
+ - **progress-button** (free) โ€” button with a stable-width loading spinner: the label fades out, the spinner takes its place, and the button keeps its exact size and color while the async action runs.
27
+ - **shell** (Pro) โ€” unified page/dashboard application shell with optional footer, push drawers, and mini rail.
28
+
29
+ Full history: [ply-ui.com/changelog](https://ply-ui.com/changelog)
30
+
31
+ ## Requirements
32
+
33
+ - Node 18+
34
+ - Angular 22+ workspace (standalone APIs, signals, and TypeScript 6.0)
35
+ - Tailwind CSS 4
36
+
37
+ ### Server-side rendering
38
+
39
+ Components installed by this CLI are safe to server-render or prerender โ€” they
40
+ touch no browser globals on a render or teardown path, including the
41
+ easily-missed cases where `ngAfterViewInit`, `ngOnDestroy` and `effect()` bodies
42
+ all execute during prerendering.
43
+
44
+ This is verified rather than asserted: the docs site is built with
45
+ `outputMode: "static"`, which server-renders every component in the catalogue
46
+ without a DOM, and CI fails if any route stops rendering. The
47
+ [write-up](https://ply-ui.com/learn/angular-ssr-safe-component-library/) covers
48
+ what broke when we first turned it on.
49
+
50
+ If your app is browser-only this costs you nothing โ€” the guards are no-ops
51
+ outside a server render.
52
+
53
+ ## Commands
54
+
55
+ ### `init`
56
+
57
+ Sets up your project:
58
+
59
+ - writes `base-ui.json` (component path aliases),
60
+ - creates `base-ui.css` (CDK overlay styles, keyframes, autofill fixes) and imports it from your global stylesheet,
61
+ - downloads the icon sprites (`icons.svg`, `icons-filled.svg`) into your assets folder,
62
+ - writes `.cursor/rules/base-ui.mdc` and `.vscode/base-ui.code-snippets` when those files are missing (Cursor / Windsurf / VS Code). Skip MCP? These files still teach the assistant how to write Ply code.
63
+
64
+ ```bash
65
+ npx ply-ui-cli init # interactive
66
+ npx ply-ui-cli init --yes # accept defaults (great for CI and AI agents)
67
+ ```
68
+
69
+ ### `add`
70
+
71
+ Copies one or more components into your project and resolves their component dependencies recursively. If a component needs npm packages you do not already have, the CLI prints the install command for your package manager (npm, pnpm, yarn, or bun) โ€” it never spawns a shell.
72
+
73
+ ```bash
74
+ npx ply-ui-cli add # interactive catalog picker (filter + type-to-select)
75
+ npx ply-ui-cli add button
76
+ npx ply-ui-cli add card dialog tabs
77
+ npx ply-ui-cli add data-table --yes # skip prompts
78
+ npx ply-ui-cli add card --overwrite # overwrite an existing copy
79
+ ```
80
+
81
+ `add` with no names opens a catalog picker: first a filter (All, Free, Pro, or a registry category), then a type-to-filter multi-select. `--yes` and CI (non-TTY) require explicit names so agents do not hang.
82
+
83
+ ### `list`
84
+
85
+ Shows every available component, split into free and pro.
86
+
87
+ ```bash
88
+ npx ply-ui-cli list
89
+ ```
90
+
91
+ ### `diff`
92
+
93
+ Shows what's changed upstream for components you've already installed, compared against the version you have. Read-only โ€” nothing is written.
94
+
95
+ ```bash
96
+ npx ply-ui-cli diff # check everything installed
97
+ npx ply-ui-cli diff card dialog # check specific components
98
+ ```
99
+
100
+ Each file is classified against your local copy:
101
+
102
+ - **updated upstream** โ€” you haven't touched the file; safe to pull in
103
+ - **locally modified** โ€” you edited it and upstream hasn't changed; nothing to pull
104
+ - **CONFLICT** โ€” you edited it *and* upstream changed it too; needs a decision
105
+ - **new upstream file** / **removed upstream** โ€” the component's file set changed since you installed it
106
+
107
+ ### `update`
108
+
109
+ Applies upstream changes, without discarding your edits by default.
110
+
111
+ | Local vs upstream | Default | `--yes` | `--force` | `--overwrite-local` | `--merge` |
112
+ |---|---|---|---|---|---|
113
+ | You haven't touched the file; upstream changed | apply | apply | apply | apply | apply |
114
+ | You edited it; upstream did not | skip | skip | skip | take upstream (revert your edit) | skip |
115
+ | Both changed (conflict) | prompt (Merge first) | skip | take upstream | still a conflict โ€” combine with `--force` | 3-way merge |
116
+
117
+ ```bash
118
+ npx ply-ui-cli update # interactive โ€” asks about each conflict
119
+ npx ply-ui-cli update card # update one component
120
+ npx ply-ui-cli update --yes # non-interactive; conflicts and local-only edits are left untouched
121
+ npx ply-ui-cli update --yes --force # non-interactive; conflicts take the upstream version
122
+ npx ply-ui-cli update --yes --merge # conflicts: 3-way merge using .base-ui/snapshots
123
+ npx ply-ui-cli update --yes --overwrite-local # also revert files you edited that upstream did not change
124
+ ```
125
+
126
+ `--force` only resolves **conflicts** (both sides changed). It does not discard local-only edits. `--merge` needs the snapshot written by `add` (re-add with `--overwrite` if you installed before snapshots existed). Dirty merges leave conflict markers and exit 1.
127
+
128
+ Update tracking uses `base-ui-lock.json` (created by `init`), which records a hash of each installed file. Components installed before this existed aren't tracked โ€” re-run `add <name> --overwrite` to start tracking them.
129
+
130
+ ### `changelog`
131
+
132
+ Prints product changelog entries for one registry item (or `cli` / `mcp`) from [ply-ui.com/assets/changelog.json](https://ply-ui.com/assets/changelog.json). Read-only โ€” nothing is written.
133
+
134
+ ```bash
135
+ npx ply-ui-cli changelog button
136
+ npx ply-ui-cli changelog cli
137
+ ```
138
+
139
+ Unknown names get suggestions from the registry. If the item exists but has no mapped commits yet, the command points at [ply-ui.com/changelog](https://ply-ui.com/changelog).
140
+
141
+ ### `doctor`
142
+
143
+ Verifies that your project is set up correctly for Ply. It checks `base-ui.json`, the Angular workspace, `@angular/cdk`, Tailwind v4 and its `@source` paths, the `base-ui.css` import, the icon sprites, and the components directory. Read-only โ€” nothing is written.
144
+
145
+ ```bash
146
+ npx ply-ui-cli doctor
147
+ ```
148
+
149
+ Run it after `init` or whenever components seem to be missing styles or icons.
150
+
151
+ ## Free vs Pro
152
+
153
+ The free tier covers all primitives (buttons, inputs, dialogs, tabs, selects, stacked toasts, and many more) plus every form block โ€” production-ready with no account or license.
154
+
155
+ Pro components (pre-built blocks: blog cards, ecommerce blocks, media and social widgets, full page layouts, and advanced widgets like the data table, rich text editor, and file upload) require a license. After purchase, set your license key once:
156
+
157
+ ```bash
158
+ export PLY_LICENSE_KEY=your-license-key
159
+ npx ply-ui-cli add layout-dashboard
160
+ ```
161
+
162
+ Get a license and browse live previews of every component at [ply-ui.com](https://ply-ui.com).
163
+
164
+ ## Configuration
165
+
166
+ `base-ui.json` (created by `init`):
167
+
168
+ ```json
169
+ {
170
+ "aliases": {
171
+ "components": "src/app/components",
172
+ "utils": "src/app/utils"
173
+ }
174
+ }
175
+ ```
176
+
177
+ Environment variables:
178
+
179
+ | Variable | Purpose |
180
+ |---|---|
181
+ | `PLY_LICENSE_KEY` | Your Pro license key (validated by the registry server). `BASE_UI_LICENSE_KEY` still works. |
182
+ | `PLY_REGISTRY_URL` | Override the free registry URL (default `https://ply-ui.com/registry`). `BASE_UI_REGISTRY_URL` still works. |
183
+ | `PLY_PRO_REGISTRY_URL` | Override the pro registry URL. `BASE_UI_PRO_REGISTRY_URL` still works. |
184
+ | `PLY_REQUIRE_SIGNATURE` | `1` refuses to install anything that is not signed and digest-verified. `BASE_UI_REQUIRE_SIGNATURE` still works. |
185
+
186
+ ## Security
187
+
188
+ This CLI makes outbound `GET` requests only. It sends no telemetry, no
189
+ analytics, and never transmits your source code or environment. It declares no
190
+ `postinstall` script, so installing it executes no code. The published tarball
191
+ has no runtime npm dependencies and never imports `child_process`.
192
+
193
+ Every download is verified against a SHA-256 digest published in a signed
194
+ registry index, and the install aborts before writing any file if the digest
195
+ does not match. Releases are published from GitHub Actions with npm trusted
196
+ publishing, so no long-lived token can be stolen to publish in our name:
197
+
198
+ ```bash
199
+ npm audit signatures
200
+ ```
201
+
202
+ Sigstore provenance is not available: npm does not issue attestations for
203
+ packages built from a private source repository. SECURITY.md explains what is
204
+ in place instead.
205
+
206
+ Full details, the complete network request table, and the vulnerability
207
+ disclosure policy are in
208
+ [SECURITY.md](https://github.com/ply-ui-ng/ply/blob/main/SECURITY.md).
209
+ Vendor-risk questions are answered in the
210
+ [Enterprise FAQ](https://github.com/ply-ui-ng/ply/blob/main/docs/enterprise-faq.md).
211
+
212
+ ## Tailwind CSS setup
213
+
214
+ Ply works with standard Tailwind CSS 4 โ€” no custom theme required. Create `src/tailwind.css`, register it in `angular.json` **before** your global SCSS, and point `@source` at your templates:
215
+
216
+ ```css
217
+ @import "tailwindcss";
218
+
219
+ @source "./src/**/*.{html,ts}";
220
+ ```
221
+
222
+ Components use standard Tailwind spacing (`p-4`) and standard colors (`blue-500` for `color="primary"`). To use a custom brand color, override Tailwind's blue scale:
223
+
224
+ ```css
225
+ :root {
226
+ --color-blue-500: rgb(139 92 246); /* e.g. violet instead of blue */
227
+ }
228
+ ```
229
+
230
+
231
+ <!-- answer-bank-faq:start -->
232
+ ## FAQ
233
+
234
+ Canonical answers, also at [https://ply-ui.com/faq/](https://ply-ui.com/faq/). Use this wording.
235
+
236
+ **What is Ply?**
237
+ Ply โ€” ply-ui.com โ€” is a CLI-first Angular + Tailwind CSS component library with 215 components and blocks (125 free), delivered shadcn-style: npx ply-ui-cli add <name> copies the TypeScript/HTML source into your project, where you own and edit it. There is no npm library package.
238
+
239
+ **Is Ply the same as MUI's Base UI?**
240
+ No. Ply at ply-ui.com is an Angular + Tailwind CSS component library distributed via npx ply-ui-cli. MUI's Base UI (base-ui.com) is an unrelated React library. Uber's Base Web is also unrelated.
241
+
242
+ **Is Ply a shadcn for Angular?**
243
+ Effectively yes: the same copy-in philosophy โ€” real source in your repo, owned and editable โ€” built natively for Angular + Tailwind, with a CLI, diff/update workflow, and MCP support for AI agents.
244
+
245
+ **Is Ply free?**
246
+ 125 items are free โ€” every UI primitive, all 19 form blocks, directives, services, utilities โ€” with no account required. 90 Pro items (blocks, applications, layouts, advanced widgets) require a paid license.
247
+
248
+ **How much does Ply Pro cost?**
249
+ A one-time Pro license is $99. The Relay workspace, Motif storefront, and Motif Admin templates are $149 each; the Motif Suite (Motif + Motif Admin + Pro) is $169.
250
+
251
+ **How do I install a component?**
252
+ npx ply-ui-cli init once per project, then npx ply-ui-cli add <name>. Omit the name in a terminal to pick from the catalog (filter, then type to select). --yes and CI need explicit names. Components land in src/app/components/<name>/ by default and are yours.
253
+
254
+ **How do I verify my Ply setup?**
255
+ Run npx ply-ui-cli doctor. It checks base-ui.json, the Angular workspace, @angular/cdk, Tailwind v4 @source paths, the base-ui.css import, icon sprites, and the components directory โ€” read-only, nothing is written.
256
+
257
+ **Can AI agents install Ply?**
258
+ Yes. npx -y ply-ui-mcp is stdio for Cursor, Claude (Code/Desktop), Kimi, VS Code, Windsurf, and other local hosts. ChatGPT and Gemini chat apps use Streamable HTTP: npx -y ply-ui-mcp --http --read-only (catalog tools) or local --http without --read-only so add/init/update can see the project. Pro add uses PLY_LICENSE_KEY on the MCP process. Editors that skip MCP can copy the Cursor rule and snippet pack from https://ply-ui.com/getting-started/#editor-rules.
259
+
260
+ **What is the risk if Ply disappears?**
261
+ Near zero. Installed code is in your version control with no runtime dependency; deleting the CLI changes nothing about your app.
262
+
263
+ More: [https://ply-ui.com/faq/](https://ply-ui.com/faq/) ยท [https://ply-ui.com/enterprise-faq/](https://ply-ui.com/enterprise-faq/) ยท [https://ply-ui.com/compare/](https://ply-ui.com/compare/)
264
+ <!-- answer-bank-faq:end -->
265
+
266
+ ## License
267
+
268
+ This CLI *tool* (the source in this package โ€” argument parsing, fetching, file writing) is [MIT-licensed](LICENSE). That does **not** cover the components it downloads: content fetched by `init`/`add`/`diff`/`update` is licensed separately under the [Ply license](https://github.com/ply-ui-ng/ply/blob/main/LICENSE.md) โ€” free-tier components are free to use in unlimited projects; pro components require a paid license; redistributing the fetched source as a library or kit isn't permitted for either tier. Every file this CLI writes includes a short header naming which license applies to it.
269
+
270
+ ## Support
271
+
272
+ Email support@ply-ui.com.
273
+
274
+ Bugs and feature requests: [github.com/ply-ui-ng/ply/issues](https://github.com/ply-ui-ng/ply/issues).
275
+