kino-cli 0.0.0-stage → 0.1.1
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 +14 -2
- package/bin/kino.js +97 -0
- package/dist/kino_cli-0.1.1-cp312-cp312-linux_aarch64.whl +0 -0
- package/dist/kino_cli-0.1.1-cp312-cp312-linux_x86_64.whl +0 -0
- package/dist/kino_cli-0.1.1-cp312-cp312-macosx_11_0_arm64.whl +0 -0
- package/dist/kino_cli-0.1.1-cp312-cp312-macosx_11_0_x86_64.whl +0 -0
- package/dist/kino_cli-0.1.1-cp312-cp312-win_amd64.whl +0 -0
- package/package.json +36 -4
package/README.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
-
#
|
|
1
|
+
# kino-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
kino learns a codebase and its tools, then works as one of the team's developers by running processes
|
|
4
|
+
(ticket to PR, review loops, and more). It includes **kino-code**, a coding agent that runs on any model.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx kino-cli # open the kino shell in this folder
|
|
8
|
+
npx kino-cli init # set kino up for this repository
|
|
9
|
+
npx kino-cli code -p "fix the off-by-one in pagination and add a test"
|
|
10
|
+
npm i -g kino-cli # then just: kino
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This package carries kino compiled for macOS, Linux and Windows and runs it with [uv](https://docs.astral.sh/uv),
|
|
14
|
+
which fetches Python 3.12 and kino's dependencies on the first run and caches them. If uv is missing it is installed
|
|
15
|
+
for you (set `KINO_NO_UV_INSTALL=1` to refuse, or `KINO_UV=/path/to/uv` to pick one). Node 18+.
|
package/bin/kino.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// kino is a compiled Python extension; this launcher runs the wheel for this platform, shipped inside this package, with uv
|
|
3
|
+
// (https://docs.astral.sh/uv), which fetches a suitable Python and kino's dependencies once and caches them.
|
|
4
|
+
// If uv is missing it is installed with its official script, unless KINO_NO_UV_INSTALL=1.
|
|
5
|
+
"use strict";
|
|
6
|
+
|
|
7
|
+
const { spawn, spawnSync } = require("child_process");
|
|
8
|
+
const fs = require("fs");
|
|
9
|
+
const os = require("os");
|
|
10
|
+
const path = require("path");
|
|
11
|
+
|
|
12
|
+
const isWindows = process.platform === "win32";
|
|
13
|
+
const exe = isWindows ? "uv.exe" : "uv";
|
|
14
|
+
|
|
15
|
+
// The compiled wheel for this platform (kino ships compiled, one wheel per OS and CPU).
|
|
16
|
+
const TAGS = {
|
|
17
|
+
"darwin-arm64": "macosx_11_0_arm64",
|
|
18
|
+
"darwin-x64": "macosx_11_0_x86_64",
|
|
19
|
+
"linux-x64": "linux_x86_64",
|
|
20
|
+
"linux-arm64": "linux_aarch64",
|
|
21
|
+
"win32-x64": "win_amd64",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
function wheelPath() {
|
|
25
|
+
const platform = `${process.platform}-${process.arch}`;
|
|
26
|
+
const tag = TAGS[platform];
|
|
27
|
+
const dist = path.join(__dirname, "..", "dist");
|
|
28
|
+
const wheel = tag && fs.existsSync(dist) && fs.readdirSync(dist).find((f) => f.endsWith(`-${tag}.whl`));
|
|
29
|
+
if (!wheel) {
|
|
30
|
+
console.error(`kino-cli: no build for ${platform} in this package`);
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
return path.join(dist, wheel);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function works(uv) {
|
|
37
|
+
try {
|
|
38
|
+
return spawnSync(uv, ["--version"], { stdio: "ignore" }).status === 0;
|
|
39
|
+
} catch {
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function findUv() {
|
|
45
|
+
const home = os.homedir();
|
|
46
|
+
const candidates = [
|
|
47
|
+
process.env.KINO_UV,
|
|
48
|
+
"uv",
|
|
49
|
+
path.join(home, ".local", "bin", exe),
|
|
50
|
+
path.join(home, ".cargo", "bin", exe),
|
|
51
|
+
process.env.XDG_BIN_HOME && path.join(process.env.XDG_BIN_HOME, exe),
|
|
52
|
+
].filter(Boolean);
|
|
53
|
+
return candidates.find(works);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function installUv() {
|
|
57
|
+
if (process.env.KINO_NO_UV_INSTALL === "1") {
|
|
58
|
+
console.error("kino-cli needs uv: install it from https://docs.astral.sh/uv/getting-started/installation/");
|
|
59
|
+
process.exit(1);
|
|
60
|
+
}
|
|
61
|
+
console.error("kino-cli: installing uv (https://docs.astral.sh/uv), which runs kino's Python…");
|
|
62
|
+
const result = isWindows
|
|
63
|
+
? spawnSync("powershell", ["-ExecutionPolicy", "ByPass", "-c", "irm https://astral.sh/uv/install.ps1 | iex"], {
|
|
64
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
65
|
+
})
|
|
66
|
+
: spawnSync("sh", ["-c", "curl -LsSf https://astral.sh/uv/install.sh | sh"], {
|
|
67
|
+
stdio: ["ignore", "inherit", "inherit"],
|
|
68
|
+
});
|
|
69
|
+
if (result.status !== 0) {
|
|
70
|
+
console.error("kino-cli: installing uv failed; install it by hand: https://docs.astral.sh/uv/");
|
|
71
|
+
process.exit(1);
|
|
72
|
+
}
|
|
73
|
+
const uv = findUv();
|
|
74
|
+
if (!uv) {
|
|
75
|
+
console.error("kino-cli: uv was installed but is not on PATH yet; open a new terminal and run kino again");
|
|
76
|
+
process.exit(1);
|
|
77
|
+
}
|
|
78
|
+
return uv;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
const uv = findUv() || installUv();
|
|
82
|
+
const args = ["tool", "run", "--quiet", "--python", "3.12", "--from", wheelPath(), "kino", ...process.argv.slice(2)];
|
|
83
|
+
const child = spawn(uv, args, { stdio: "inherit" });
|
|
84
|
+
// The terminal sends Ctrl-C to kino directly (same process group); the launcher just waits for it.
|
|
85
|
+
for (const signal of ["SIGINT", "SIGTERM", "SIGHUP"]) {
|
|
86
|
+
process.on(signal, () => {
|
|
87
|
+
if (signal !== "SIGINT") child.kill(signal);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
child.on("error", (err) => {
|
|
91
|
+
console.error(`kino-cli: could not run uv: ${err.message}`);
|
|
92
|
+
process.exit(1);
|
|
93
|
+
});
|
|
94
|
+
child.on("exit", (code, signal) => {
|
|
95
|
+
if (signal) process.kill(process.pid, signal);
|
|
96
|
+
process.exit(code ?? 1);
|
|
97
|
+
});
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kino-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"description": "kino: an agent that learns your codebase and tools, then works as one of the team's developers. Includes kino-code, a coding agent on any model.",
|
|
5
|
+
"bin": {
|
|
6
|
+
"kino": "bin/kino.js"
|
|
7
|
+
},
|
|
8
|
+
"files": [
|
|
9
|
+
"bin/",
|
|
10
|
+
"dist/*.whl",
|
|
11
|
+
"README.md"
|
|
12
|
+
],
|
|
13
|
+
"engines": {
|
|
14
|
+
"node": ">=18"
|
|
15
|
+
},
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/DogukanGun/kino.git"
|
|
19
|
+
},
|
|
20
|
+
"keywords": [
|
|
21
|
+
"agent",
|
|
22
|
+
"coding-agent",
|
|
23
|
+
"cli",
|
|
24
|
+
"bpmn",
|
|
25
|
+
"claude",
|
|
26
|
+
"openai"
|
|
27
|
+
],
|
|
28
|
+
"license": "UNLICENSED",
|
|
29
|
+
"os": [
|
|
30
|
+
"darwin",
|
|
31
|
+
"linux",
|
|
32
|
+
"win32"
|
|
33
|
+
],
|
|
34
|
+
"cpu": [
|
|
35
|
+
"arm64",
|
|
36
|
+
"x64"
|
|
37
|
+
]
|
|
38
|
+
}
|