pythia-plsql 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/bin.js +37 -0
- package/package.json +12 -0
package/bin.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// npx pythia-plsql — the whole kit in one command:
|
|
3
|
+
// 1. pip install pythia-plsql (CLI + queries + bundled skills)
|
|
4
|
+
// 2. pythia install (skills via `npx skills add` with its
|
|
5
|
+
// interactive agent picker, + .pythia/ scaffold)
|
|
6
|
+
// This wrapper stays dependency-free: it only finds Python and delegates.
|
|
7
|
+
"use strict";
|
|
8
|
+
const { spawnSync } = require("node:child_process");
|
|
9
|
+
|
|
10
|
+
const onWindows = process.platform === "win32";
|
|
11
|
+
const run = (cmd, args, stdio) =>
|
|
12
|
+
spawnSync(cmd, args, { stdio, shell: onWindows });
|
|
13
|
+
|
|
14
|
+
function findPython() {
|
|
15
|
+
for (const [cmd, args] of [["python3", []], ["python", []], ["py", ["-3"]]]) {
|
|
16
|
+
const r = run(cmd, [...args, "--version"], "ignore");
|
|
17
|
+
if (r.status === 0) return [cmd, args];
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const py = findPython();
|
|
23
|
+
if (!py) {
|
|
24
|
+
console.error("Python 3.9+ is required but was not found on PATH.");
|
|
25
|
+
console.error("Install it from https://python.org, then rerun: npx pythia-plsql");
|
|
26
|
+
process.exit(1);
|
|
27
|
+
}
|
|
28
|
+
const [cmd, base] = py;
|
|
29
|
+
|
|
30
|
+
console.log("Installing the pythia CLI (pip install pythia-plsql)...");
|
|
31
|
+
let r = run(cmd, [...base, "-m", "pip", "install", "--upgrade", "pythia-plsql"], "inherit");
|
|
32
|
+
if (r.status !== 0) process.exit(r.status ?? 1);
|
|
33
|
+
|
|
34
|
+
// `-m pythia` instead of the console script: pip user installs may put
|
|
35
|
+
// Scripts/ off PATH, the module never is.
|
|
36
|
+
r = run(cmd, [...base, "-m", "pythia", "install"], "inherit");
|
|
37
|
+
process.exit(r.status ?? 0);
|
package/package.json
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pythia-plsql",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "One-command installer for pythia: PL/SQL development for AI agents on Oracle Database. Installs the Python CLI, the seven-skill pack, and the .pythia/ config scaffold.",
|
|
5
|
+
"bin": { "pythia-plsql": "bin.js" },
|
|
6
|
+
"files": ["bin.js"],
|
|
7
|
+
"license": "MIT",
|
|
8
|
+
"repository": { "type": "git", "url": "git+https://github.com/thaildhe172591/pythia.git" },
|
|
9
|
+
"homepage": "https://github.com/thaildhe172591/pythia",
|
|
10
|
+
"keywords": ["oracle", "plsql", "database", "agent-skills", "sql"],
|
|
11
|
+
"engines": { "node": ">=18" }
|
|
12
|
+
}
|