aired 0.1.0 → 1.0.1
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/SKILL.md +62 -129
- package/dist/cli.cjs +120 -67
- package/package.json +4 -11
package/SKILL.md
CHANGED
|
@@ -1,127 +1,59 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
name: aired
|
|
3
|
+
description: Publishes HTML files or strings to shareable live URLs via aired.sh. Use when the user wants to share, deploy, or publish an HTML artifact, dashboard, visualization, report, or any generated HTML — or when an agent needs to make HTML viewable in a browser. Supports PIN protection, custom expiry, and stdin piping. No auth required.
|
|
4
|
+
---
|
|
2
5
|
|
|
3
|
-
|
|
6
|
+
# aired
|
|
4
7
|
|
|
5
|
-
|
|
8
|
+
Publish HTML artifacts to shareable URLs. No signup, no auth, no deploy pipeline.
|
|
6
9
|
|
|
7
|
-
|
|
10
|
+
## Quick Start
|
|
8
11
|
|
|
9
12
|
```bash
|
|
10
|
-
#
|
|
11
|
-
|
|
13
|
+
# Publish a file → get a live URL
|
|
14
|
+
npx aired dashboard.html
|
|
12
15
|
|
|
13
|
-
#
|
|
14
|
-
npx aired
|
|
15
|
-
```
|
|
16
|
-
|
|
17
|
-
Optional: set `AIRED_API_URL` env var for custom API endpoint.
|
|
18
|
-
|
|
19
|
-
## Commands
|
|
20
|
-
|
|
21
|
-
### publish (default)
|
|
22
|
-
|
|
23
|
-
Publish an HTML file to a shareable URL.
|
|
24
|
-
|
|
25
|
-
```bash
|
|
26
|
-
aired file.html
|
|
27
|
-
aired file.html --json
|
|
28
|
-
cat file.html | aired
|
|
29
|
-
aired file.html --ttl 24h --pin secret123
|
|
30
|
-
aired file.html --permanent
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
**Flags:** `--title`, `--pin`, `--ttl <1h|24h|7d|30d>`, `--permanent`, `--reads <n>`
|
|
34
|
-
|
|
35
|
-
**JSON output:**
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"id": "abc123",
|
|
39
|
-
"url": "https://aired.sh/p/abc123",
|
|
40
|
-
"update_token": "at_...",
|
|
41
|
-
"expiresAt": "2026-04-04T12:00:00.000Z"
|
|
42
|
-
}
|
|
43
|
-
```
|
|
44
|
-
|
|
45
|
-
### update
|
|
46
|
-
|
|
47
|
-
Update an existing page.
|
|
48
|
-
|
|
49
|
-
```bash
|
|
50
|
-
aired update <id> new-file.html
|
|
51
|
-
aired update <id> new-file.html --json
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### delete
|
|
55
|
-
|
|
56
|
-
Delete a page.
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
aired delete <id>
|
|
60
|
-
aired delete <id> --json
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### info
|
|
64
|
-
|
|
65
|
-
Show page metadata.
|
|
66
|
-
|
|
67
|
-
```bash
|
|
68
|
-
aired info <id>
|
|
69
|
-
aired info <id> --json
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
**JSON output:**
|
|
73
|
-
```json
|
|
74
|
-
{
|
|
75
|
-
"id": "abc123",
|
|
76
|
-
"title": "My Dashboard",
|
|
77
|
-
"size": 4096,
|
|
78
|
-
"readCount": 5,
|
|
79
|
-
"expiresAt": "2026-04-04T12:00:00.000Z"
|
|
80
|
-
}
|
|
81
|
-
```
|
|
16
|
+
# Publish a directory (bundles index.html + CSS + JS + images into one file)
|
|
17
|
+
npx aired ./my-project/
|
|
82
18
|
|
|
83
|
-
|
|
19
|
+
# Pipe HTML from another command
|
|
20
|
+
echo "<h1>Hello</h1>" | npx aired --json | jq .url
|
|
84
21
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
```bash
|
|
88
|
-
aired tokens
|
|
89
|
-
aired tokens --json
|
|
90
|
-
aired tokens prune
|
|
22
|
+
# PIN-protected, expires in 24h
|
|
23
|
+
npx aired report.html --ttl 24h --pin secret123
|
|
91
24
|
```
|
|
92
25
|
|
|
93
|
-
|
|
26
|
+
## Commands
|
|
94
27
|
|
|
95
|
-
|
|
28
|
+
| Command | Description |
|
|
29
|
+
|---------|-------------|
|
|
30
|
+
| `aired [file]` | Publish HTML file, directory, or stdin (default command) |
|
|
31
|
+
| `aired update <id> <file>` | Update an existing page |
|
|
32
|
+
| `aired delete <id>` | Delete a page |
|
|
33
|
+
| `aired info <id>` | Show page metadata |
|
|
34
|
+
| `aired tokens` | List stored update tokens |
|
|
35
|
+
| `aired tokens prune` | Remove tokens for expired pages |
|
|
36
|
+
| `aired doctor` | Diagnostics (Node.js, API, token store) |
|
|
96
37
|
|
|
97
|
-
|
|
98
|
-
aired doctor
|
|
99
|
-
aired doctor --json
|
|
100
|
-
```
|
|
38
|
+
## Publish Flags
|
|
101
39
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{ "name": "Token Store", "status": "pass", "message": "2 tokens at ~/.config/aired/tokens.json" },
|
|
110
|
-
{ "name": "API", "status": "pass", "message": "https://aired.sh" }
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
```
|
|
40
|
+
| Flag | Effect |
|
|
41
|
+
|------|--------|
|
|
42
|
+
| `-t, --title <title>` | Custom page title |
|
|
43
|
+
| `-p, --pin <pin>` | PIN-protect the page |
|
|
44
|
+
| `--ttl <duration>` | Expiry: `1h`, `24h`, `7d`, `30d` |
|
|
45
|
+
| `--permanent` | No expiry |
|
|
46
|
+
| `--reads <n>` | Auto-delete after N views |
|
|
114
47
|
|
|
115
48
|
## Global Flags
|
|
116
49
|
|
|
117
50
|
| Flag | Effect |
|
|
118
51
|
|------|--------|
|
|
119
|
-
| `--json` |
|
|
52
|
+
| `--json` | Structured JSON to stdout |
|
|
120
53
|
| `--quiet` | Suppress stderr, implies --json |
|
|
121
|
-
| `--verbose` | Extended output |
|
|
122
54
|
| `--api-url <url>` | Custom API endpoint |
|
|
123
55
|
|
|
124
|
-
|
|
56
|
+
JSON output is automatic when stdout is piped — no flag needed.
|
|
125
57
|
|
|
126
58
|
## Exit Codes
|
|
127
59
|
|
|
@@ -129,44 +61,45 @@ When stdout is piped, JSON is automatic.
|
|
|
129
61
|
|------|---------|
|
|
130
62
|
| 0 | Success |
|
|
131
63
|
| 1 | API error |
|
|
132
|
-
| 2 | Validation error |
|
|
133
|
-
| 3 | Rate limited |
|
|
64
|
+
| 2 | Validation error (bad input, missing file, no token) |
|
|
65
|
+
| 3 | Rate limited (5 uploads/hour) |
|
|
134
66
|
|
|
135
|
-
##
|
|
67
|
+
## Update Flow
|
|
136
68
|
|
|
137
|
-
|
|
69
|
+
The first publish returns an `update_token` (saved to `~/.config/aired/tokens.json`). To update the same URL:
|
|
138
70
|
|
|
139
71
|
```bash
|
|
140
|
-
aired
|
|
72
|
+
aired dashboard.html # → publishes, saves token
|
|
73
|
+
aired update abc123 v2.html # → updates same URL using stored token
|
|
141
74
|
```
|
|
142
75
|
|
|
143
|
-
|
|
76
|
+
Tokens are stored per page ID. `aired tokens` lists them. `aired tokens prune` removes expired ones.
|
|
144
77
|
|
|
145
|
-
##
|
|
78
|
+
## MCP Server
|
|
146
79
|
|
|
147
|
-
|
|
148
|
-
```bash
|
|
149
|
-
aired dashboard.html
|
|
150
|
-
# → https://aired.sh/p/abc123
|
|
151
|
-
```
|
|
80
|
+
Two transports:
|
|
152
81
|
|
|
153
|
-
|
|
82
|
+
**STDIO** (local, supports file_path):
|
|
154
83
|
```bash
|
|
155
|
-
aired
|
|
156
|
-
|
|
84
|
+
aired --mcp
|
|
85
|
+
claude mcp add aired -- npx aired --mcp
|
|
157
86
|
```
|
|
158
87
|
|
|
159
|
-
|
|
160
|
-
```bash
|
|
161
|
-
aired report.html --ttl 24h --pin secret
|
|
88
|
+
**Streamable HTTP** (remote, zero install):
|
|
162
89
|
```
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
```bash
|
|
166
|
-
echo "<h1>Hello</h1>" | aired --json | jq .url
|
|
90
|
+
https://aired.sh/mcp
|
|
91
|
+
claude mcp add aired --transport http https://aired.sh/mcp
|
|
167
92
|
```
|
|
168
93
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
94
|
+
The MCP tool accepts `html` (string), `file_path` (STDIO only), `title`, `pin`, `ttl_seconds`, `permanent`, `update_token`, and `id`.
|
|
95
|
+
|
|
96
|
+
## Gotchas
|
|
97
|
+
|
|
98
|
+
- **Rate limit is 5 uploads/hour per IP.** The API returns 429 and the CLI exits with code 3. Wait an hour or use a different network.
|
|
99
|
+
- **Update requires both ID and token.** The token alone can't find the page (KV has no reverse lookup). Always use `aired update <id> <file>`, not the raw API with just a token.
|
|
100
|
+
- **Tokens are local-only.** Stored in `~/.config/aired/tokens.json`. If you lose them, you can't update or delete the page. The `--json` output includes the token — pipe it somewhere safe.
|
|
101
|
+
- **Max file size is 2 MB.** The API rejects anything larger. For bigger artifacts, host them elsewhere.
|
|
102
|
+
- **Directory bundling inlines images as base64.** This adds ~33% to image size. A directory with large images may exceed the 2 MB limit. The CLI warns if bundled size exceeds 2 MB.
|
|
103
|
+
- **Directory requires index.html.** `npx aired ./dir/` looks for `index.html` in the directory root. No other entry point is supported.
|
|
104
|
+
- **PIN is not encryption.** Content is stored in plaintext on R2. PIN just gates browser access. Don't use aired for sensitive data.
|
|
105
|
+
- **Default expiry is 7 days.** Pages auto-delete unless `--permanent` is set. The TTL resets on update.
|