promptotype 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/LICENSE +21 -0
- package/README.md +112 -0
- package/bin/.gitkeep +0 -0
- package/dist/promptotype.iife.js +1858 -0
- package/npm/cli.js +25 -0
- package/npm/postinstall.js +89 -0
- package/package.json +37 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 SignalOrg
|
|
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 deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
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 all
|
|
13
|
+
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 FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
# Promptotype
|
|
2
|
+
|
|
3
|
+
Point at UI elements in a running app, describe what should change, and send structured feedback to AI coding agents.
|
|
4
|
+
|
|
5
|
+
## The Problem
|
|
6
|
+
|
|
7
|
+
When reviewing a vibe-coded app, the typical workflow is: take a screenshot, paste it into an AI CLI, and describe what to change. This is slow, imprecise, and limited to one element at a time.
|
|
8
|
+
|
|
9
|
+
Promptotype replaces that with point-and-click annotations that include real computed styles, batch multiple elements, and output structured markdown that AI agents can act on immediately.
|
|
10
|
+
|
|
11
|
+
## Install
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
curl -fsSL https://raw.githubusercontent.com/niforiskollaros/promptotype/main/install.sh | bash
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
This installs the `promptotype` binary and registers `/promptotype` as a slash command for Claude Code, Codex, and Gemini CLI.
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
# Auto-detect a running dev server
|
|
23
|
+
promptotype
|
|
24
|
+
|
|
25
|
+
# Explicit URL
|
|
26
|
+
promptotype http://localhost:3000
|
|
27
|
+
|
|
28
|
+
# From Claude Code
|
|
29
|
+
/promptotype http://localhost:3000
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## How It Works
|
|
33
|
+
|
|
34
|
+
1. **Activate** -- Press `Cmd+Shift+D` or click the floating button
|
|
35
|
+
2. **Inspect** -- Hover elements to see highlights with box model visualization
|
|
36
|
+
3. **Select** -- Click to see computed font, color, spacing, and alignment
|
|
37
|
+
4. **Annotate** -- Write a prompt describing what should change
|
|
38
|
+
5. **Batch** -- Repeat for as many elements as you want -- each gets a numbered pin
|
|
39
|
+
6. **Review** -- Click "Review & Submit" to see all annotations in a side panel
|
|
40
|
+
7. **Submit** -- Sends structured markdown directly to the AI agent (or copies to clipboard)
|
|
41
|
+
|
|
42
|
+
### What Gets Extracted
|
|
43
|
+
|
|
44
|
+
For each selected element:
|
|
45
|
+
- **Font** -- family, size, weight, line-height
|
|
46
|
+
- **Color** -- text color, background color (as hex)
|
|
47
|
+
- **Spacing** -- padding, margin (with box model visualization)
|
|
48
|
+
- **Alignment** -- text-align, display, align-items
|
|
49
|
+
|
|
50
|
+
### What the AI Agent Receives
|
|
51
|
+
|
|
52
|
+
```markdown
|
|
53
|
+
## Design Annotations (2 elements)
|
|
54
|
+
|
|
55
|
+
### 1. `h2.card-title`
|
|
56
|
+
**Current styles:**
|
|
57
|
+
- Font: Inter, 14px, weight 600, line-height 1.5
|
|
58
|
+
- Color: #333333 (on background #FFFFFF)
|
|
59
|
+
- Margin: 0 0 8px 0
|
|
60
|
+
- Padding: 4px 8px
|
|
61
|
+
|
|
62
|
+
**Prompt:** Make this heading larger and bolder -- it should dominate the card
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
### 2. `div.sidebar`
|
|
67
|
+
**Current styles:**
|
|
68
|
+
- Padding: 8px 8px 8px 8px
|
|
69
|
+
|
|
70
|
+
**Prompt:** Increase padding to 16px, feels too cramped
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## CLI Options
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
promptotype [url] [options]
|
|
77
|
+
|
|
78
|
+
Options:
|
|
79
|
+
--port <port> Proxy server port (default: 4000)
|
|
80
|
+
--no-open Don't auto-open the browser
|
|
81
|
+
--timeout <secs> Auto-exit after N seconds
|
|
82
|
+
--json Output JSON instead of markdown
|
|
83
|
+
--help, -h Show this help
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Keyboard Shortcuts
|
|
87
|
+
|
|
88
|
+
| Shortcut | Action |
|
|
89
|
+
|----------|--------|
|
|
90
|
+
| `Cmd+Shift+D` | Toggle Promptotype on/off |
|
|
91
|
+
| `Alt+Scroll` | Traverse element depth (parent/child) |
|
|
92
|
+
| `Cmd+Enter` | Save annotation (in popover) |
|
|
93
|
+
| `Escape` | Close popover / close review panel / deactivate |
|
|
94
|
+
|
|
95
|
+
## How It's Built
|
|
96
|
+
|
|
97
|
+
Single IIFE bundle (~66KB, ~14KB gzip) built with Vite. Vanilla TypeScript, zero framework dependencies. Works in any browser, on any app.
|
|
98
|
+
|
|
99
|
+
The CLI is a Bun-compiled binary that runs a proxy server between your browser and target app. It injects the overlay, handles annotation submissions via a session-token-authenticated API, and prints structured markdown to stdout for AI agents to consume.
|
|
100
|
+
|
|
101
|
+
## Development
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
npm install
|
|
105
|
+
npm run dev # Dev server with sample app on port 3333
|
|
106
|
+
npm run build # Build dist/promptotype.iife.js
|
|
107
|
+
npm run build:cli # Build CLI binary for current platform
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
ISC
|
package/bin/.gitkeep
ADDED
|
File without changes
|