circleinbox 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 ADDED
@@ -0,0 +1,210 @@
1
+ # CircleInbox CLI
2
+
3
+ Email infrastructure for agents and developers. Manage inboxes, send email, store credentials, and orchestrate password resets — all from the command line.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install -g @circleinbox/cli
9
+ ```
10
+
11
+ Or run directly:
12
+
13
+ ```bash
14
+ npx @circleinbox/cli help
15
+ ```
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ # 1. Login with your API key
21
+ circleinbox login --key ci_live_YOUR_KEY
22
+
23
+ # 2. Check connection
24
+ circleinbox status
25
+
26
+ # 3. List your domains
27
+ circleinbox domains list
28
+
29
+ # 4. Check inbox
30
+ circleinbox inbox check hello@example.com
31
+
32
+ # 5. Send an email
33
+ circleinbox send --from hello@example.com --to user@gmail.com --subject "Hello" --text "Hi there!"
34
+ ```
35
+
36
+ ## Authentication
37
+
38
+ API keys are encrypted with AES-256-GCM and stored at `~/.circleinbox/credentials`. On macOS, the encryption key is stored in the system keychain.
39
+
40
+ ```bash
41
+ circleinbox login # Interactive prompt
42
+ circleinbox login --key ci_live_... # Direct key
43
+ CIRCLEINBOX_API_KEY=ci_live_... circleinbox status # Env var fallback
44
+ circleinbox logout # Remove credentials
45
+ ```
46
+
47
+ ## Commands
48
+
49
+ ### General
50
+
51
+ | Command | Description |
52
+ |---------|-------------|
53
+ | `login [--key <key>]` | Store API key (encrypted) |
54
+ | `logout` | Remove stored credentials |
55
+ | `status` | Show connection status and org info |
56
+ | `version` | Show CLI version |
57
+ | `help` | Show all commands |
58
+
59
+ ### Domains
60
+
61
+ ```bash
62
+ circleinbox domains list # List all domains with DNS status
63
+ circleinbox dns check example.com # Check DNS records for a domain
64
+ ```
65
+
66
+ DNS check shows MX, SPF, DKIM, and DMARC status with required records for any missing entries.
67
+
68
+ ### Inboxes
69
+
70
+ ```bash
71
+ circleinbox inbox list # List all mailboxes
72
+ circleinbox inbox create hello@example.com # Create a new mailbox
73
+ circleinbox inbox check hello@example.com # List emails (default: 20)
74
+ circleinbox inbox check hello@example.com -l 50 # List 50 emails
75
+ circleinbox inbox read hello@example.com 1 # Read email UID 1
76
+ circleinbox inbox delete hello@example.com # Delete mailbox (with confirmation)
77
+ ```
78
+
79
+ Mailbox arguments accept either an email address or a mailbox UUID.
80
+
81
+ ### Send Email
82
+
83
+ ```bash
84
+ # Basic send
85
+ circleinbox send --from hello@example.com --to user@gmail.com \
86
+ --subject "Hello" --text "Message body"
87
+
88
+ # With HTML
89
+ circleinbox send --from hello@example.com --to user@gmail.com \
90
+ --subject "Hello" --html "<p>Message body</p>"
91
+
92
+ # With idempotency key (prevents duplicate sends)
93
+ circleinbox send --from hello@example.com --to user@gmail.com \
94
+ --subject "Hello" --text "Body" --idempotency-key unique-123
95
+
96
+ # Pipe body from stdin
97
+ echo "Hello from pipe" | circleinbox send --from hello@example.com \
98
+ --to user@gmail.com --subject "Piped" --text -
99
+ ```
100
+
101
+ ### Aliases
102
+
103
+ ```bash
104
+ circleinbox alias list # List all aliases
105
+ circleinbox alias list --domain example.com # Filter by domain
106
+ circleinbox alias create support@example.com hello@example.com # Create alias
107
+ circleinbox alias update ALIAS_ID newemail@example.com # Update destinations
108
+ circleinbox alias delete ALIAS_ID # Delete alias
109
+ ```
110
+
111
+ ### Vault (Credentials)
112
+
113
+ Store and retrieve website login credentials, encrypted in MechVault.
114
+
115
+ ```bash
116
+ # List credentials for a mailbox (no passwords shown)
117
+ circleinbox vault list hello@example.com
118
+
119
+ # Store a credential (password auto-generated if not provided)
120
+ circleinbox vault store hello@example.com \
121
+ --service https://github.com \
122
+ --username hello@example.com \
123
+ --notes "2FA enabled"
124
+
125
+ # Get credential with password
126
+ circleinbox vault get hello@example.com a1b2c3d4e5f6
127
+
128
+ # Update credential
129
+ circleinbox vault update hello@example.com a1b2c3d4e5f6 \
130
+ --password "new-password" \
131
+ --notes "Updated 2026-02-13"
132
+
133
+ # Delete credential
134
+ circleinbox vault delete hello@example.com a1b2c3d4e5f6
135
+ ```
136
+
137
+ ### Password Reset
138
+
139
+ Orchestrated password reset flow that polls for reset emails and extracts reset links.
140
+
141
+ ```bash
142
+ # Generic flow (for any website)
143
+ # 1. Looks up credential 2. You trigger reset in browser
144
+ # 3. Polls inbox for email 4. Extracts reset links 5. Updates vault
145
+ circleinbox reset hello@example.com a1b2c3d4e5f6
146
+
147
+ # ClearAuth direct API flow (no browser needed)
148
+ circleinbox reset hello@example.com a1b2c3d4e5f6 --clearauth
149
+
150
+ # With pre-set new password
151
+ circleinbox reset hello@example.com a1b2c3d4e5f6 --password "new-pass"
152
+ ```
153
+
154
+ ### Provision
155
+
156
+ Full domain-to-mailbox provisioning in one command.
157
+
158
+ ```bash
159
+ # Provision with defaults (hello@domain.com)
160
+ circleinbox provision example.com
161
+
162
+ # Custom local part and display name
163
+ circleinbox provision example.com --local support --display "Support"
164
+
165
+ # Dry run (show what would happen)
166
+ circleinbox provision example.com --dry-run
167
+ ```
168
+
169
+ ## Global Flags
170
+
171
+ | Flag | Description |
172
+ |------|-------------|
173
+ | `--json` | Output raw JSON (for piping to `jq`) |
174
+ | `--quiet` | Suppress decorative output |
175
+ | `--api-url <url>` | Override API base URL |
176
+
177
+ ### JSON output examples
178
+
179
+ ```bash
180
+ # Pipe to jq for structured queries
181
+ circleinbox domains list --json | jq '.data[] | {domain, status}'
182
+ circleinbox inbox check hello@example.com --json | jq '.data.emails[] | {uid, subject}'
183
+ circleinbox vault get hello@example.com hash --json | jq '.data.password'
184
+ ```
185
+
186
+ ## Environment Variables
187
+
188
+ | Variable | Description |
189
+ |----------|-------------|
190
+ | `CIRCLEINBOX_API_KEY` | API key fallback (if not logged in) |
191
+
192
+ ## Configuration
193
+
194
+ Config stored at `~/.circleinbox/config.json`:
195
+
196
+ ```json
197
+ {
198
+ "apiUrl": "https://circleinbox.com/api/v1",
199
+ "outputFormat": "pretty"
200
+ }
201
+ ```
202
+
203
+ ## Requirements
204
+
205
+ - Node.js 20+
206
+ - CircleInbox API key (`ci_live_` prefix)
207
+
208
+ ## License
209
+
210
+ MIT