@letta-ai/letta-code 0.1.2 → 0.1.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 +29 -27
- package/bin/letta +0 -0
- package/package.json +4 -5
- package/scripts/postinstall-patches.js +1 -4
package/README.md
CHANGED
|
@@ -11,34 +11,20 @@ Letta Code is a command-line harness around the stateful Letta [Agents API](http
|
|
|
11
11
|
|
|
12
12
|
## Quickstart
|
|
13
13
|
|
|
14
|
-
Get
|
|
14
|
+
> Get a Letta API key at: [https://app.letta.com](https://app.letta.com/)
|
|
15
15
|
|
|
16
|
-
Install the package via npm:
|
|
16
|
+
Install the package via [npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm):
|
|
17
17
|
```bash
|
|
18
|
-
npm install @letta-ai/letta-code
|
|
18
|
+
npm install -g @letta-ai/letta-code
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
```
|
|
21
|
+
Make sure you have your Letta API key set in your environment:
|
|
22
|
+
```bash
|
|
23
23
|
export LETTA_API_KEY=...
|
|
24
|
-
letta
|
|
25
24
|
```
|
|
26
25
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
First, install Bun if you don't have it yet: [https://bun.com/docs/installation](https://bun.com/docs/installation)
|
|
30
|
-
|
|
31
|
-
```bash
|
|
32
|
-
# install deps
|
|
33
|
-
bun install
|
|
34
|
-
|
|
35
|
-
# run Letta Code
|
|
36
|
-
bun run src/index.ts
|
|
37
|
-
|
|
38
|
-
# alternatively, install globally to `letta` executable
|
|
39
|
-
bun add --global .
|
|
40
|
-
|
|
41
|
-
# then, you can run w/ `letta`
|
|
26
|
+
Then run `letta` to start Letta Code (see various command-line options below):
|
|
27
|
+
```
|
|
42
28
|
letta
|
|
43
29
|
```
|
|
44
30
|
|
|
@@ -106,16 +92,32 @@ Permissions are also configured in `.letta/settings.json`:
|
|
|
106
92
|
}
|
|
107
93
|
```
|
|
108
94
|
|
|
109
|
-
|
|
95
|
+
## Installing from source
|
|
96
|
+
|
|
97
|
+
First, install Bun if you don't have it yet: [https://bun.com/docs/installation](https://bun.com/docs/installation)
|
|
98
|
+
|
|
99
|
+
### Run directly from source (dev workflow)
|
|
100
|
+
```bash
|
|
101
|
+
# install deps
|
|
102
|
+
bun install
|
|
103
|
+
|
|
104
|
+
# run the CLI from TypeScript sources (pick up changes immediately)
|
|
105
|
+
bun run dev:ui
|
|
106
|
+
bun run dev:ui -- -p "Hello world" # example with args
|
|
107
|
+
```
|
|
110
108
|
|
|
111
|
-
|
|
109
|
+
### Build + link the standalone binary
|
|
112
110
|
```bash
|
|
113
|
-
# build
|
|
114
|
-
bun build
|
|
111
|
+
# build bin/letta (includes prompts + schemas)
|
|
112
|
+
bun run build
|
|
113
|
+
|
|
114
|
+
# expose the binary globally (adjust to your preference)
|
|
115
|
+
bun link --global # or: bun add --global .
|
|
115
116
|
|
|
116
|
-
#
|
|
117
|
-
|
|
117
|
+
# now you can run the compiled CLI
|
|
118
|
+
letta
|
|
118
119
|
```
|
|
120
|
+
> Whenever you change source files, rerun `bun run build` before using the linked `letta` binary so it picks up your edits.
|
|
119
121
|
|
|
120
122
|
---
|
|
121
123
|
|
package/bin/letta
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@letta-ai/letta-code",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Letta Code is a CLI tool for interacting with stateful Letta agents from the terminal.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
"access": "public"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
|
-
"@biomejs/biome": "2.2.5",
|
|
26
25
|
"@types/bun": "latest",
|
|
27
26
|
"@types/diff": "^8.0.0",
|
|
28
27
|
"typescript": "^5.0.0",
|
|
@@ -39,8 +38,8 @@
|
|
|
39
38
|
"react": "18.2.0"
|
|
40
39
|
},
|
|
41
40
|
"scripts": {
|
|
42
|
-
"lint": "biome check src",
|
|
43
|
-
"fix": "biome check --write src",
|
|
41
|
+
"lint": "bunx --bun @biomejs/biome@2.2.5 check src",
|
|
42
|
+
"fix": "bunx --bun @biomejs/biome@2.2.5 check --write src",
|
|
44
43
|
"dev:ui": "bun --loader:.md=text --loader:.mdx=text --loader:.txt=text run src/index.ts",
|
|
45
44
|
"build": "bun build src/index.ts --compile --loader:.md=text --loader:.mdx=text --loader:.txt=text --outfile bin/letta",
|
|
46
45
|
"prepublishOnly": "bun run build",
|
|
@@ -48,7 +47,7 @@
|
|
|
48
47
|
},
|
|
49
48
|
"lint-staged": {
|
|
50
49
|
"*.{ts,tsx,js,jsx,json,md}": [
|
|
51
|
-
"biome check --write"
|
|
50
|
+
"bunx --bun @biomejs/biome@2.2.5 check --write"
|
|
52
51
|
]
|
|
53
52
|
}
|
|
54
53
|
}
|
|
@@ -92,10 +92,7 @@ await copyToResolved(
|
|
|
92
92
|
"vendor/ink/build/hooks/use-input.js",
|
|
93
93
|
"ink/build/hooks/use-input.js",
|
|
94
94
|
);
|
|
95
|
-
await copyToResolved(
|
|
96
|
-
"vendor/ink/build/devtools.js",
|
|
97
|
-
"ink/build/devtools.js",
|
|
98
|
-
);
|
|
95
|
+
await copyToResolved("vendor/ink/build/devtools.js", "ink/build/devtools.js");
|
|
99
96
|
|
|
100
97
|
// ink-text-input (optional vendor with externalCursorOffset support)
|
|
101
98
|
await copyToResolved(
|