repositories
loading repo index
repositories
loading repo index
repository
loading code, commits, and activity
public Clawd ADK gateway launch mirror
stars
latest
clone command
git clone gitlawb://did:key:z6Mkq5mY...iFZ5/my-project-publ...git clone gitlawb://did:key:z6Mkq5mY.../my-project-publ...2fa351d6docs: add automaton and perps launch sources15d ago| #1 | #!/usr/bin/env node |
| #2 | |
| #3 | const fs = require('fs'); |
| #4 | const path = require('path'); |
| #5 | |
| #6 | // Read the batch file |
| #7 | const batchFile = 'clawd-agents-batch.json'; |
| #8 | const agents = JSON.parse(fs.readFileSync(batchFile, 'utf8')); |
| #9 | |
| #10 | // Create src directory if it doesn't exist |
| #11 | const srcDir = 'src'; |
| #12 | if (!fs.existsSync(srcDir)) { |
| #13 | fs.mkdirSync(srcDir, { recursive: true }); |
| #14 | } |
| #15 | |
| #16 | // Split each agent into its own file |
| #17 | let successCount = 0; |
| #18 | let errorCount = 0; |
| #19 | |
| #20 | agents.forEach((agent) => { |
| #21 | const filename = `${agent.identifier}.json`; |
| #22 | const filepath = path.join(srcDir, filename); |
| #23 | |
| #24 | try { |
| #25 | fs.writeFileSync(filepath, JSON.stringify(agent, null, 2)); |
| #26 | console.log(`✓ Created ${filename}`); |
| #27 | successCount++; |
| #28 | } catch (error) { |
| #29 | console.error(`✗ Failed to create ${filename}:`, error.message); |
| #30 | errorCount++; |
| #31 | } |
| #32 | }); |
| #33 | |
| #34 | console.log(`\n✅ Successfully created ${successCount} agent files`); |
| #35 | if (errorCount > 0) { |
| #36 | console.log(`❌ Failed to create ${errorCount} agent files`); |
| #37 | } |
| #38 | console.log(`\nAll agents are now in the ${srcDir}/ directory`); |
| #39 | |
| #40 | |
| #41 |