splashshell 0.5.0 → 0.15.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 +38 -17
- package/bin/cli.mjs +72 -15
- package/package.json +33 -14
- package/dist/splash.exe +0 -0
package/README.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
# SplashShell
|
|
1
|
+
# SplashShell — REPL-sharing MCP for AI Co-Driving
|
|
2
2
|
|
|
3
3
|
<div align="center">
|
|
4
4
|
<img src="https://github.com/user-attachments/assets/1343f694-1c05-4899-9faa-d2b1138aa3ba" alt="social-image" width="640" />
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
**A
|
|
7
|
+
**A REPL-sharing MCP server for AI that actually holds a session.** Shell, Python, Node, a language debugger — whatever you'd open a REPL window for, splashshell keeps it live between tool calls. Load `Import-Module Az` once and let AI run 50 follow-up cmdlets in milliseconds each. Watch every command happen in a real terminal window — the same one you can type into yourself.
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
No runtime prerequisite — splashshell ships as a self-contained NativeAOT binary (~13 MB, Windows x64). `npx` fetches it on first run.
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
claude mcp add-json splash -s user '{"command":"npx","args":["-y","splashshell@latest"]}'
|
|
@@ -34,16 +34,22 @@ The `@latest` tag is important: without it, npx will happily keep reusing a stal
|
|
|
34
34
|
|
|
35
35
|
</details>
|
|
36
36
|
|
|
37
|
-
## Why
|
|
37
|
+
## Why splashshell?
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
splashshell gives AI a **stateful and visible** REPL session — the same window you can read along with and type into yourself. That combination unlocks workflows other MCP servers can't support: secrets the AI never sees, full PowerShell module ecosystems, real debugger sessions.
|
|
40
|
+
|
|
41
|
+
### Sensitive operations stay sensitive
|
|
42
|
+
|
|
43
|
+
When a command needs a passphrase, MFA code, or other secret — `Read-Host -AsSecureString`, `gpg --sign`, `ssh-add`, `sudo`, cloud CLI MFA prompts — you type it directly into the visible window. The keystrokes go to the running program, not to the terminal output stream the AI sees. The AI orchestrates the workflow ("run the publish build, sign with my key, then push the tag") but never sees the secret itself.
|
|
44
|
+
|
|
45
|
+
This is impossible with stdin-piped MCP shells, where the AI must somehow supply the secret. Interactive build pipelines that involve code-signing keys, hardware token PINs, or two-factor codes work naturally on splashshell — the human stays in the loop only for the moment that requires them, and the AI handles everything around it.
|
|
40
46
|
|
|
41
47
|
### PowerShell becomes a first-class AI environment
|
|
42
48
|
|
|
43
49
|
Session persistence helps every shell, but for **PowerShell it's transformative**. Most MCP shell servers spin up a fresh subshell per command — which makes real PowerShell workflows impractical:
|
|
44
50
|
|
|
45
51
|
- **10,000+ modules on [PowerShell Gallery](https://www.powershellgallery.com/).** Az (Azure), AWS.Tools, Microsoft.Graph (Entra ID / M365), ExchangeOnlineManagement, PnP.PowerShell, SqlServer, ActiveDirectory — plus every CLI in PATH (git, docker, kubectl, terraform, gh, az, aws, gcloud) and full access to .NET types.
|
|
46
|
-
- **30–70 second cold imports, paid once.** `Import-Module Az.Compute, Az.Storage, Az.Network` can take over a minute on the first call. A subshell-per-command MCP server pays that cost on *every* command and the AI gives up on Azure workflows entirely. With
|
|
52
|
+
- **30–70 second cold imports, paid once.** `Import-Module Az.Compute, Az.Storage, Az.Network` can take over a minute on the first call. A subshell-per-command MCP server pays that cost on *every* command and the AI gives up on Azure workflows entirely. With splashshell, the AI imports once and every subsequent cmdlet runs in milliseconds.
|
|
47
53
|
- **Live .NET object graphs.** PowerShell pipes rich objects, not text. After `$vms = Get-AzVM -Status`, the AI can chain arbitrary follow-ups against the live object — filter, group, drill into nested properties — without re-hitting Azure. In a one-shot MCP server, that object vanishes the moment the command returns.
|
|
48
54
|
- **Interactive build-up of complex work.** Set a variable, inspect it, reshape it, feed it back into the next cmdlet. Build a multi-step workflow one command at a time with every previous step's result still in scope.
|
|
49
55
|
|
|
@@ -59,17 +65,28 @@ $vms | Where-Object PowerState -eq "VM running" |
|
|
|
59
65
|
Group-Object Location | Sort-Object Count -Descending
|
|
60
66
|
```
|
|
61
67
|
|
|
62
|
-
PowerShell on
|
|
68
|
+
PowerShell on splashshell is the difference between **"AI can answer one-off questions"** and **"AI can do real infrastructure work."** bash and cmd are fully supported too, but pwsh is where splashshell shines.
|
|
63
69
|
|
|
64
70
|
### Full transparency, in both directions
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
splashshell opens a **real, visible terminal window**. You see every AI command as it runs — same characters, same output, same prompt — and you can type into the same window yourself at any time. When a command hangs on an interactive prompt, stalls in watch mode, or just needs a Ctrl+C, the AI can read what's currently on the screen and send keystrokes (Enter, y/n, arrow keys, Ctrl+C) back to the running command — diagnosing and responding without human intervention.
|
|
73
|
+
|
|
74
|
+
### 19 adapters: shells, language REPLs, and debuggers
|
|
75
|
+
|
|
76
|
+
splashshell ships **19 adapters** — 4 shells, 12 language REPLs, 3 debuggers — each with the same persistence, OSC 633 lifecycle tracking, and shared-terminal transparency:
|
|
77
|
+
|
|
78
|
+
- **Shells (4)**: pwsh / powershell, bash, zsh, cmd
|
|
79
|
+
- **REPLs (12)**: Python, Node.js, Deno (TypeScript), Lua, Racket, CCL / ABCL / SBCL (Common Lisp), jshell (Java), groovysh (Groovy), F# Interactive, SQLite3
|
|
80
|
+
- **Debuggers (3)**: pdb (Python), perldb (Perl), jdb (Java) — driven via a unified `commands.debugger` vocabulary (step_in / step_over / continue / print / backtrace / breakpoint_set / ...) so AI agents drive any debugger with the same operation names regardless of underlying syntax
|
|
81
|
+
|
|
82
|
+
Tell the AI to drive a `groovysh` REPL for Spring Boot exploration, a `sqlite3` session for ad-hoc data shaping, or a `perldb` breakpoint loop to chase a bug in a live Perl program — all via the same `execute_command`.
|
|
67
83
|
|
|
68
84
|
## Tools
|
|
69
85
|
|
|
70
86
|
| Tool | Description |
|
|
71
87
|
|------|-------------|
|
|
72
|
-
| `
|
|
88
|
+
| `list_shells` | Enumerate every adapter this splashshell build accepts as the `shell` argument — shells, REPLs, and debuggers — with their resolved executable paths and any startup load issues. Use before `start_console` to see what's available, or to diagnose an unrecognized shell name. |
|
|
89
|
+
| `start_console` | Open a visible terminal. Pick a shell (bash, pwsh, powershell, cmd) or any registered REPL / debugger adapter. Reuses an existing standby of the same adapter unless `reason` is provided. |
|
|
73
90
|
| `execute_command` | Run a pipeline. Optionally target a specific `shell`. Times out cleanly with output cached for `wait_for_completion`; timeout responses include a `partialOutput` snapshot for immediate diagnosis. |
|
|
74
91
|
| `wait_for_completion` | Block until busy consoles finish and retrieve cached output. |
|
|
75
92
|
| `peek_console` | Read-only snapshot of what a console is displaying. Windows reads the screen buffer directly; Linux/macOS uses a VT interpreter. Reports busy/idle state, running command, and elapsed time. |
|
|
@@ -83,15 +100,15 @@ Status lines include console name, shell family, exit code, duration, and cwd:
|
|
|
83
100
|
✓ #12345 Sapphire (bash) | Status: Completed | Pipeline: ls /tmp | Duration: 0.6s | Location: /tmp
|
|
84
101
|
```
|
|
85
102
|
|
|
86
|
-
##
|
|
103
|
+
## Reliability features
|
|
87
104
|
|
|
88
|
-
- **Auto-routing when busy
|
|
89
|
-
- **Console re-claim
|
|
90
|
-
- **
|
|
91
|
-
- **Sub-agent isolation
|
|
92
|
-
- **
|
|
105
|
+
- **Auto-routing when busy**: each console tracks its own cwd; when the active one is busy, the AI is routed to a sibling at the same cwd automatically
|
|
106
|
+
- **Console re-claim**: consoles outlive their parent MCP process — AI client restarts don't kill loaded modules or variables
|
|
107
|
+
- **Cwd drift detection**: a manual `cd` in the terminal triggers a verification warning before the AI runs in the wrong place
|
|
108
|
+
- **Sub-agent isolation**: parallel AI agents get their own consoles, no cross-contamination
|
|
109
|
+
- **Multi-line PowerShell**: heredocs, `foreach`, `try`/`catch`, nested scriptblocks all work via tempfile dot-sourcing
|
|
93
110
|
|
|
94
|
-
> **Architecture diagram, full routing matrix, and source**: see [yotsuda/
|
|
111
|
+
> **Architecture diagram, full routing matrix, and source**: see [yotsuda/SplashShell](https://github.com/yotsuda/SplashShell#readme).
|
|
95
112
|
|
|
96
113
|
## Platform support
|
|
97
114
|
|
|
@@ -102,6 +119,10 @@ Status lines include console name, shell family, exit code, duration, and cwd:
|
|
|
102
119
|
- **cmd.exe exit codes always read as 0** — cmd's `PROMPT` can't expand `%ERRORLEVEL%` at display time, so AI commands show as `Finished (exit code unavailable)`. Use `pwsh` or `bash` for exit-code-aware work.
|
|
103
120
|
- **Don't `Remove-Module PSReadLine -Force` inside a pwsh session** — PSReadLine's background reader threads survive module unload and steal console input, hanging the next AI command. Not recoverable.
|
|
104
121
|
|
|
122
|
+
## Migration
|
|
123
|
+
|
|
124
|
+
Back to `splashshell` at v0.15.0. First shipped as `splashshell` for v0.1.0–v0.5.0, then `@ytsuda/splash` for v0.7.0 and `@ytsuda/ripple` for v0.8.0–v0.14.1. Both `@ytsuda/ripple` and `@ytsuda/splash` are deprecated; uninstall them and install `splashshell` to keep receiving updates. Rename the `ripple` entry in your MCP config to `splash`, and move custom adapters from `~/.ripple/adapters` to `~/.splashshell/adapters`.
|
|
125
|
+
|
|
105
126
|
## License
|
|
106
127
|
|
|
107
|
-
MIT. Full release notes and source at [yotsuda/
|
|
128
|
+
MIT. Full release notes and source at [yotsuda/SplashShell](https://github.com/yotsuda/SplashShell).
|
package/bin/cli.mjs
CHANGED
|
@@ -1,26 +1,83 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
//
|
|
3
|
+
// splashshell meta-package launcher.
|
|
4
|
+
//
|
|
5
|
+
// On install, npm inspects each optionalDependency's "os" and "cpu"
|
|
6
|
+
// fields and only installs the subpackage that matches the current
|
|
7
|
+
// platform. This script figures out which one that is and spawns
|
|
8
|
+
// its binary with stdio inherited.
|
|
9
|
+
//
|
|
10
|
+
// MCP clients talk to splashshell over stdio pipes. The Node process here
|
|
11
|
+
// is a transparent relay: process.argv is forwarded verbatim, stdio
|
|
12
|
+
// is inherited so pipes pass through, and SIGTERM / SIGINT / SIGHUP
|
|
13
|
+
// are forwarded to the child so client-initiated shutdown propagates.
|
|
2
14
|
|
|
3
|
-
import { spawn } from "child_process";
|
|
4
|
-
import {
|
|
5
|
-
import { dirname, join } from "path";
|
|
15
|
+
import { spawn } from "node:child_process";
|
|
16
|
+
import { createRequire } from "node:module";
|
|
6
17
|
|
|
7
|
-
const
|
|
8
|
-
const exe = join(__dirname, "..", "dist", "splash.exe");
|
|
18
|
+
const require = createRequire(import.meta.url);
|
|
9
19
|
|
|
10
|
-
|
|
20
|
+
// process.platform is one of 'win32' / 'linux' / 'darwin' / …
|
|
21
|
+
// process.arch is one of 'x64' / 'arm64' / …
|
|
22
|
+
// Keep this map in sync with the meta package.json's
|
|
23
|
+
// optionalDependencies list and with the workflow matrix.
|
|
24
|
+
const PLATFORM_PACKAGES = {
|
|
25
|
+
"win32-x64": { pkg: "@ytsuda/splashshell-win32-x64", exe: "splashshell.exe" },
|
|
26
|
+
"linux-x64": { pkg: "@ytsuda/splashshell-linux-x64", exe: "splashshell" },
|
|
27
|
+
"darwin-arm64": { pkg: "@ytsuda/splashshell-darwin-arm64", exe: "splashshell" },
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
const key = `${process.platform}-${process.arch}`;
|
|
31
|
+
const entry = PLATFORM_PACKAGES[key];
|
|
32
|
+
|
|
33
|
+
if (!entry) {
|
|
34
|
+
const supported = Object.keys(PLATFORM_PACKAGES).join(", ");
|
|
35
|
+
console.error(
|
|
36
|
+
`splashshell: unsupported platform ${key}. Supported: ${supported}.\n` +
|
|
37
|
+
`If you need another platform, please open an issue at https://github.com/yotsuda/SplashShell/issues`
|
|
38
|
+
);
|
|
39
|
+
process.exit(1);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
let binPath;
|
|
43
|
+
try {
|
|
44
|
+
binPath = require.resolve(`${entry.pkg}/bin/${entry.exe}`);
|
|
45
|
+
} catch (err) {
|
|
46
|
+
console.error(
|
|
47
|
+
`splashshell: ${entry.pkg} is not installed (${err && err.code ? err.code : err}).\n` +
|
|
48
|
+
`This usually means the optional dependency for your platform was skipped at install time.\n` +
|
|
49
|
+
`Try reinstalling: npm i -g splashshell`
|
|
50
|
+
);
|
|
51
|
+
process.exit(1);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const child = spawn(binPath, process.argv.slice(2), {
|
|
11
55
|
stdio: "inherit",
|
|
12
|
-
windowsHide:
|
|
56
|
+
windowsHide: false,
|
|
13
57
|
});
|
|
14
58
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
);
|
|
59
|
+
// Forward signals so clients (including MCP hosts) that SIGTERM /
|
|
60
|
+
// SIGINT the wrapper reach the actual splashshell process. Without this,
|
|
61
|
+
// Ctrl+C from an MCP host would kill only the Node wrapper and leave
|
|
62
|
+
// a zombie splashshell process holding the PTY open.
|
|
63
|
+
for (const sig of ["SIGTERM", "SIGINT", "SIGHUP", "SIGQUIT"]) {
|
|
64
|
+
process.on(sig, () => {
|
|
65
|
+
try { child.kill(sig); } catch { /* child may have already exited */ }
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
child.on("exit", (code, signal) => {
|
|
70
|
+
if (signal) {
|
|
71
|
+
// Re-raise the signal on the wrapper so the exit status mirrors
|
|
72
|
+
// a direct invocation (shells inspect $? / %ERRORLEVEL% and
|
|
73
|
+
// $status accordingly).
|
|
74
|
+
process.kill(process.pid, signal);
|
|
22
75
|
} else {
|
|
23
|
-
|
|
76
|
+
process.exit(code ?? 0);
|
|
24
77
|
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
child.on("error", (err) => {
|
|
81
|
+
console.error(`splashshell: failed to launch ${binPath}: ${err.message}`);
|
|
25
82
|
process.exit(1);
|
|
26
83
|
});
|
package/package.json
CHANGED
|
@@ -1,38 +1,57 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "splashshell",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.15.0",
|
|
4
|
+
"description": "REPL-sharing MCP server — AI and humans co-drive the same visible terminal. 19 embedded adapters: shells (bash, pwsh, zsh, cmd), language REPLs (Python, Node, Deno, Lua, Racket, CCL/ABCL/SBCL Common Lisp, F# Interactive, jshell, Groovy, SQLite3), and debuggers (pdb, perldb, jdb). Session persists across tool calls; secrets typed in the visible window stay out of AI's view.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Yoshifumi Tsuda",
|
|
7
7
|
"repository": {
|
|
8
8
|
"type": "git",
|
|
9
|
-
"url": "git+https://github.com/yotsuda/
|
|
9
|
+
"url": "git+https://github.com/yotsuda/SplashShell.git"
|
|
10
10
|
},
|
|
11
|
-
"homepage": "https://github.com/yotsuda/
|
|
11
|
+
"homepage": "https://github.com/yotsuda/SplashShell",
|
|
12
12
|
"keywords": [
|
|
13
13
|
"mcp",
|
|
14
14
|
"mcp-server",
|
|
15
15
|
"model-context-protocol",
|
|
16
|
+
"claude",
|
|
17
|
+
"claude-code",
|
|
18
|
+
"anthropic",
|
|
19
|
+
"ai-agent",
|
|
20
|
+
"ai-shell",
|
|
21
|
+
"co-driving",
|
|
22
|
+
"shared-terminal",
|
|
23
|
+
"visible-terminal",
|
|
24
|
+
"shared-console",
|
|
16
25
|
"shell",
|
|
26
|
+
"terminal",
|
|
27
|
+
"repl",
|
|
28
|
+
"debugger",
|
|
29
|
+
"pty",
|
|
30
|
+
"conpty",
|
|
17
31
|
"bash",
|
|
18
32
|
"pwsh",
|
|
19
33
|
"powershell",
|
|
34
|
+
"zsh",
|
|
20
35
|
"cmd",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
36
|
+
"python",
|
|
37
|
+
"node",
|
|
38
|
+
"deno",
|
|
39
|
+
"racket",
|
|
40
|
+
"common-lisp",
|
|
41
|
+
"groovy",
|
|
42
|
+
"fsharp",
|
|
43
|
+
"sqlite"
|
|
29
44
|
],
|
|
30
45
|
"bin": {
|
|
31
|
-
"
|
|
46
|
+
"splashshell": "bin/cli.mjs"
|
|
47
|
+
},
|
|
48
|
+
"optionalDependencies": {
|
|
49
|
+
"@ytsuda/splashshell-win32-x64": "0.15.0",
|
|
50
|
+
"@ytsuda/splashshell-linux-x64": "0.15.0",
|
|
51
|
+
"@ytsuda/splashshell-darwin-arm64": "0.15.0"
|
|
32
52
|
},
|
|
33
53
|
"files": [
|
|
34
54
|
"bin/",
|
|
35
|
-
"dist/",
|
|
36
55
|
"README.md",
|
|
37
56
|
"LICENSE"
|
|
38
57
|
]
|
package/dist/splash.exe
DELETED
|
Binary file
|