probe-research 0.10.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 +19 -0
- package/bin/probe-research.js +81 -0
- package/package.json +26 -0
package/README.md
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# probe-research
|
|
2
|
+
|
|
3
|
+
The Probe Research setup wizard.
|
|
4
|
+
|
|
5
|
+
```bash
|
|
6
|
+
npx probe-research
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Installs and configures [Probe Research](https://research.prbe.ai) for Claude Code.
|
|
10
|
+
It asks which capabilities you want, installs only those plugins, and finishes
|
|
11
|
+
with a single browser approval.
|
|
12
|
+
|
|
13
|
+
This package is a thin launcher. Probe Research is a Python CLI; this exists so
|
|
14
|
+
the entry point matches the `npx <tool>` shape people already expect. It resolves
|
|
15
|
+
a real `probe` (via an existing install, `uv`, or `pipx`) and hands over — there
|
|
16
|
+
is no reimplementation here that could drift from the CLI.
|
|
17
|
+
|
|
18
|
+
Re-run it any time to change what's enabled, diagnose a problem, update, print
|
|
19
|
+
the manual steps, or remove Probe from the device.
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* `npx probe-research` — the setup wizard, from zero.
|
|
4
|
+
*
|
|
5
|
+
* Probe Research is a PYTHON CLI. This package exists only so the entry point
|
|
6
|
+
* matches the shape people already have muscle memory for (`npx <tool>`), the
|
|
7
|
+
* same way Claude Code ships an npm package that installs a native binary and
|
|
8
|
+
* never invokes Node at runtime.
|
|
9
|
+
*
|
|
10
|
+
* It resolves a real `probe` and hands over. It is NOT a reimplementation, so
|
|
11
|
+
* there is nothing here that can drift from the CLI's behaviour.
|
|
12
|
+
*
|
|
13
|
+
* Resolution order, best first:
|
|
14
|
+
* 1. `probe` already on PATH -> exec it (the common re-run case)
|
|
15
|
+
* 2. `uv` -> uvx, no install, no state left behind
|
|
16
|
+
* 3. `pipx` -> isolated install
|
|
17
|
+
* 4. bootstrap uv, then uvx -> the from-zero path
|
|
18
|
+
*
|
|
19
|
+
* We deliberately do NOT fall back to bare `pip install`: on a researcher's
|
|
20
|
+
* machine that usually means a conda/system environment, and silently mutating
|
|
21
|
+
* it to run an installer is exactly the kind of thing that breaks a training
|
|
22
|
+
* run three days later.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
const { spawnSync } = require("node:child_process");
|
|
26
|
+
const os = require("node:os");
|
|
27
|
+
|
|
28
|
+
const DIST = "probe-research";
|
|
29
|
+
const UV_INSTALL = "curl -LsSf https://astral.sh/uv/install.sh | sh";
|
|
30
|
+
|
|
31
|
+
function has(cmd) {
|
|
32
|
+
const probe = process.platform === "win32" ? "where" : "command";
|
|
33
|
+
const args = process.platform === "win32" ? [cmd] : ["-v", cmd];
|
|
34
|
+
const r = spawnSync(probe, args, { stdio: "ignore", shell: true });
|
|
35
|
+
return r.status === 0;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function run(cmd, args) {
|
|
39
|
+
// stdio inherit is load-bearing: the wizard is INTERACTIVE (arrow-key menu)
|
|
40
|
+
// and opens a browser. Capturing its output would break both.
|
|
41
|
+
const r = spawnSync(cmd, args, { stdio: "inherit", shell: false });
|
|
42
|
+
if (r.error) {
|
|
43
|
+
console.error(`probe-research: could not run ${cmd}: ${r.error.message}`);
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
process.exit(r.status === null ? 1 : r.status);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function main() {
|
|
50
|
+
const args = process.argv.slice(2);
|
|
51
|
+
// `npx probe-research` with no arguments runs the wizard — that is the entire
|
|
52
|
+
// reason this package exists, so it should not require remembering a verb.
|
|
53
|
+
const forwarded = args.length ? args : ["wizard"];
|
|
54
|
+
|
|
55
|
+
if (has("probe")) return run("probe", forwarded);
|
|
56
|
+
if (has("uv")) return run("uv", ["tool", "run", "--from", DIST, "probe", ...forwarded]);
|
|
57
|
+
if (has("pipx")) return run("pipx", ["run", "--spec", DIST, "probe", ...forwarded]);
|
|
58
|
+
|
|
59
|
+
if (process.platform === "win32") {
|
|
60
|
+
console.error(
|
|
61
|
+
`probe-research: needs uv or pipx on PATH.\n` +
|
|
62
|
+
` Install uv: https://docs.astral.sh/uv/getting-started/installation/`,
|
|
63
|
+
);
|
|
64
|
+
process.exit(1);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
console.error("probe-research: installing uv (one-time)…");
|
|
68
|
+
const boot = spawnSync("sh", ["-c", UV_INSTALL], { stdio: "inherit" });
|
|
69
|
+
if (boot.status !== 0) {
|
|
70
|
+
console.error(
|
|
71
|
+
`probe-research: could not install uv automatically.\n Run: ${UV_INSTALL}`,
|
|
72
|
+
);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
// The installer drops uv in ~/.local/bin, which is not on THIS process's PATH
|
|
76
|
+
// because it was resolved before the install ran.
|
|
77
|
+
const uv = `${os.homedir()}/.local/bin/uv`;
|
|
78
|
+
return run(uv, ["tool", "run", "--from", DIST, "probe", ...forwarded]);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
main();
|
package/package.json
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "probe-research",
|
|
3
|
+
"version": "0.10.0",
|
|
4
|
+
"description": "Setup wizard for Probe Research in Claude Code. Runs from zero with npx.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"probe-research": "bin/probe-research.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin"
|
|
10
|
+
],
|
|
11
|
+
"engines": {
|
|
12
|
+
"node": ">=18"
|
|
13
|
+
},
|
|
14
|
+
"license": "Apache-2.0",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/prbe-ai/research-os-agent.git"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://research.prbe.ai/connect",
|
|
20
|
+
"keywords": [
|
|
21
|
+
"claude-code",
|
|
22
|
+
"mlops",
|
|
23
|
+
"experiment-tracking",
|
|
24
|
+
"probe-research"
|
|
25
|
+
]
|
|
26
|
+
}
|