wirl 0.1.1 → 0.2.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/README.md CHANGED
@@ -1,106 +1,58 @@
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
6
+ npx wirl login # a link and a code; approve in the browser
7
+ npx wirl init my-tool --server
8
+ cd my-tool
9
+ npx wirl dev # runs it here, signed in as a stub user
10
+ npx wirl preview # a private address to look at it before it is live
11
+ npx wirl deploy # builds, scans, deploys; prints the URL
12
+ npx wirl share dana@company.com
9
13
  ```
10
14
 
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
- });
48
- ```
15
+ `npx` fetches the CLI from npm the first time and needs no install beyond Node 22.13 or later; in a terminal npm first asks "Ok to proceed? (y)": answer y. Elsewhere in this README a command is written `wirl <command>`, for short: run it as `npx wirl <command>`, or run `npm install -g wirl` once and use plain `wirl`. If your npm registry does not carry wirl, or to run exactly the build app.wirl.dev serves, install from app.wirl.dev instead: `npm install -g https://app.wirl.dev/cli/wirl.tgz`, and run plain `wirl`.
49
16
 
50
- ## API
17
+ 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.
51
18
 
52
- ### `new Wirl(options)`
19
+ ## What an app is
53
20
 
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`) |
21
+ A static folder needs nothing. A server-side app is one JavaScript module exporting `fetch(request, env)`:
58
22
 
59
- ### `wirl.track(params)`
23
+ - `env.DB` is a SQLite database that belongs to this app, in D1's prepared-statement shape. Rolling back code never rolls back data.
24
+ - `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.
25
+ - 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.
26
+ - 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.
60
27
 
61
- Track an event for a contact. Creates the contact if they don't exist.
28
+ `wirl dev` runs the same bundle under Node, with the same database shape and headers, so what you see locally is what ships.
62
29
 
63
- ```typescript
64
- await wirl.track({
65
- email: 'user@example.com',
66
- event: 'purchase.completed',
67
- properties: { amount: 99.99 }
68
- });
69
- ```
30
+ ## For coding agents
70
31
 
71
- ### `wirl.identify(params)`
32
+ `wirl init` writes `.claude/skills/wirl/SKILL.md` so Claude Code knows wirl is there. Agents that speak MCP can connect directly:
72
33
 
73
- Create or update a contact with properties.
74
-
75
- ```typescript
76
- await wirl.identify({
77
- email: 'user@example.com',
78
- properties: { name: 'John', plan: 'enterprise' }
79
- });
34
+ ```bash
35
+ claude mcp add --transport http wirl https://app.wirl.dev/mcp
80
36
  ```
81
37
 
82
- ### `wirl.trigger(params)`
38
+ 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
39
 
84
- Manually enroll a contact in a sequence.
40
+ ## Everything else
85
41
 
86
- ```typescript
87
- await wirl.trigger({
88
- email: 'user@example.com',
89
- sequence: 'Onboarding'
90
- });
42
+ ```bash
43
+ npx wirl --help
91
44
  ```
92
45
 
93
- ### `wirl.exit(params)`
46
+ Orgs, members, connections, transfer, move, versions, rollback, pull, previews, logs, schedules, run.
94
47
 
95
- Remove a contact from an active sequence.
48
+ ## Versions
96
49
 
97
- ```typescript
98
- await wirl.exit({
99
- email: 'user@example.com',
100
- sequence: 'Onboarding'
101
- });
102
- ```
50
+ The npm package and the control plane are versioned separately. `npx wirl` runs the latest CLI published to npm, and app.wirl.dev runs the build it was last deployed with, so either can be the newer. A CLI newer than the control plane says so where it can tell: `its control plane is older than this copy of wirl` (from `wirl migrations` and `wirl migrations adopt`), or `this control plane is older than sending wirl.json in the body, so it cannot take it` when a `wirl.json` is too large for a header. A CLI older than the control plane sends your whole `wirl.json` and says of a key it does not read that it `is not a key this version of wirl reads, so it is ignored`, though the control plane may read it; it checks `wirl.json` against its own rules before it uploads, so update the CLI (`npm install -g wirl@latest`, or `npx wirl@latest <command>`) when a deploy is refused on your machine for something the docs allow.
51
+
52
+ ## Requirements
53
+
54
+ Node 22.13 or later. Credentials live in `~/.config/wirl/credentials.json` after `wirl login`, or in `WIRL_TOKEN` for CI and sandboxes.
103
55
 
104
- ## License
56
+ Docs: https://docs.wirl.dev. Site: https://wirl.dev. Issues: https://github.com/Brycce/wirl-platform/issues.
105
57
 
106
- MIT
58
+ wirl is a hosted service; use of the CLI is governed by the terms at https://wirl.dev/terms.