- Add full Telegram bot functionality with Z.AI API integration
- Implement 4 tools: Bash, FileEdit, WebSearch, Git
- Add 3 agents: Code Reviewer, Architect, DevOps Engineer
- Add 6 skills for common coding tasks
- Add systemd service file for 24/7 operation
- Add nginx configuration for HTTPS webhook
- Add comprehensive documentation
- Implement WebSocket server for real-time updates
- Add logging system with Winston
- Add environment validation
🤖 zCode CLI X - Agentic coder with Z.AI + Telegram integration
54 lines
1.2 KiB
JavaScript
Executable File
54 lines
1.2 KiB
JavaScript
Executable File
#!/usr/bin/env node
|
|
|
|
const { spawnSync } = require('child_process');
|
|
|
|
const commands = {
|
|
migrate: {
|
|
description:
|
|
'Run migrations to update your code using @anthropic-ai/sdk@0.41 to be compatible with @anthropic-ai/sdk@0.50',
|
|
fn: () => {
|
|
const result = spawnSync(
|
|
'npx',
|
|
[
|
|
'-y',
|
|
'https://github.com/stainless-api/migrate-ts/releases/download/0.0.2/stainless-api-migrate-0.0.2-6.tgz',
|
|
'--migrationConfig',
|
|
require.resolve('./migration-config.json'),
|
|
...process.argv.slice(3),
|
|
],
|
|
{ stdio: 'inherit' },
|
|
);
|
|
if (result.status !== 0) {
|
|
process.exit(result.status);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
|
|
function exitWithHelp() {
|
|
console.log(`Usage: anthropic-ai-sdk <subcommand>`);
|
|
console.log();
|
|
console.log('Subcommands:');
|
|
|
|
for (const [name, info] of Object.entries(commands)) {
|
|
console.log(` ${name} ${info.description}`);
|
|
}
|
|
|
|
console.log();
|
|
process.exit(1);
|
|
}
|
|
|
|
if (process.argv.length < 3) {
|
|
exitWithHelp();
|
|
}
|
|
|
|
const commandName = process.argv[2];
|
|
|
|
const command = commands[commandName];
|
|
if (!command) {
|
|
console.log(`Unknown subcommand ${commandName}.`);
|
|
exitWithHelp();
|
|
}
|
|
|
|
command.fn();
|