cerebras-cli 1.0.152 → 1.0.156

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 CHANGED
@@ -1,15 +1,19 @@
1
- # js
1
+ # Cerebras Code CLI
2
2
 
3
- To install dependencies:
3
+ The fastest AI coding assistant, powered by Cerebras inference.
4
+
5
+ ## Install
4
6
 
5
7
  ```bash
6
- bun install
8
+ npm install -g cerebras-cli
7
9
  ```
8
10
 
9
- To run:
11
+ ## Run
10
12
 
11
13
  ```bash
12
- bun run index.ts
14
+ cerebras-cli
13
15
  ```
14
16
 
15
- This project was created using `bun init` in bun v1.2.12. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime.
17
+ ## Get Your API Key
18
+
19
+ Get a free Cerebras API key at [cloud.cerebras.ai](https://cloud.cerebras.ai)
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env node
2
+ const childProcess = require("child_process")
3
+ const fs = require("fs")
4
+ const path = require("path")
5
+ const os = require("os")
6
+
7
+ function run(target) {
8
+ const result = childProcess.spawnSync(target, process.argv.slice(2), { stdio: "inherit" })
9
+ if (result.error) { console.error(result.error.message); process.exit(1) }
10
+ process.exit(typeof result.status === "number" ? result.status : 0)
11
+ }
12
+
13
+ const envPath = process.env.CEREBRAS_CLI_BIN_PATH || process.env.OPENCODE_BIN_PATH
14
+ if (envPath) run(envPath)
15
+
16
+ const scriptDir = path.dirname(fs.realpathSync(__filename))
17
+ const base = "cerebras-cli-" + ({"darwin":"darwin","linux":"linux","win32":"windows"}[os.platform()] || os.platform()) + "-" + ({"x64":"x64","arm64":"arm64","arm":"arm"}[os.arch()] || os.arch())
18
+ const binary = os.platform() === "win32" ? "cerebras-cli.exe" : "cerebras-cli"
19
+
20
+ function findBinary(startDir) {
21
+ let current = startDir
22
+ while (true) {
23
+ const modules = path.join(current, "node_modules")
24
+ if (fs.existsSync(modules)) {
25
+ for (const entry of fs.readdirSync(modules)) {
26
+ if (entry.startsWith(base)) {
27
+ const candidate = path.join(modules, entry, "bin", binary)
28
+ if (fs.existsSync(candidate)) return candidate
29
+ }
30
+ }
31
+ }
32
+ const parent = path.dirname(current)
33
+ if (parent === current) return
34
+ current = parent
35
+ }
36
+ }
37
+
38
+ const resolved = findBinary(scriptDir)
39
+ if (!resolved) { console.error("Binary not found for " + base); process.exit(1) }
40
+ run(resolved)
package/package.json CHANGED
@@ -1,99 +1,11 @@
1
1
  {
2
- "$schema": "https://json.schemastore.org/package.json",
3
- "version": "1.0.152",
4
2
  "name": "cerebras-cli",
3
+ "version": "1.0.156",
5
4
  "description": "Cerebras Code CLI - The fastest AI coding assistant",
5
+ "author": "Kevin Taylor",
6
+ "license": "MIT",
6
7
  "type": "module",
7
- "scripts": {
8
- "typecheck": "tsgo --noEmit",
9
- "test": "bun test",
10
- "build": "./script/build.ts",
11
- "dev": "bun run --conditions=browser ./src/index.ts"
12
- },
13
- "bin": {
14
- "cerebras-cli": "bin/cerebras-cli"
15
- },
16
- "optionalDependencies": {
17
- "cerebras-cli-darwin-arm64": "1.0.152"
18
- },
19
- "devDependencies": {
20
- "@babel/core": "7.28.4",
21
- "@octokit/webhooks-types": "7.6.1",
22
- "@parcel/watcher-darwin-arm64": "2.5.1",
23
- "@parcel/watcher-darwin-x64": "2.5.1",
24
- "@parcel/watcher-linux-arm64-glibc": "2.5.1",
25
- "@parcel/watcher-linux-arm64-musl": "2.5.1",
26
- "@parcel/watcher-linux-x64-glibc": "2.5.1",
27
- "@parcel/watcher-linux-x64-musl": "2.5.1",
28
- "@parcel/watcher-win32-x64": "2.5.1",
29
- "@standard-schema/spec": "1.0.0",
30
- "@tsconfig/bun": "1.0.9",
31
- "@types/babel__core": "7.20.5",
32
- "@types/bun": "1.3.3",
33
- "@types/turndown": "5.0.5",
34
- "@types/yargs": "17.0.33",
35
- "typescript": "5.8.2",
36
- "@typescript/native-preview": "7.0.0-dev.20251207.1",
37
- "vscode-languageserver-types": "3.17.5",
38
- "why-is-node-running": "3.2.2",
39
- "zod-to-json-schema": "3.24.5"
40
- },
41
- "dependencies": {
42
- "@actions/core": "1.11.1",
43
- "@actions/github": "6.0.1",
44
- "@agentclientprotocol/sdk": "0.5.1",
45
- "@ai-sdk/amazon-bedrock": "3.0.57",
46
- "@ai-sdk/anthropic": "2.0.50",
47
- "@ai-sdk/azure": "2.0.73",
48
- "@ai-sdk/google": "2.0.44",
49
- "@ai-sdk/google-vertex": "3.0.81",
50
- "@ai-sdk/mcp": "0.0.8",
51
- "@ai-sdk/openai": "2.0.71",
52
- "@ai-sdk/openai-compatible": "1.0.27",
53
- "@ai-sdk/provider": "2.0.0",
54
- "@ai-sdk/provider-utils": "3.0.18",
55
- "@clack/prompts": "1.0.0-alpha.1",
56
- "@hono/standard-validator": "0.1.5",
57
- "@hono/zod-validator": "0.4.2",
58
- "@modelcontextprotocol/sdk": "1.15.1",
59
- "@octokit/graphql": "9.0.2",
60
- "@octokit/rest": "22.0.0",
61
- "@openauthjs/openauth": "0.0.0-20250322224806",
62
- "@openrouter/ai-sdk-provider": "1.2.8",
63
- "@opentui/core": "0.1.59",
64
- "@opentui/solid": "0.1.59",
65
- "@parcel/watcher": "2.5.1",
66
- "@pierre/precision-diffs": "0.6.0-beta.10",
67
- "@solid-primitives/event-bus": "1.1.2",
68
- "@standard-schema/spec": "1.0.0",
69
- "@zip.js/zip.js": "2.7.62",
70
- "ai": "5.0.97",
71
- "bun-pty": "0.4.2",
72
- "chokidar": "4.0.3",
73
- "clipboardy": "4.0.0",
74
- "decimal.js": "10.5.0",
75
- "diff": "8.0.2",
76
- "fuzzysort": "3.1.0",
77
- "gray-matter": "4.0.3",
78
- "hono": "4.10.7",
79
- "hono-openapi": "1.1.2",
80
- "ignore": "7.0.5",
81
- "jsonc-parser": "3.3.1",
82
- "minimatch": "10.0.3",
83
- "open": "10.1.2",
84
- "opentui-spinner": "0.0.6",
85
- "partial-json": "0.1.7",
86
- "remeda": "2.26.0",
87
- "solid-js": "1.9.10",
88
- "strip-ansi": "7.1.2",
89
- "tree-sitter-bash": "0.25.0",
90
- "turndown": "7.2.0",
91
- "ulid": "3.0.1",
92
- "vscode-jsonrpc": "8.2.1",
93
- "web-tree-sitter": "0.25.10",
94
- "xdg-basedir": "5.1.0",
95
- "yargs": "18.0.0",
96
- "zod": "4.1.8",
97
- "zod-to-json-schema": "3.24.5"
98
- }
8
+ "bin": { "cerebras-cli": "bin/opencode.cjs" },
9
+ "repository": { "type": "git", "url": "git+https://github.com/kevint-cerebras/cerebras-code-cli.git" },
10
+ "optionalDependencies": { "cerebras-cli-darwin-arm64": "1.0.156" }
99
11
  }
package/bin/cerebras-cli DELETED
@@ -1,86 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- import { spawnSync } from "child_process"
4
- import { existsSync, readdirSync, realpathSync } from "fs"
5
- import { dirname, join } from "path"
6
- import { platform as osPlatform, arch as osArch } from "os"
7
- import { fileURLToPath } from "url"
8
-
9
- function run(target) {
10
- const result = spawnSync(target, process.argv.slice(2), {
11
- stdio: "inherit",
12
- })
13
- if (result.error) {
14
- console.error(result.error.message)
15
- process.exit(1)
16
- }
17
- const code = typeof result.status === "number" ? result.status : 0
18
- process.exit(code)
19
- }
20
-
21
- const envPath = process.env.CEREBRAS_CLI_BIN_PATH || process.env.OPENCODE_BIN_PATH
22
- if (envPath) {
23
- run(envPath)
24
- }
25
-
26
- const __filename = fileURLToPath(import.meta.url)
27
- const scriptPath = realpathSync(__filename)
28
- const scriptDir = dirname(scriptPath)
29
-
30
- const platformMap = {
31
- darwin: "darwin",
32
- linux: "linux",
33
- win32: "windows",
34
- }
35
- const archMap = {
36
- x64: "x64",
37
- arm64: "arm64",
38
- arm: "arm",
39
- }
40
-
41
- let platform = platformMap[osPlatform()]
42
- if (!platform) {
43
- platform = osPlatform()
44
- }
45
- let arch = archMap[osArch()]
46
- if (!arch) {
47
- arch = osArch()
48
- }
49
- const base = "cerebras-cli-" + platform + "-" + arch
50
- const binary = platform === "windows" ? "cerebras-cli.exe" : "cerebras-cli"
51
-
52
- function findBinary(startDir) {
53
- let current = startDir
54
- for (;;) {
55
- const modules = join(current, "node_modules")
56
- if (existsSync(modules)) {
57
- const entries = readdirSync(modules)
58
- for (const entry of entries) {
59
- if (!entry.startsWith(base)) {
60
- continue
61
- }
62
- const candidate = join(modules, entry, "bin", binary)
63
- if (existsSync(candidate)) {
64
- return candidate
65
- }
66
- }
67
- }
68
- const parent = dirname(current)
69
- if (parent === current) {
70
- return
71
- }
72
- current = parent
73
- }
74
- }
75
-
76
- const resolved = findBinary(scriptDir)
77
- if (!resolved) {
78
- console.error(
79
- 'It seems that your package manager failed to install the right version of the cerebras-cli for your platform. You can try manually installing the "' +
80
- base +
81
- '" package',
82
- )
83
- process.exit(1)
84
- }
85
-
86
- run(resolved)