noninteractive 0.1.0 → 0.1.2

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.
Files changed (2) hide show
  1. package/README.md +71 -6
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,80 @@
1
- # cli
1
+ # noninteractive
2
2
 
3
- To install dependencies:
3
+ Run interactive CLI login flows non-interactively. Built for AI agents (like Claude Code) that need to complete setup wizards, OAuth flows, and interactive installers without a human at the keyboard.
4
+
5
+ Spawns commands in a real PTY session, so programs that check `isTTY`, render select menus, or use raw terminal mode all work correctly.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npx noninteractive
11
+ ```
12
+
13
+ ## Usage
4
14
 
5
15
  ```bash
6
- bun install
16
+ # Start a session (runs `npx workos` in a background PTY)
17
+ npx noninteractive start workos
18
+
19
+ # Read what's on screen
20
+ npx noninteractive read workos
21
+
22
+ # Send keystrokes (Enter to confirm a prompt)
23
+ npx noninteractive send workos ""
24
+
25
+ # Send text input
26
+ npx noninteractive send workos "my-api-key"
27
+
28
+ # Stop a session
29
+ npx noninteractive stop workos
30
+
31
+ # List active sessions
32
+ npx noninteractive list
7
33
  ```
8
34
 
9
- To run:
35
+ ## Example: WorkOS AuthKit setup
10
36
 
11
37
  ```bash
12
- bun run index.ts
38
+ # Start the installer
39
+ npx noninteractive start workos
40
+
41
+ # Wait for it to load, then read the prompt
42
+ npx noninteractive read workos
43
+ # ◆ Run the AuthKit installer?
44
+ # │ ● Yes / ○ No
45
+ # └
46
+
47
+ # Press Enter to confirm "Yes"
48
+ npx noninteractive send workos ""
49
+
50
+ # Read the next prompt
51
+ npx noninteractive read workos
52
+ # ◆ You are on main. Create a feature branch?
53
+ # │ ● Create feat/add-workos-authkit
54
+ # │ ○ Continue on current branch
55
+ # │ ○ Cancel
56
+ # └
57
+
58
+ # Press Enter to confirm
59
+ npx noninteractive send workos ""
60
+
61
+ # Done? Stop the session
62
+ npx noninteractive stop workos
13
63
  ```
14
64
 
15
- This project was created using `bun init` in bun v1.3.6. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
65
+ ## How it works
66
+
67
+ 1. `start` spawns a detached daemon process that runs the target command inside a real pseudo-terminal (PTY)
68
+ 2. The daemon listens on a unix socket at `~/.noninteractive/sessions/<name>.sock`
69
+ 3. `read`, `send`, and `stop` connect to that socket to interact with the running process
70
+ 4. The PTY ensures the child process sees a real terminal — `isTTY` is true, ANSI colors work, interactive menus render correctly
71
+
72
+ ## Why
73
+
74
+ AI coding agents can run shell commands, but they can't interact with prompts that wait for user input. This tool bridges that gap — the agent starts the command, reads the output, decides what to send, and completes the flow autonomously.
75
+
76
+ ## DevTool Arena
77
+
78
+ This tool powers [2027.dev/arena](https://2027.dev/arena) — a benchmark that sends Claude Code through every devtool's getting-started guide to measure how agent-friendly they are. If an agent can't navigate your product, it won't use it.
79
+
80
+ Learn more about why this matters at [2027.dev/manifesto](https://2027.dev/manifesto).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "noninteractive",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "noninteractive": "./src/index.ts"