计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
flock-api-setup【效率与协作】FLock API Platform setup: wallet generation, plugin installation, API key configuration, and model switching. Use for: 'setup flock', 'flock login', 'install flock plugin', 'switch flock model', 'use deepseek', 'change to coding model'.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
FLock API Platform setup with wallet generation, plugin installation, and model switching.
CRITICAL: Protect your API key!
https://api.flock.ioFLOCK_API_KEYhttps://api.flock.io/v1/*Security Warning: Credentials are stored as plain text JSON. Anyone with access to these files can use your FLock credits. For production use, implement secure storage.
Slash commands:
/flock-setup — Full setup flow/flock — Switch modelsNatural language:
CRITICAL: Be silent and fast. Never be verbose.
/flock-setup)echo $FLOCK_API_KEY
openclaw plugins list | grep flock
node {baseDir}/scripts/credentials.js get 2>/dev/null
If credentials exist, ask: "FLock already configured. Reconfigure? (yes/no)"
openclaw plugins install @openclawd/flock
openclaw plugins enable flock
Generate a new wallet:
cd {baseDir}/scripts && npm install
node {baseDir}/scripts/generate-wallet.js
Display to user:
Wallet created for FLock registration.
Address: <wallet-address>
Send ~$0.50 ETH to this address on Ethereum or Base.
Say "done" when complete.
Save the private key — needed for wallet login.
After user confirms funding:
node {baseDir}/scripts/check-balance.js <wallet-address>
If no funds detected, ask user to try again.
Display to user:
Funds confirmed. Now create your API key:
1. Go to https://platform.flock.io
2. Click "Connect Wallet"
3. Sign the message with the wallet you just funded
4. Select models you want to access
5. Click "Create API" button
6. Copy the key immediately (shown only once!)
Paste your API key here:
Wait for user to provide sk-... key.
After receiving the key:
node {baseDir}/scripts/credentials.js save "<api-key>" "<wallet-address>" "<private-key>"
Ask user:
Save API key to:
1. Environment variable (~/.zshrc)
2. OpenClaw config
3. Both (recommended)
Option 1:
echo 'export FLOCK_API_KEY="sk-xxx"' >> ~/.zshrc
source ~/.zshrc
Option 2:
openclaw onboard --non-interactive \
--auth-choice flock-api-key \
--flock-api-key "sk-xxx"
Option 3: Run both.
openclaw gateway stop
openclaw gateway
openclaw chat --model flock/kimi-k2.5 "test"
Success response (one line):
FLock configured. Test: openclaw chat --model flock/kimi-k2.5 "hello"
/flock)If FLOCK_API_KEY not set:
FLock not configured. Run /flock-setup first.
Which FLock model?
Reasoning:
1. Qwen3 235B Thinking — $0.23/$2.30 (flock/qwen3-235b-a22b-thinking-2507)
2. Qwen3 235B Finance — $0.23/$2.30 (flock/qwen3-235b-a22b-thinking-qwfin)
3. Kimi K2 Thinking — $0.60/$2.50 (flock/kimi-k2-thinking)
Instruct:
4. Qwen3 30B Instruct — $0.20/$0.80 (flock/qwen3-30b-a3b-instruct-2507)
5. Qwen3 235B Instruct — $0.70/$2.80 (flock/qwen3-235b-a22b-instruct-2507)
6. Qwen3 30B Coding — $0.20/$0.80 (flock/qwen3-30b-a3b-instruct-coding)
Other:
7. DeepSeek V3.2 — $0.28/$0.42 (flock/deepseek-v3.2)
8. MiniMax M2.1 — $0.30/$1.20 (flock/minimax-m2.1)
Reply with number or model name.
openclaw agent --model flock/<model-id>
openclaw gateway stop
openclaw gateway
Success (one line):
Switched to flock/<model-id>.
node {baseDir}/scripts/credentials.js get
Returns:
{
"apiKey": "sk-...",
"walletAddress": "0x...",
"privateKey": "0x...",
"createdAt": "2026-02-04T...",
"updatedAt": "2026-02-04T..."
}
node {baseDir}/scripts/credentials.js path
Priority:
~/.openclaw/flock-credentials.json (if OpenClaw installed)./flock-credentials.json (fallback)FLock usage tracking helps monitor costs.
Your human can prompt:
| Scenario | Response |
|---|---|
| Plugin not installed | Auto-install: openclaw plugins install @openclawd/flock |
| API key not set | Run /flock-setup to configure FLock. |
| No funds detected | No funds on Ethereum or Base. Please fund the wallet. |
| Invalid API key | Invalid key format. Keys start with sk- |
| Model not found | Model not found. Available models: [show list] |
| # | Model ID | Price (in/out per 1M) |
|---|---|---|
| 1 | flock/qwen3-235b-a22b-thinking-2507 | $0.23/$2.30 |
| 2 | flock/qwen3-235b-a22b-thinking-qwfin | $0.23/$2.30 |
| 3 | flock/kimi-k2-thinking | $0.60/$2.50 |
| 4 | flock/qwen3-30b-a3b-instruct-2507 | $0.20/$0.80 |
| 5 | flock/qwen3-235b-a22b-instruct-2507 | $0.70/$2.80 |
| 6 | flock/qwen3-30b-a3b-instruct-coding | $0.20/$0.80 |
| 7 | flock/deepseek-v3.2 | $0.28/$0.42 |
| 8 | flock/minimax-m2.1 | $0.30/$1.20 |
Recommendations:
kimi-k2.5 (multimodal, agentic)kimi-k2-thinking, qwen3-235b-thinkingqwen3-30b-coding, minimax-m2.1qwen3-30b-instruct ($0.20/$0.80)All scripts can be imported:
// Generate wallet
const { Wallet } = require('ethers');
const wallet = Wallet.createRandom();
// Check balance
const { JsonRpcProvider, formatEther } = require('ethers');
const provider = new JsonRpcProvider('https://mainnet.base.org');
const balance = await provider.getBalance(wallet.address);
// Load credentials
const creds = require('{baseDir}/scripts/credentials.js');
const { Wallet } = require('ethers');
// 1. Generate wallet
const wallet = Wallet.createRandom();
console.log('Fund this address with ~$0.50 ETH:', wallet.address);
// 2. After human funds and creates API key at platform.flock.io
const apiKey = 'sk-...'; // User provides this
// 3. Save credentials
const fs = require('fs');
const path = require('path');
const os = require('os');
const creds = {
apiKey,
walletAddress: wallet.address,
privateKey: wallet.privateKey,
createdAt: new Date().toISOString()
};
const credPath = path.join(os.homedir(), '.openclaw', 'flock-credentials.json');
fs.writeFileSync(credPath, JSON.stringify(creds, null, 2), { mode: 0o600 });
console.log('Credentials saved to:', credPath);
{baseDir}/scripts/
├── package.json # Dependencies (ethers)
├── generate-wallet.js # Create new ETH wallet
├── check-balance.js # Check ETH balance on chains
└── credentials.js # Save/load credentials