@inboxjot/cli 0.0.0-stage → 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 ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Arik Chakma
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
13
+ all 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
21
+ THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,69 @@
1
- # Temporary Holding Version
1
+ ![Inboxjot](https://inboxjot.com/og.png)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ <p align="center">The Inboxjot command-line interface. <br />Email for builders and their agents.</p>
4
+
5
+ <p align="center">
6
+ <a href="https://inboxjot.com/docs/cli"><img src="https://inboxjot.com/badges/docs-cli.svg?v=2" alt="Docs" height="24" /></a>
7
+ <a href="./LICENSE"><img src="https://inboxjot.com/badges/license.svg?v=2" alt="License" height="24" /></a>
8
+ </p>
9
+
10
+ Send email, verify domains, and manage contacts, templates, campaigns and webhooks from your terminal, your CI and your agents. One binary, installed as `inboxjot` with the short alias `ij`.
11
+
12
+ ### Quick Start
13
+
14
+ ```sh
15
+ npm install -g @inboxjot/cli
16
+ # or
17
+ brew install inboxjot/tap/inboxjot
18
+ ```
19
+
20
+ ```sh
21
+ inboxjot login
22
+ inboxjot domains add acme.com
23
+ inboxjot domains verify acme.com --wait
24
+ inboxjot send --from hi@acme.com --to delivered@inboxjot.dev --subject "It works" --text "Hello"
25
+ ```
26
+
27
+ `inboxjot login` opens the browser and saves the login in the OS keychain. In CI, set `INBOXJOT_API_KEY` instead.
28
+
29
+ ### Commands
30
+
31
+ | Command | Use |
32
+ | --- | --- |
33
+ | `login`, `logout`, `whoami` | Log in and see the current workspace |
34
+ | `init` | Add a sending key to this project's `.env.local` |
35
+ | `send`, `emails` | Send, list, inspect and tail emails |
36
+ | `domains` | Add, verify and inspect domains |
37
+ | `contacts`, `segments`, `brands`, `topics`, `events` | Manage your audience and track events |
38
+ | `templates`, `campaigns`, `automations` | Manage content and sending |
39
+ | `webhooks`, `listen`, `trigger` | Manage webhooks and forward live events to localhost |
40
+ | `api-keys`, `logs`, `stats` | Keys, request logs and sending stats |
41
+ | `api` | Call any API route with your login |
42
+ | `doctor` | Check your setup |
43
+ | `agent setup` | Add the Inboxjot MCP server and skill to Claude Code, Cursor, Codex and VS Code |
44
+
45
+ Run `inboxjot help <command>` or see the [CLI docs](https://inboxjot.com/docs/cli) for every option.
46
+
47
+ ### Test Addresses
48
+
49
+ Email to `delivered@`, `bounced@` or `complained@inboxjot.dev` is never sent. Inboxjot simulates the outcome and sends the usual webhook events.
50
+
51
+ ```sh
52
+ inboxjot listen --forward-to localhost:3000/webhooks
53
+ inboxjot trigger email.bounced
54
+ ```
55
+
56
+ ### Scripts and Agents
57
+
58
+ stdout holds only the answer, and everything else goes to stderr. `--json` prints the API response and `--jq` filters it.
59
+
60
+ ```sh
61
+ id=$(inboxjot send --from hi@acme.com --to jane@example.com --subject Hi --text Hello)
62
+ inboxjot domains list --jq '.data[].name'
63
+ ```
64
+
65
+ When an agent such as Claude Code runs the CLI, output is JSON and prompts are off. Destructive actions then fail with the exact command to run with `--yes`.
66
+
67
+ ### License
68
+
69
+ [MIT](./LICENSE) &copy; [Arik Chakma](https://x.com/imarikchakma)
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env node
2
+ const { spawn } = require('node:child_process');
3
+
4
+ const platform = `${process.platform}-${process.arch}`;
5
+ const extension = process.platform === 'win32' ? '.exe' : '';
6
+
7
+ let binary;
8
+ try {
9
+ binary = require.resolve(`@inboxjot/cli-${platform}/bin/inboxjot${extension}`);
10
+ } catch {
11
+ console.error(
12
+ `The Inboxjot CLI has no build for ${platform}. Install it with Homebrew, or see https://inboxjot.com/docs/cli`
13
+ );
14
+ process.exit(1);
15
+ }
16
+
17
+ const child = spawn(binary, process.argv.slice(2), { stdio: 'inherit' });
18
+
19
+ process.on('SIGINT', () => {});
20
+ for (const signal of ['SIGTERM', 'SIGHUP']) {
21
+ process.on(signal, () => child.kill(signal));
22
+ }
23
+
24
+ child.on('error', (error) => {
25
+ console.error(error.message);
26
+ process.exit(1);
27
+ });
28
+ child.on('exit', (code, signal) => {
29
+ if (signal) {
30
+ process.removeAllListeners(signal);
31
+ process.kill(process.pid, signal);
32
+ return;
33
+ }
34
+ process.exit(code ?? 1);
35
+ });
package/package.json CHANGED
@@ -1,6 +1,35 @@
1
1
  {
2
2
  "name": "@inboxjot/cli",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "0.1.0",
4
+ "description": "The Inboxjot command-line interface",
5
+ "keywords": [
6
+ "inboxjot",
7
+ "email",
8
+ "cli"
9
+ ],
10
+ "homepage": "https://inboxjot.com/docs/cli",
11
+ "license": "MIT",
12
+ "author": "Arik Chakma <arikchangma@gmail.com>",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+https://github.com/inboxjot/inboxjot-cli.git",
16
+ "directory": "npm"
17
+ },
18
+ "bin": {
19
+ "inboxjot": "bin/inboxjot.js",
20
+ "ij": "bin/inboxjot.js"
21
+ },
22
+ "files": [
23
+ "bin"
24
+ ],
25
+ "engines": {
26
+ "node": ">=18"
27
+ },
28
+ "optionalDependencies": {
29
+ "@inboxjot/cli-darwin-arm64": "0.1.0",
30
+ "@inboxjot/cli-darwin-x64": "0.1.0",
31
+ "@inboxjot/cli-linux-arm64": "0.1.0",
32
+ "@inboxjot/cli-linux-x64": "0.1.0",
33
+ "@inboxjot/cli-win32-x64": "0.1.0"
34
+ }
35
+ }