@castari/cli 0.0.10 → 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 +21 -0
- package/README.md +112 -7
- package/package.json +3 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Castari
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,20 +1,125 @@
|
|
|
1
1
|
# @castari/cli
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The command line interface for building and deploying Castari agents.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
npm install -g @castari/cli
|
|
9
|
+
# or
|
|
10
|
+
bun add -g @castari/cli
|
|
9
11
|
```
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Quick Start
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
```bash
|
|
16
|
+
# Create a new agent project
|
|
17
|
+
castari init
|
|
18
|
+
|
|
19
|
+
# Run locally for development
|
|
20
|
+
castari dev
|
|
21
|
+
|
|
22
|
+
# Deploy to Castari Platform
|
|
23
|
+
castari deploy
|
|
24
|
+
|
|
25
|
+
# Start a cloud sandbox
|
|
26
|
+
castari start
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Commands
|
|
30
|
+
|
|
31
|
+
### `castari init`
|
|
32
|
+
|
|
33
|
+
Scaffolds a new Castari agent project.
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
castari init # Basic agent scaffold
|
|
37
|
+
castari init --demo # Full demo with agent + Next.js chat UI
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Creates:
|
|
41
|
+
- `package.json` - Configured with dependencies
|
|
42
|
+
- `tsconfig.json` - TypeScript configuration
|
|
43
|
+
- `src/agent.ts` - Starter agent code
|
|
44
|
+
- `.env.example` - Environment variable template
|
|
45
|
+
|
|
46
|
+
### `castari dev`
|
|
47
|
+
|
|
48
|
+
Runs the agent locally for development.
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
castari dev
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Starts a local server at `http://localhost:3000` with hot reloading.
|
|
55
|
+
|
|
56
|
+
### `castari deploy`
|
|
57
|
+
|
|
58
|
+
Uploads your agent to the Castari Platform.
|
|
14
59
|
|
|
15
60
|
```bash
|
|
16
|
-
castari
|
|
17
|
-
castari
|
|
18
|
-
castari deploy # Deploy to Platform
|
|
19
|
-
castari start # Start sandbox
|
|
61
|
+
castari deploy
|
|
62
|
+
castari deploy --name my-custom-name
|
|
20
63
|
```
|
|
64
|
+
|
|
65
|
+
**Options:**
|
|
66
|
+
- `--name <name>` - Override the snapshot name (defaults to package.json name)
|
|
67
|
+
|
|
68
|
+
**Requires:** `CASTARI_CLIENT_ID` environment variable
|
|
69
|
+
|
|
70
|
+
### `castari start`
|
|
71
|
+
|
|
72
|
+
Starts a cloud sandbox and connects to your agent.
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
castari start
|
|
76
|
+
castari start --snapshot my-agent --volume my-data
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Options:**
|
|
80
|
+
- `--snapshot <name>` - Snapshot to use (defaults to package.json name)
|
|
81
|
+
- `--volume <name>` - Volume to mount for persistent storage
|
|
82
|
+
|
|
83
|
+
**Requires:** `CASTARI_CLIENT_ID` and `ANTHROPIC_API_KEY` environment variables
|
|
84
|
+
|
|
85
|
+
Press `Ctrl+C` to gracefully shut down.
|
|
86
|
+
|
|
87
|
+
### `castari generate-client-id`
|
|
88
|
+
|
|
89
|
+
Creates a new Castari client ID and stores it in `~/.castari/client.json`.
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
castari generate-client-id
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
## Configuration
|
|
96
|
+
|
|
97
|
+
### Environment Variables
|
|
98
|
+
|
|
99
|
+
Create a `.env` file in your project:
|
|
100
|
+
|
|
101
|
+
```env
|
|
102
|
+
ANTHROPIC_API_KEY=sk-ant-...
|
|
103
|
+
CASTARI_CLIENT_ID=your-client-id
|
|
104
|
+
# CASTARI_PLATFORM_URL=https://api.castari.com
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
### package.json
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"name": "my-agent",
|
|
112
|
+
"castari": {
|
|
113
|
+
"volume": "my-volume-name"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
## Prerequisites
|
|
119
|
+
|
|
120
|
+
- [Bun](https://bun.sh) v1.0+
|
|
121
|
+
- [Anthropic](https://anthropic.com) API key
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@castari/cli",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"bin": {
|
|
6
6
|
"castari": "./dist/index.js"
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"files": [
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
|
-
"license": "
|
|
11
|
+
"license": "MIT",
|
|
12
12
|
"publishConfig": {
|
|
13
13
|
"access": "public"
|
|
14
14
|
},
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@anthropic-ai/claude-agent-sdk": "^0.1.44",
|
|
21
|
-
"@castari/sdk": "^0.0
|
|
21
|
+
"@castari/sdk": "^0.1.0",
|
|
22
22
|
"adm-zip": "^0.5.16",
|
|
23
23
|
"cac": "^6.7.14",
|
|
24
24
|
"chalk": "^5.3.0",
|