@knightcodeai/cli 0.9.1 → 0.9.3
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 +52 -19
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -1,36 +1,69 @@
|
|
|
1
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://knightcode.dev">
|
|
3
|
+
<img alt="KnightCode logo" src="https://knightcode.dev/knightcode-mark.svg" width="128">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
<p align="center">
|
|
7
|
+
<a href="https://www.npmjs.com/package/@knightcodeai/cli"><img alt="npm" src="https://img.shields.io/npm/v/@knightcodeai/cli?style=flat-square&logo=npm&logoColor=white" /></a>
|
|
8
|
+
</p>
|
|
2
9
|
|
|
3
|
-
|
|
10
|
+
> New issues and PRs from new contributors are closed automatically. Maintainers review closed submissions daily. See [CONTRIBUTING.md](https://github.com/KnightCodeAI/knightcode/blob/main/CONTRIBUTING.md).
|
|
4
11
|
|
|
5
|
-
|
|
12
|
+
# KnightCode
|
|
13
|
+
|
|
14
|
+
KnightCode is a minimal, extensible AI agent for the terminal. Adapt KnightCode to your workflow, not the other way around.
|
|
15
|
+
|
|
16
|
+
Ask KnightCode to create the prompt templates, skills, extensions, and themes you need, or install a KnightCode package. Use KnightCode directly, automate it in print, JSON, or RPC mode, or build applications with the TypeScript SDK.
|
|
17
|
+
|
|
18
|
+
## Getting started
|
|
19
|
+
|
|
20
|
+
Install the command-line interface with npm:
|
|
6
21
|
|
|
7
22
|
```bash
|
|
8
|
-
npm install -g @knightcodeai/cli
|
|
23
|
+
npm install -g --ignore-scripts @knightcodeai/cli
|
|
9
24
|
```
|
|
10
25
|
|
|
11
|
-
You
|
|
12
|
-
(`bin/knightcode`) that spawns it runs on Node.js (>=18), which you already have
|
|
13
|
-
if you installed with npm. The right platform binary installs automatically as
|
|
14
|
-
an optional dependency.
|
|
26
|
+
This requires Node.js 22 or newer. KnightCode does not require dependency lifecycle scripts for a normal npm installation. You do not need Bun: it is bundled into the platform binary, which installs automatically as an optional dependency for Linux (x64, arm64), macOS (x64, arm64), and Windows (x64).
|
|
15
27
|
|
|
16
|
-
|
|
28
|
+
On macOS or Linux, you can instead use the installer:
|
|
17
29
|
|
|
18
30
|
```bash
|
|
31
|
+
curl -fsSL https://knightcode.dev/install.sh | sh
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Start KnightCode in the directory where you want it to work:
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
cd /path/to/project
|
|
19
38
|
knightcode
|
|
20
39
|
```
|
|
21
40
|
|
|
22
|
-
|
|
41
|
+
For a built-in AI provider, run `/login` inside KnightCode to connect a subscription or API key. Then give KnightCode a task.
|
|
42
|
+
|
|
43
|
+
See the [documentation](docs/index.md) for full setup and usage instructions.
|
|
23
44
|
|
|
24
|
-
##
|
|
45
|
+
## Development
|
|
25
46
|
|
|
26
|
-
|
|
47
|
+
Clone the repository, install its dependencies, and run KnightCode from source:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
git clone https://github.com/KnightCodeAI/knightcode
|
|
51
|
+
cd knightcode
|
|
52
|
+
bun install
|
|
53
|
+
bun run start
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`bun run start` runs the CLI from source with the repository's `.env` loaded.
|
|
57
|
+
|
|
58
|
+
Before submitting changes, run:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bun run check-types
|
|
62
|
+
cd packages/<package> && bun x vitest --run test/<changed>.test.ts
|
|
63
|
+
```
|
|
27
64
|
|
|
28
|
-
|
|
29
|
-
| ----------------- | ------ |
|
|
30
|
-
| `knightcode --version` | Print the installed version |
|
|
31
|
-
| `knightcode doctor` | Print diagnostics (config, database, API key, runtime) |
|
|
32
|
-
| `KNIGHTCODE_NO_UPDATE_CHECK=1` | Disable the background update check |
|
|
65
|
+
Read [CONTRIBUTING.md](https://github.com/KnightCodeAI/knightcode/blob/main/CONTRIBUTING.md) before opening an issue or pull request. It defines the contribution gate, issue quality bar, and required checks. Read [AGENTS.md](https://github.com/KnightCodeAI/knightcode/blob/main/AGENTS.md) for repository-specific implementation, testing, dependency, and release rules.
|
|
33
66
|
|
|
34
|
-
##
|
|
67
|
+
## License
|
|
35
68
|
|
|
36
|
-
|
|
69
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@knightcodeai/cli",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.3",
|
|
4
4
|
"description": "KnightCode — a local, BYOK terminal coding agent powered by OpenRouter.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"test": "vitest --run"
|
|
38
38
|
},
|
|
39
39
|
"optionalDependencies": {
|
|
40
|
-
"@knightcodeai/cli-linux-x64": "0.9.
|
|
41
|
-
"@knightcodeai/cli-linux-arm64": "0.9.
|
|
42
|
-
"@knightcodeai/cli-darwin-x64": "0.9.
|
|
43
|
-
"@knightcodeai/cli-darwin-arm64": "0.9.
|
|
44
|
-
"@knightcodeai/cli-win32-x64": "0.9.
|
|
40
|
+
"@knightcodeai/cli-linux-x64": "0.9.3",
|
|
41
|
+
"@knightcodeai/cli-linux-arm64": "0.9.3",
|
|
42
|
+
"@knightcodeai/cli-darwin-x64": "0.9.3",
|
|
43
|
+
"@knightcodeai/cli-darwin-arm64": "0.9.3",
|
|
44
|
+
"@knightcodeai/cli-win32-x64": "0.9.3"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@agentclientprotocol/sdk": "1.4.0",
|