@babalcode/cli 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/LICENSE ADDED
@@ -0,0 +1,24 @@
1
+ PROPRIETARY SOFTWARE LICENSE
2
+
3
+ Copyright (c) 2026 Babalcode. All rights reserved.
4
+
5
+ This software and associated documentation files (the "Software") are the
6
+ proprietary property of Babalcode. The Software is licensed, not sold.
7
+
8
+ You may use the Software only as permitted by Babalcode. Unless you have a
9
+ separate written agreement with Babalcode, you may not:
10
+
11
+ - copy, modify, or create derivative works of the Software;
12
+ - reverse engineer, decompile, or disassemble the Software, except where
13
+ such restriction is prohibited by applicable law;
14
+ - redistribute, sublicense, rent, lease, or lend the Software;
15
+ - remove or alter any proprietary notices on the Software.
16
+
17
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
+ BABALCODE BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21
+ ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23
+
24
+ For licensing inquiries, contact the Babalcode maintainers.
package/README.md ADDED
@@ -0,0 +1,58 @@
1
+ # babalcode
2
+
3
+ Terminal coding agent — an AI pair programmer that runs in your shell.
4
+
5
+ ## Install
6
+
7
+ ```bash
8
+ npm install -g @babalcode/cli
9
+ ```
10
+
11
+ Requires **Node.js 18+** (used only by the tiny install launcher; the app itself is a standalone binary).
12
+
13
+ ## Quick start
14
+
15
+ ```bash
16
+ babalcode
17
+ ```
18
+
19
+ On first launch:
20
+
21
+ 1. Run `/connect` to add an API key for your provider (stored in the OS keychain).
22
+ 2. Run `/models` to pick a model.
23
+ 3. Type a task at the prompt.
24
+
25
+ ## Commands
26
+
27
+ | Command | Description |
28
+ |---------|-------------|
29
+ | `/connect` | Add or update provider API keys |
30
+ | `/models` | Switch the active model |
31
+ | `/custom` | Add an OpenAI-compatible endpoint |
32
+ | `/sessions` | Browse past sessions |
33
+ | `/clear` | Clear the current chat |
34
+ | `/exit` | Quit |
35
+
36
+ ## API keys
37
+
38
+ babalcode is **bring-your-own-key**. Keys are stored in your OS credential manager (Windows Credential Manager, macOS Keychain, or Linux libsecret). Environment variables for supported providers still work as a fallback.
39
+
40
+ ## Supported platforms
41
+
42
+ Prebuilt binaries are provided for:
43
+
44
+ - macOS (Apple Silicon and Intel)
45
+ - Linux (x64 and arm64)
46
+ - Windows (x64)
47
+
48
+ If install fails with “no prebuilt binary”, your OS/arch combination is not supported yet.
49
+
50
+ ## Version
51
+
52
+ ```bash
53
+ babalcode --version
54
+ ```
55
+
56
+ ## License
57
+
58
+ Proprietary — see [LICENSE](./LICENSE). Unauthorized copying, redistribution, or reverse engineering is prohibited.
@@ -0,0 +1,46 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import { createRequire } from "node:module";
4
+ import { dirname, join } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+ import { readFileSync } from "node:fs";
7
+
8
+ const require = createRequire(import.meta.url);
9
+ const platform = process.platform;
10
+ const arch = process.arch;
11
+ const pkg = `@babalcode/cli-${platform}-${arch}`;
12
+
13
+ const args = process.argv.slice(2);
14
+
15
+ if (args.includes("--version") || args.includes("-V")) {
16
+ try {
17
+ const self = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
18
+ const { version } = JSON.parse(readFileSync(self, "utf8"));
19
+ console.log(version);
20
+ process.exit(0);
21
+ } catch {
22
+ console.log("unknown");
23
+ process.exit(1);
24
+ }
25
+ }
26
+
27
+ let binaryPath;
28
+ try {
29
+ const pkgJson = require.resolve(`${pkg}/package.json`);
30
+ const binDir = join(dirname(pkgJson), "bin");
31
+ const binaryName = platform === "win32" ? "babalcode.exe" : "babalcode";
32
+ binaryPath = join(binDir, binaryName);
33
+ } catch {
34
+ console.error(
35
+ `babalcode: no prebuilt binary for ${platform}-${arch}.\n` +
36
+ `This usually means npm did not install the matching optional dependency (${pkg}).`,
37
+ );
38
+ process.exit(1);
39
+ }
40
+
41
+ const result = spawnSync(binaryPath, args, { stdio: "inherit" });
42
+ if (result.error) {
43
+ console.error(`babalcode: failed to start: ${result.error.message}`);
44
+ process.exit(1);
45
+ }
46
+ process.exit(result.status ?? 1);
package/package.json ADDED
@@ -0,0 +1,32 @@
1
+ {
2
+ "name": "@babalcode/cli",
3
+ "version": "0.1.0",
4
+ "description": "Terminal coding agent — AI pair programmer in your shell",
5
+ "license": "SEE LICENSE IN LICENSE",
6
+ "type": "module",
7
+ "bin": {
8
+ "babalcode": "bin/babalcode.js"
9
+ },
10
+ "files": [
11
+ "bin",
12
+ "README.md",
13
+ "LICENSE"
14
+ ],
15
+ "engines": {
16
+ "node": ">=18"
17
+ },
18
+ "keywords": [
19
+ "cli",
20
+ "ai",
21
+ "coding-agent",
22
+ "terminal",
23
+ "tui"
24
+ ],
25
+ "optionalDependencies": {
26
+ "@babalcode/cli-darwin-arm64": "0.1.0",
27
+ "@babalcode/cli-darwin-x64": "0.1.0",
28
+ "@babalcode/cli-linux-arm64": "0.1.0",
29
+ "@babalcode/cli-linux-x64": "0.1.0",
30
+ "@babalcode/cli-win32-x64": "0.1.0"
31
+ }
32
+ }