@wireweave/cli 0.1.0-beta.0 → 0.1.0
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/README.md +49 -34
- package/package.json +21 -21
package/README.md
CHANGED
|
@@ -1,17 +1,26 @@
|
|
|
1
|
-
Beta — Wireweave v2.0 베타 단계
|
|
2
|
-
|
|
3
1
|
# @wireweave/cli
|
|
4
2
|
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
The terminal frontend for the Wireweave wireframe DSL — parse, validate, render, analyze, diff, and export `.wf` files from your shell.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
The CLI is a thin frontend over [`@wireweave/sdk`](https://github.com/wireweave/sdk). Every command runs through the SDK's single `dispatch()` entry point, which routes the call to the right place:
|
|
8
|
+
|
|
9
|
+
- **Local commands** (`parse`, `validate`, `render`, `analyze`, `diff`, `validate-ux`, `export-json`, `export-figma`, `list-components`) run fully in-process. No network, no API key.
|
|
10
|
+
- **Auth commands** (`login`, `logout`, `whoami`) talk to the Wireweave API to verify and persist a key for tools that need one.
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
> shape may still change before `1.0.0`.
|
|
12
|
+
The persistent token lives at `~/.wireweave/config.json` (`0600`) with shape `{ "token": string, "apiUrl"?: string }`.
|
|
10
13
|
|
|
11
14
|
## Install
|
|
12
15
|
|
|
13
16
|
```bash
|
|
14
|
-
npm install -g @wireweave/cli
|
|
17
|
+
npm install -g @wireweave/cli
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Or run without installing:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
npx @wireweave/cli parse design.wf
|
|
15
24
|
```
|
|
16
25
|
|
|
17
26
|
Requires Node.js 18+.
|
|
@@ -19,42 +28,48 @@ Requires Node.js 18+.
|
|
|
19
28
|
## Usage
|
|
20
29
|
|
|
21
30
|
```bash
|
|
22
|
-
#
|
|
23
|
-
wireweave
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
# Local — no network, no key required
|
|
32
|
+
wireweave parse design.wf
|
|
33
|
+
wireweave validate design.wf --strict
|
|
34
|
+
wireweave render design.wf --theme dark -o design.html
|
|
35
|
+
wireweave analyze design.wf --format summary
|
|
36
|
+
wireweave diff old.wf new.wf --ignore-order
|
|
37
|
+
wireweave validate-ux design.wf --min-severity warning
|
|
38
|
+
wireweave export-json design.wf -o design.json
|
|
39
|
+
wireweave export-figma design.wf -o design.figma.json
|
|
40
|
+
wireweave list-components --category form
|
|
41
|
+
|
|
42
|
+
# Auth
|
|
43
|
+
wireweave login --api-key <key> # or pipe via stdin / WIREWEAVE_API_KEY
|
|
26
44
|
wireweave whoami
|
|
27
|
-
|
|
28
|
-
# Render a wireframe file to HTML
|
|
29
|
-
wireweave render design.wf
|
|
30
|
-
|
|
31
|
-
# Ask the Wireweave agent for help
|
|
32
|
-
wireweave agent "make the hero section more compact"
|
|
45
|
+
wireweave logout
|
|
33
46
|
```
|
|
34
47
|
|
|
48
|
+
## Commands
|
|
49
|
+
|
|
50
|
+
| Command | Network | Description |
|
|
51
|
+
| --------------------- | ------- | ----------------------------------------------------------------------------------------------------------- |
|
|
52
|
+
| `parse <file>` | local | Parse a `.wf`/`.wireframe` file and print its AST as JSON. |
|
|
53
|
+
| `validate <file>` | local | Validate syntax. `--strict` also rejects unknown attributes. |
|
|
54
|
+
| `render <file>` | local | Render to HTML. `--theme light\|dark`, `--full-document`, `-o <path>`. |
|
|
55
|
+
| `analyze <file>` | local | Statistics, accessibility, and complexity. `--format json\|summary`, `--no-*` toggles. |
|
|
56
|
+
| `diff <old> <new>` | local | Compare two wireframes. `--ignore-attributes`, `--ignore-order`, `--format`. |
|
|
57
|
+
| `validate-ux <file>` | local | Check against UX best-practice rules. `--categories`, `--min-severity`, `--max-issues`, `--disabled-rules`. |
|
|
58
|
+
| `export-json <file>` | local | Export as JSON. `--include-locations`, `--no-pretty-print`, `--include-empty-attributes`. |
|
|
59
|
+
| `export-figma <file>` | local | Export to Figma-compatible JSON. |
|
|
60
|
+
| `list-components` | local | List DSL components. `--category`, `--format table\|json`. |
|
|
61
|
+
| `login` | network | Verify an API key and store it. `--api-key`, `--api-url`. |
|
|
62
|
+
| `whoami` | network | Verify the stored key and show the configured account. |
|
|
63
|
+
| `logout` | local | Remove the stored API key from disk. |
|
|
64
|
+
|
|
35
65
|
## Environment
|
|
36
66
|
|
|
37
67
|
| Variable | Default | Purpose |
|
|
38
68
|
| ------------------- | --------------------------- | -------------------------------------- |
|
|
39
|
-
| `WIREWEAVE_API_URL` | `https://api.wireweave.org` | Override the API base
|
|
69
|
+
| `WIREWEAVE_API_URL` | `https://api.wireweave.org` | Override the API base. |
|
|
40
70
|
| `WIREWEAVE_API_KEY` | — | Per-shell override of the saved token. |
|
|
41
71
|
|
|
42
|
-
|
|
43
|
-
`{ "token": string, "apiUrl"?: string }` and is shared with
|
|
44
|
-
`@wireweave/skill-cursor`.
|
|
45
|
-
|
|
46
|
-
## Beta scope
|
|
47
|
-
|
|
48
|
-
The first public beta ships these subcommands as functional stubs that resolve
|
|
49
|
-
exit code 0 and print a friendly "coming soon" message where the network call
|
|
50
|
-
is not yet wired:
|
|
51
|
-
|
|
52
|
-
- `login` — prints the dashboard URL and the config file location
|
|
53
|
-
- `whoami` — reads the local token and reports the trailing 4 chars
|
|
54
|
-
- `render` — reserved for the local HTML renderer
|
|
55
|
-
- `agent` — reserved for the v2.0 agent stream
|
|
56
|
-
|
|
57
|
-
Each release on the `beta` tag will fill in one of these calls end-to-end.
|
|
72
|
+
Part of the [Wireweave monorepo](https://github.com/wireweave/wireweave).
|
|
58
73
|
|
|
59
74
|
## License
|
|
60
75
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wireweave/cli",
|
|
3
|
-
"version": "0.1.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Wireweave CLI — auth, render, and AI agent for the Wireweave wireframe DSL",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,27 +12,13 @@
|
|
|
12
12
|
"bin": {
|
|
13
13
|
"wireweave": "./dist/index.js"
|
|
14
14
|
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "tsup",
|
|
17
|
-
"dev": "tsup --watch",
|
|
18
|
-
"start": "node dist/index.js",
|
|
19
|
-
"typecheck": "tsc --noEmit",
|
|
20
|
-
"test": "vitest run",
|
|
21
|
-
"lint": "eslint .",
|
|
22
|
-
"lint:fix": "eslint . --fix",
|
|
23
|
-
"format": "prettier --write .",
|
|
24
|
-
"format:check": "prettier --check .",
|
|
25
|
-
"knip": "knip",
|
|
26
|
-
"publint": "publint",
|
|
27
|
-
"prepare": "husky"
|
|
28
|
-
},
|
|
29
15
|
"publishConfig": {
|
|
30
16
|
"access": "public",
|
|
31
17
|
"tag": "beta"
|
|
32
18
|
},
|
|
33
19
|
"dependencies": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
20
|
+
"commander": "^12.1.0",
|
|
21
|
+
"@wireweave/sdk": "0.1.0"
|
|
36
22
|
},
|
|
37
23
|
"devDependencies": {
|
|
38
24
|
"@commitlint/cli": "^21.0.1",
|
|
@@ -59,11 +45,12 @@
|
|
|
59
45
|
},
|
|
60
46
|
"repository": {
|
|
61
47
|
"type": "git",
|
|
62
|
-
"url": "git+https://github.com/wireweave/
|
|
48
|
+
"url": "git+https://github.com/wireweave/wireweave.git",
|
|
49
|
+
"directory": "packages/cli"
|
|
63
50
|
},
|
|
64
51
|
"homepage": "https://docs.wireweave.org/cli",
|
|
65
52
|
"bugs": {
|
|
66
|
-
"url": "https://github.com/wireweave/
|
|
53
|
+
"url": "https://github.com/wireweave/wireweave/issues"
|
|
67
54
|
},
|
|
68
55
|
"keywords": [
|
|
69
56
|
"wireweave",
|
|
@@ -73,5 +60,18 @@
|
|
|
73
60
|
"ai",
|
|
74
61
|
"agent"
|
|
75
62
|
],
|
|
76
|
-
"license": "MIT"
|
|
77
|
-
|
|
63
|
+
"license": "MIT",
|
|
64
|
+
"scripts": {
|
|
65
|
+
"build": "tsup",
|
|
66
|
+
"dev": "tsup --watch",
|
|
67
|
+
"start": "node dist/index.js",
|
|
68
|
+
"typecheck": "tsc --noEmit",
|
|
69
|
+
"test": "vitest run",
|
|
70
|
+
"lint": "eslint .",
|
|
71
|
+
"lint:fix": "eslint . --fix",
|
|
72
|
+
"format": "prettier --write .",
|
|
73
|
+
"format:check": "prettier --check .",
|
|
74
|
+
"knip": "knip",
|
|
75
|
+
"publint": "publint"
|
|
76
|
+
}
|
|
77
|
+
}
|