apero-kit-cli 2.4.8 → 2.5.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/dist/index.js +1280 -892
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/templates/discord/README.md +54 -7
- package/templates/discord/start-bot.sh +47 -0
package/package.json
CHANGED
|
@@ -8,18 +8,50 @@ This directory contains configuration for running your AI agent on Discord via [
|
|
|
8
8
|
- **Skills System** - Commands converted to skills format for better context
|
|
9
9
|
- **Train Prompt** - Add new knowledge via URLs, files, or inline content
|
|
10
10
|
- **Progressive Disclosure** - Skills load on-demand to save tokens
|
|
11
|
+
- **Gemini CLI OAuth** - Use Google OAuth via Gemini CLI (no API key needed!)
|
|
11
12
|
|
|
12
13
|
## Quick Start
|
|
13
14
|
|
|
14
|
-
### 1. Install
|
|
15
|
+
### 1. Install Required CLIs
|
|
15
16
|
|
|
16
17
|
```bash
|
|
18
|
+
# Install OpenClaw CLI
|
|
17
19
|
npm install -g openclaw
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
|
|
21
|
+
# Install Gemini CLI (for OAuth authentication)
|
|
22
|
+
npm install -g @anthropic-ai/gemini-cli
|
|
20
23
|
```
|
|
21
24
|
|
|
22
|
-
### 2.
|
|
25
|
+
### 2. Setup AI Model Authentication (Choose One)
|
|
26
|
+
|
|
27
|
+
#### Option A: Gemini CLI OAuth (Recommended)
|
|
28
|
+
|
|
29
|
+
No API key needed! Uses Google OAuth via Gemini CLI plugin.
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
# Login to Gemini CLI
|
|
33
|
+
gemini auth login
|
|
34
|
+
|
|
35
|
+
# Enable Gemini CLI auth plugin
|
|
36
|
+
openclaw plugins enable google-gemini-cli-auth
|
|
37
|
+
|
|
38
|
+
# Set as default model provider
|
|
39
|
+
openclaw models auth login --provider google-gemini-cli --set-default
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**Or use the start script:**
|
|
43
|
+
```bash
|
|
44
|
+
./start-bot.sh
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
#### Option B: API Key
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
# Set your API key
|
|
51
|
+
openclaw config set models.anthropic.apiKey '"sk-your-api-key"' --json
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### 3. Create Discord Bot
|
|
23
55
|
|
|
24
56
|
1. Go to [Discord Developer Portal](https://discord.com/developers/applications)
|
|
25
57
|
2. Click "New Application" and name your bot
|
|
@@ -29,7 +61,7 @@ npx openclaw
|
|
|
29
61
|
- **Server Members Intent** (recommended)
|
|
30
62
|
5. Click "Reset Token" to get your bot token
|
|
31
63
|
|
|
32
|
-
###
|
|
64
|
+
### 4. Configure Bot Token
|
|
33
65
|
|
|
34
66
|
**Option A: Environment Variable (Recommended)**
|
|
35
67
|
```bash
|
|
@@ -41,15 +73,19 @@ export DISCORD_BOT_TOKEN="your-bot-token-here"
|
|
|
41
73
|
openclaw config set channels.discord.token '"your-bot-token-here"' --json
|
|
42
74
|
```
|
|
43
75
|
|
|
44
|
-
###
|
|
76
|
+
### 5. Enable Discord Channel
|
|
45
77
|
|
|
46
78
|
```bash
|
|
47
79
|
openclaw config set channels.discord.enabled true --json
|
|
48
80
|
```
|
|
49
81
|
|
|
50
|
-
###
|
|
82
|
+
### 6. Start Gateway
|
|
51
83
|
|
|
52
84
|
```bash
|
|
85
|
+
# Using start script (handles Gemini CLI auth automatically)
|
|
86
|
+
./start-bot.sh
|
|
87
|
+
|
|
88
|
+
# Or directly
|
|
53
89
|
openclaw gateway
|
|
54
90
|
```
|
|
55
91
|
|
|
@@ -219,6 +255,17 @@ Our deployment process:
|
|
|
219
255
|
- Verify SKILL.md files have correct frontmatter
|
|
220
256
|
- Run `openclaw skills list` to see active skills
|
|
221
257
|
|
|
258
|
+
**Gemini CLI OAuth issues?**
|
|
259
|
+
- Re-login: `gemini auth login`
|
|
260
|
+
- Check plugin status: `openclaw plugins list`
|
|
261
|
+
- Re-enable plugin: `openclaw plugins enable google-gemini-cli-auth`
|
|
262
|
+
- Check auth status: `openclaw models auth status --provider google-gemini-cli`
|
|
263
|
+
- Set as default again: `openclaw models auth login --provider google-gemini-cli --set-default`
|
|
264
|
+
|
|
265
|
+
**Token expired?**
|
|
266
|
+
- Gemini CLI OAuth tokens auto-refresh
|
|
267
|
+
- If issues persist, run `gemini auth login` again
|
|
268
|
+
|
|
222
269
|
## Resources
|
|
223
270
|
|
|
224
271
|
- [OpenClaw Documentation](https://docs.openclaw.ai)
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# Start OpenClaw gateway with Gemini CLI OAuth plugin
|
|
3
|
+
# Uses google-gemini-cli-auth plugin for authentication
|
|
4
|
+
|
|
5
|
+
set -e
|
|
6
|
+
|
|
7
|
+
# Check if openclaw is installed
|
|
8
|
+
if ! command -v openclaw &> /dev/null; then
|
|
9
|
+
echo "❌ OpenClaw CLI not found. Install: npm install -g openclaw"
|
|
10
|
+
exit 1
|
|
11
|
+
fi
|
|
12
|
+
|
|
13
|
+
# Check if Gemini CLI is installed
|
|
14
|
+
if ! command -v gemini &> /dev/null; then
|
|
15
|
+
echo "❌ Gemini CLI not found. Install: npm install -g @anthropic-ai/gemini-cli"
|
|
16
|
+
echo " Then login: gemini auth login"
|
|
17
|
+
exit 1
|
|
18
|
+
fi
|
|
19
|
+
|
|
20
|
+
# Check Gemini CLI auth status
|
|
21
|
+
GEMINI_CREDS="$HOME/.gemini/oauth_creds.json"
|
|
22
|
+
if [ ! -f "$GEMINI_CREDS" ]; then
|
|
23
|
+
echo "⚠️ Gemini CLI not logged in. Running: gemini auth login"
|
|
24
|
+
gemini auth login
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
# Enable Gemini CLI auth plugin if not already enabled
|
|
28
|
+
echo "🔧 Ensuring Gemini CLI auth plugin is enabled..."
|
|
29
|
+
openclaw plugins enable google-gemini-cli-auth 2>/dev/null || true
|
|
30
|
+
|
|
31
|
+
# Check if already authenticated with Gemini CLI provider
|
|
32
|
+
AUTH_STATUS=$(openclaw models auth status --provider google-gemini-cli 2>/dev/null || echo "not-configured")
|
|
33
|
+
|
|
34
|
+
if [[ "$AUTH_STATUS" == *"not-configured"* ]] || [[ "$AUTH_STATUS" == *"expired"* ]]; then
|
|
35
|
+
echo "🔑 Setting up Gemini CLI OAuth as default provider..."
|
|
36
|
+
openclaw models auth login --provider google-gemini-cli --set-default
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
echo "✅ Using Gemini CLI OAuth (via plugin)"
|
|
40
|
+
echo "🦞 Starting OpenClaw gateway..."
|
|
41
|
+
|
|
42
|
+
# Kill existing gateway
|
|
43
|
+
pkill -f "openclaw-gateway" 2>/dev/null || true
|
|
44
|
+
sleep 2
|
|
45
|
+
|
|
46
|
+
# Start gateway
|
|
47
|
+
openclaw gateway "$@"
|