You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: clients/typescript/README.md
+40-10Lines changed: 40 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,54 @@
1
1
# Kit TypeScript Client
2
2
3
-
TypeScript/Node.js wrapper for the Cased Kit CLI. This library provides a type-safe interface to Kit's code analysis capabilities.
3
+
TypeScript/Node.js wrapper for the Cased **Kit** CLI. This library lets you call Kit’s powerful code-analysis features from JavaScript or TypeScript with first-class typings.
4
4
5
5
## Installation
6
6
7
7
```bash
8
-
npm install @cased/kit
8
+
# 1) Install the TypeScript wrapper
9
+
npm install @runcased/kit # or pnpm add / yarn add
10
+
11
+
# 2) Install the Kit CLI itself (Python)
12
+
uv pip install cased-kit # or pipx install cased-kit; or any other python way
13
+
```
14
+
15
+
> The TS wrapper shells out to the `kit` executable, so the Python package must be on **$PATH** in the same environment where Node runs (local dev, Docker image, CI runner, etc.).
16
+
17
+
**Requirements**
18
+
19
+
- Node 16 or newer
20
+
- Python 3.10+ with `cased-kit` installed
21
+
22
+
## Quick Start
23
+
24
+
```typescript
25
+
import { Kit } from"@runcased/kit";
26
+
27
+
const kit =newKit(); // uses `kit` from $PATH
28
+
const repo =kit.repository("./"); // current repo
29
+
30
+
(async () => {
31
+
const info =awaitrepo.gitInfo();
32
+
console.log(info);
33
+
34
+
const files =awaitrepo.fileTree(); // structured file list
35
+
console.log(`Repo has ${files.length} entries`);
36
+
})();
9
37
```
10
38
11
-
**Prerequisites:**
39
+
## Wrapper Highlights
12
40
13
-
- Node.js 16+
14
-
- Kit CLI installed (`pip install cased-kit`)
41
+
-**Type-safe** – full `.d.ts` bundled, generics for options & results.
42
+
-**Same API shape as Python** – methods map 1-to-1 to CLI commands.
43
+
-**Repository helper** – `kit.repository(path)` returns convenience wrapper so you don’t repeat the path/ref.
44
+
-**No native deps** – only uses Node’s `child_process` to invoke CLI.
15
45
16
-
## Usage
46
+
The remainder of this README contains advanced usage & API reference.
17
47
18
48
### Basic Setup
19
49
20
50
```typescript
21
-
import { Kit } from"@cased/kit";
51
+
import { Kit } from"@runcased/kit";
22
52
23
53
const kit =newKit({
24
54
kitPath: "kit", // Path to kit executable (optional)
0 commit comments