@elizaos/cli 1.0.0-alpha.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 ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Shaw Walters, aka Moon aka @lalalune
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 ADDED
@@ -0,0 +1,188 @@
1
+ # TEE CLI
2
+
3
+ The TEE CLI provides a set of commands to manage your ElizaOS TEE deployments, from local development to cloud deployment.
4
+
5
+ ## Getting Started
6
+
7
+ ### Prerequisites
8
+
9
+ - Docker installed and running
10
+ - Node.js and npm/bun installed
11
+ - A Docker Hub account for publishing images
12
+ - A Phala Cloud (https://cloud.phala.network/login) API key for cloud deployments
13
+
14
+ ## Commands
15
+
16
+ ### Building Your Image
17
+
18
+ Build your Docker image locally:
19
+
20
+ ```bash
21
+ elizaos tee phala build \
22
+ -i your-image-name \
23
+ -u your-dockerhub-username \
24
+ -f path/to/Dockerfile \
25
+ -t tag-name
26
+ ```
27
+
28
+ ### Running the TEE Simulator
29
+
30
+ Start the local TEE simulator for testing:
31
+
32
+ ```bash
33
+ elizaos tee phala simulator
34
+ ```
35
+ This will start the simulator on http://localhost:8090.
36
+
37
+ ### Local Development
38
+
39
+ You can develop your agent locally in two ways:
40
+
41
+ 1. Build the docker-compose file separately:
42
+ ```bash
43
+ elizaos tee phala build-compose \
44
+ -i your-image-name \
45
+ -u your-dockerhub-username \
46
+ -t tag-name \
47
+ -c path/to/character.json \
48
+ -e path/to/.env \
49
+ -v v2 # or v1 for legacy mode
50
+ ```
51
+
52
+ 2. Run an existing compose file:
53
+ ```bash
54
+ elizaos tee phala run-local \
55
+ -c path/to/docker-compose.yml \
56
+ -e path/to/.env
57
+ ```
58
+
59
+ This separation allows you to:
60
+ - Build compose files without running them immediately
61
+ - Version control your compose files
62
+ - Share compose files with team members
63
+ - Run the same compose file multiple times
64
+
65
+ The CLI will store generated compose files in:
66
+ ```
67
+ .tee-cloud/
68
+ └── compose-files/ # Generated docker-compose files
69
+ └── your-character-tee-compose.yaml
70
+ ```
71
+
72
+ ### Publishing Your Image
73
+
74
+ Push your built image to Docker Hub:
75
+
76
+ ```bash
77
+ elizaos tee phala publish \
78
+ -i your-image-name \
79
+ -u your-dockerhub-username \
80
+ -t tag-name
81
+ ```
82
+
83
+ ### List Available Tags
84
+
85
+ View all tags for your image on Docker Hub:
86
+
87
+ ```bash
88
+ elizaos tee phala list-tags \
89
+ -i your-image-name \
90
+ -u your-dockerhub-username
91
+ ```
92
+
93
+ ### Cloud Deployment
94
+
95
+ First, set your Phala Cloud API key:
96
+
97
+ ```bash
98
+ elizaos tee phala set-apikey your-api-key
99
+ ```
100
+
101
+ Deploy to Phala Cloud:
102
+
103
+ ```bash
104
+ elizaos tee phala deploy \
105
+ -t phala \
106
+ -m docker-compose \
107
+ -n your-deployment-name \
108
+ -c path/to/docker-compose.yml \
109
+ --env-file path/to/.env
110
+ ```
111
+
112
+ ### Managing Cloud Deployments
113
+
114
+ List your active agents (CVMs):
115
+
116
+ ```bash
117
+ elizaos tee phala list-cvms
118
+ ```
119
+
120
+ List your TEE pods:
121
+ ```bash
122
+ elizaos tee phala teepods
123
+ ```
124
+
125
+ List images in a specific TEE pod:
126
+ ```bash
127
+ elizaos tee phala images --teepod-id your-teepod-id
128
+ ```
129
+
130
+ Upgrade an existing deployment:
131
+ ```bash
132
+ elizaos tee phala upgrade \
133
+ -t phala \
134
+ -m docker-compose \
135
+ --app-id your-app-id \
136
+ -c path/to/docker-compose.yml \
137
+ --env-file path/to/.env
138
+ ```
139
+
140
+ ## Directory Structure
141
+
142
+ The CLI will create the following directory structure:
143
+ ```
144
+ .tee-cloud/
145
+ └── compose-files/ # Generated docker-compose files
146
+ ```
147
+
148
+ ## Environment Variables
149
+
150
+ Create a .env file with your required variables:
151
+
152
+ ```env
153
+ ANTHROPIC_API_KEY=your_key
154
+ TELEGRAM_BOT_TOKEN=your_token
155
+ # Add other required variables
156
+ ```
157
+
158
+ ## Tips
159
+
160
+ - Use the simulator for local testing before cloud deployment
161
+ - Always test your image locally with `run-local` before publishing
162
+ - Keep your API keys secure and never commit them to version control
163
+ - Use the `--help` flag with any command for detailed usage information
164
+
165
+ ## Troubleshooting
166
+
167
+ Common issues and solutions:
168
+
169
+ 1. **Docker Build Fails**
170
+ - Ensure Docker daemon is running
171
+ - Check Dockerfile path is correct
172
+ - Verify you have necessary permissions
173
+
174
+ 2. **Simulator Connection Issues**
175
+ - Check if port 8090 is available
176
+ - Ensure Docker has necessary permissions
177
+
178
+ 3. **Cloud Deployment Fails**
179
+ - Verify API key is set correctly
180
+ - Check if image exists on Docker Hub
181
+ - Ensure environment variables are properly set
182
+
183
+ For more help, use the `--help` flag with any command:
184
+
185
+ ```bash
186
+ elizaos tee phala --help
187
+ elizaos tee phala <command> --help
188
+ ```
@@ -0,0 +1 @@
1
+ #!/usr/bin/env node