@orcapt/cli 1.0.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 +22 -0
- package/QUICK_START.md +241 -0
- package/README.md +949 -0
- package/bin/orca.js +406 -0
- package/package.json +58 -0
- package/src/commands/db.js +248 -0
- package/src/commands/fetch-doc.js +220 -0
- package/src/commands/kickstart-node.js +431 -0
- package/src/commands/kickstart-python.js +360 -0
- package/src/commands/lambda.js +736 -0
- package/src/commands/login.js +277 -0
- package/src/commands/storage.js +911 -0
- package/src/commands/ui.js +286 -0
- package/src/config.js +62 -0
- package/src/utils/docker-helper.js +357 -0
- package/src/utils/index.js +349 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Orcapt
|
|
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.
|
|
22
|
+
|
package/QUICK_START.md
ADDED
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# @orcapt/cli - Quick Start Guide
|
|
2
|
+
|
|
3
|
+
Get your Orca AI agent running in less than 2 minutes! ⚡
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Choose one of these methods:
|
|
8
|
+
|
|
9
|
+
### Method 1: Use directly with npx (No installation)
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npx @orcapt/cli kickstart python
|
|
13
|
+
# or
|
|
14
|
+
npx @orcapt/cli kickstart node
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### Method 2: Install globally
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npm install -g @orcapt/cli
|
|
21
|
+
orcapt kickstart python
|
|
22
|
+
# or
|
|
23
|
+
orcapt kickstart node
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
### Method 3: Install from source
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
cd orca-cli
|
|
30
|
+
npm install
|
|
31
|
+
npm link
|
|
32
|
+
orcapt kickstart python # or node
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Basic Usage
|
|
36
|
+
|
|
37
|
+
### 1. Start a New Agent
|
|
38
|
+
|
|
39
|
+
**Python Agent:**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
orcapt kickstart python
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
**Node.js Agent:**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
orcapt kickstart node
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
This command will:
|
|
52
|
+
|
|
53
|
+
- Check if you have Python, Git, and Node.js installed
|
|
54
|
+
- Create a `orca-kickstart` directory
|
|
55
|
+
- Clone the starter kit
|
|
56
|
+
- Set up everything automatically
|
|
57
|
+
- Start both backend and frontend servers
|
|
58
|
+
|
|
59
|
+
**Done!** Open http://localhost:3000 in your browser 🎉
|
|
60
|
+
|
|
61
|
+
### 2. Other Languages
|
|
62
|
+
|
|
63
|
+
**Node.js (Available Now):**
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
orcapt kickstart node
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
**Go (Coming Soon):**
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
orcapt kickstart go
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### 3. Custom Setup
|
|
76
|
+
|
|
77
|
+
**Python:**
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Custom directory name
|
|
81
|
+
orcapt kickstart python --directory my-ai-agent
|
|
82
|
+
|
|
83
|
+
# Custom ports
|
|
84
|
+
orcapt kickstart python --port 8080 --agent-port 8000
|
|
85
|
+
|
|
86
|
+
# Setup without auto-start
|
|
87
|
+
orcapt kickstart python --no-start
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
**Node.js:**
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Custom directory name
|
|
94
|
+
orcapt kickstart node --directory my-node-agent
|
|
95
|
+
|
|
96
|
+
# Custom ports
|
|
97
|
+
orcapt kickstart node --port 8080 --agent-port 8000
|
|
98
|
+
|
|
99
|
+
# Setup without auto-start
|
|
100
|
+
orcapt kickstart node --no-start
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### 4. Stopping Servers
|
|
104
|
+
|
|
105
|
+
Press `Ctrl+C` in the terminal to stop both servers gracefully.
|
|
106
|
+
|
|
107
|
+
## What You Get
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
orca-kickstart/
|
|
111
|
+
├── main.py # Main agent logic
|
|
112
|
+
├── requirements.txt # Python dependencies
|
|
113
|
+
├── memory/ # Conversation management
|
|
114
|
+
│ └── conversation_manager.py
|
|
115
|
+
├── agent_utils.py # Utility functions
|
|
116
|
+
├── function_handler.py # Function calling (DALL-E, etc.)
|
|
117
|
+
├── orca_env/ # Python virtual environment
|
|
118
|
+
└── uploads/ # File uploads directory
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Next Steps
|
|
122
|
+
|
|
123
|
+
1. **Configure your OpenAI API key** in the Orca UI (Admin mode → Agents)
|
|
124
|
+
2. **Customize the agent** by editing `main.py`
|
|
125
|
+
3. **Add new functions** in `function_handler.py`
|
|
126
|
+
4. **Test your agent** at http://localhost:3000
|
|
127
|
+
|
|
128
|
+
## Troubleshooting
|
|
129
|
+
|
|
130
|
+
### Prerequisites Missing?
|
|
131
|
+
|
|
132
|
+
**Python:**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# macOS
|
|
136
|
+
brew install python3
|
|
137
|
+
|
|
138
|
+
# Windows
|
|
139
|
+
# Download from https://www.python.org/downloads/
|
|
140
|
+
|
|
141
|
+
# Linux
|
|
142
|
+
sudo apt install python3 python3-pip
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Git:**
|
|
146
|
+
|
|
147
|
+
```bash
|
|
148
|
+
# macOS
|
|
149
|
+
brew install git
|
|
150
|
+
|
|
151
|
+
# Windows
|
|
152
|
+
# Download from https://git-scm.com/downloads
|
|
153
|
+
|
|
154
|
+
# Linux
|
|
155
|
+
sudo apt install git
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### Port Already in Use?
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Use different ports
|
|
162
|
+
orcapt kickstart python --port 4000 --agent-port 5000
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Directory Already Exists?
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Remove it first
|
|
169
|
+
rm -rf orca-kickstart
|
|
170
|
+
|
|
171
|
+
# Or use a different name
|
|
172
|
+
orcapt kickstart python --directory my-new-agent
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
## Manual Control
|
|
176
|
+
|
|
177
|
+
If you used `--no-start`, you can manually start the servers:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
cd orca-kickstart
|
|
181
|
+
|
|
182
|
+
# Activate virtual environment
|
|
183
|
+
source orca_env/bin/activate # macOS/Linux
|
|
184
|
+
orca_env\Scripts\activate # Windows
|
|
185
|
+
|
|
186
|
+
# Start backend
|
|
187
|
+
python main.py --dev
|
|
188
|
+
|
|
189
|
+
# In another terminal, start frontend
|
|
190
|
+
npx -y @orcapt/ui --port=3000 --agent-port=5001
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Example Session
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
$ orcapt kickstart python
|
|
197
|
+
|
|
198
|
+
============================================================
|
|
199
|
+
🚀 Orca Kickstart - Python
|
|
200
|
+
============================================================
|
|
201
|
+
|
|
202
|
+
✓ Python found: python3
|
|
203
|
+
✓ Git found
|
|
204
|
+
✓ Node.js/npm found
|
|
205
|
+
✓ npx found
|
|
206
|
+
|
|
207
|
+
► Creating directory: orca-kickstart
|
|
208
|
+
✓ Created directory: /Users/you/orca-kickstart
|
|
209
|
+
|
|
210
|
+
✓ Repository cloned successfully
|
|
211
|
+
✓ Virtual environment created
|
|
212
|
+
✓ Dependencies installed
|
|
213
|
+
|
|
214
|
+
============================================================
|
|
215
|
+
✓ Setup completed successfully!
|
|
216
|
+
============================================================
|
|
217
|
+
|
|
218
|
+
? Do you want to start the backend and frontend servers now? Yes
|
|
219
|
+
|
|
220
|
+
✓ Backend started (PID: 12345)
|
|
221
|
+
✓ Frontend started (PID: 12346)
|
|
222
|
+
|
|
223
|
+
============================================================
|
|
224
|
+
🎉 Orca is running!
|
|
225
|
+
============================================================
|
|
226
|
+
|
|
227
|
+
Frontend: http://localhost:3000
|
|
228
|
+
Backend: http://localhost:5001
|
|
229
|
+
|
|
230
|
+
⚠ Press Ctrl+C to stop both servers
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
## Need Help?
|
|
234
|
+
|
|
235
|
+
- 📚 [Full Documentation](README.md)
|
|
236
|
+
- 🐛 [Report Issues](https://github.com/Orcapt/orca-cli/issues)
|
|
237
|
+
- 💬 [GitHub Discussions](https://github.com/Orcapt/orca-cli/discussions)
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
**Ready to build amazing AI agents? Let's go! 🚀**
|