wirl 0.1.1 → 0.2.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 CHANGED
@@ -1,106 +1,55 @@
1
- # Wirl
1
+ # wirl
2
2
 
3
- Email sequence automation for developers.
4
-
5
- ## Installation
3
+ Deploy an internal app somewhere real, privately. One command puts the folder you are in on a URL that only your company can open.
6
4
 
7
5
  ```bash
8
- npm install wirl
9
- ```
10
-
11
- ## Quick Start
12
-
13
- ```typescript
14
- import Wirl from 'wirl';
15
-
16
- const wirl = new Wirl({
17
- apiKey: 'sk_test_...',
18
- baseUrl: 'https://your-wirl-instance.vercel.app'
19
- });
20
-
21
- // Track events
22
- await wirl.track({
23
- email: 'user@example.com',
24
- event: 'user.signup',
25
- properties: { plan: 'pro' }
26
- });
27
-
28
- // Update contact properties
29
- await wirl.identify({
30
- email: 'user@example.com',
31
- properties: {
32
- name: 'John Doe',
33
- company: 'Acme Inc'
34
- }
35
- });
36
-
37
- // Manually trigger a sequence
38
- await wirl.trigger({
39
- email: 'user@example.com',
40
- sequence: 'Welcome Sequence'
41
- });
42
-
43
- // Remove from a sequence
44
- await wirl.exit({
45
- email: 'user@example.com',
46
- sequence: 'Welcome Sequence'
47
- });
6
+ npm install -g https://app.wirl.dev/cli/wirl.tgz
7
+ wirl login # a link and a code; approve in the browser
8
+ wirl init my-tool --server
9
+ cd my-tool
10
+ wirl dev # runs it here, signed in as a stub user
11
+ wirl preview # a private address to look at it before it is live
12
+ wirl deploy # builds, scans, deploys; prints the URL
13
+ wirl share dana@company.com
48
14
  ```
49
15
 
50
- ## API
16
+ Install it from wirl itself, as above, and run plain `wirl`. Do not run `npx wirl`: that name on npm belongs to an unrelated older package today, and `npx` would fetch that one.
51
17
 
52
- ### `new Wirl(options)`
18
+ Sign in with your work Google account and you are in your company's workspace. Anything a colleague deploys there is yours to open, and nobody outside the company can. A personal account gets a space of its own.
53
19
 
54
- | Option | Type | Required | Description |
55
- |--------|------|----------|-------------|
56
- | `apiKey` | string | Yes | Your Wirl API key |
57
- | `baseUrl` | string | No | API base URL (default: `https://api.wirl.dev`) |
20
+ ## What an app is
58
21
 
59
- ### `wirl.track(params)`
22
+ A static folder needs nothing. A server-side app is one JavaScript module exporting `fetch(request, env)`:
60
23
 
61
- Track an event for a contact. Creates the contact if they don't exist.
24
+ - `env.DB` is a SQLite database that belongs to this app, in D1's prepared-statement shape. Rolling back code never rolls back data.
25
+ - `x-wirl-user-id`, `x-wirl-role` and `x-wirl-org` say who the visitor is. wirl sets them after verifying the person; the browser cannot forge them.
26
+ - Third-party APIs are called by their real URL. Declare the connection in `wirl.json`, and wirl attaches the key on the way out. The key never reaches the app, the agent that wrote it, or this machine.
27
+ - A `public_paths` entry in `wirl.json` opens one path to the internet with no sign-in — for a Slack, Stripe or GitHub webhook — and wirl checks the sender's signature before the app is ever called.
62
28
 
63
- ```typescript
64
- await wirl.track({
65
- email: 'user@example.com',
66
- event: 'purchase.completed',
67
- properties: { amount: 99.99 }
68
- });
69
- ```
29
+ `wirl dev` runs the same bundle under Node, with the same database shape and headers, so what you see locally is what ships.
70
30
 
71
- ### `wirl.identify(params)`
31
+ ## For coding agents
72
32
 
73
- Create or update a contact with properties.
33
+ `wirl init` writes `.claude/skills/wirl/SKILL.md` so Claude Code knows wirl is there. Agents that speak MCP can connect directly:
74
34
 
75
- ```typescript
76
- await wirl.identify({
77
- email: 'user@example.com',
78
- properties: { name: 'John', plan: 'enterprise' }
79
- });
35
+ ```bash
36
+ claude mcp add --transport http wirl https://app.wirl.dev/mcp
80
37
  ```
81
38
 
82
- ### `wirl.trigger(params)`
39
+ That opens the browser once to sign in. The token an agent gets can deploy, roll back and pull, and cannot share apps, change who can open them, or touch connections, members or tokens. Ticking one box at consent grants full access. See the docs for what each scope covers.
83
40
 
84
- Manually enroll a contact in a sequence.
41
+ ## Everything else
85
42
 
86
- ```typescript
87
- await wirl.trigger({
88
- email: 'user@example.com',
89
- sequence: 'Onboarding'
90
- });
43
+ ```bash
44
+ wirl --help
91
45
  ```
92
46
 
93
- ### `wirl.exit(params)`
47
+ Orgs, members, connections, transfer, move, versions, rollback, pull, previews, logs, schedules, run.
94
48
 
95
- Remove a contact from an active sequence.
49
+ ## Requirements
96
50
 
97
- ```typescript
98
- await wirl.exit({
99
- email: 'user@example.com',
100
- sequence: 'Onboarding'
101
- });
102
- ```
51
+ Node 22.13 or later. Credentials live in `~/.config/wirl/credentials.json` after `wirl login`, or in `WIRL_TOKEN` for CI and sandboxes.
103
52
 
104
- ## License
53
+ Docs: https://docs.wirl.dev. Site: https://wirl.dev. Issues: https://github.com/Brycce/wirl-platform/issues.
105
54
 
106
- MIT
55
+ wirl is a hosted service; use of the CLI is governed by the terms at https://wirl.dev/terms.