Files
SuperCharged-Claude-Code-Up…/dexto/packages/cli/scripts/sync-cli-readme.ts
admin b52318eeae feat: Add intelligent auto-router and enhanced integrations
- Add intelligent-router.sh hook for automatic agent routing
- Add AUTO-TRIGGER-SUMMARY.md documentation
- Add FINAL-INTEGRATION-SUMMARY.md documentation
- Complete Prometheus integration (6 commands + 4 tools)
- Complete Dexto integration (12 commands + 5 tools)
- Enhanced Ralph with access to all agents
- Fix /clawd command (removed disable-model-invocation)
- Update hooks.json to v5 with intelligent routing
- 291 total skills now available
- All 21 commands with automatic routing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-28 00:27:56 +04:00

61 lines
2.1 KiB
TypeScript

import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
// Resolve repo root from CLI scripts directory: packages/cli/scripts -> repo root
const repoRoot = path.resolve(__dirname, '../../..');
const srcPath = path.join(repoRoot, 'README.md');
// Destination is the CLI package README next to this scripts directory
const cliDir = path.resolve(__dirname, '..');
const destPath = path.join(cliDir, 'README.md');
const GH_BASE = 'https://github.com/truffle-ai/dexto';
const GH_BLOB_HEAD = `${GH_BASE}/blob/HEAD`;
const GH_TREE_HEAD = `${GH_BASE}/tree/HEAD`;
function transform(content: string): string {
// Change top-level H1
content = content.replace(/^#\s+[^\n]+/, '# Dexto CLI');
// Fix relative links to repo paths so they render on npm
content = content
// agents directory
.replace(/\]\(agents\/\)/g, `](${GH_TREE_HEAD}/agents/)`)
.replace(/\]\(agents\)/g, `](${GH_TREE_HEAD}/agents)`) // fallback
// discord/telegram setup docs
.replace(
/\]\(packages\/cli\/src\/discord\/README\.md\)/g,
`](${GH_BLOB_HEAD}/packages/cli/src/discord/README.md)`
)
.replace(
/\]\(packages\/cli\/src\/telegram\/README\.md\)/g,
`](${GH_BLOB_HEAD}/packages/cli/src/telegram/README.md)`
)
// contributor guide & license
.replace(/\]\(\.\/CONTRIBUTING\.md\)/g, `](${GH_BLOB_HEAD}/CONTRIBUTING.md)`)
.replace(/\]\(LICENSE\)/g, `](${GH_BLOB_HEAD}/LICENSE)`);
// Fix relative image to assets folder
content = content.replace(
/<img\s+src="assets\/email_slack_demo\.gif"/g,
`<img src="${GH_BLOB_HEAD}/assets/email_slack_demo.gif?raw=1"`
);
return content;
}
function main(): void {
const raw = fs.readFileSync(srcPath, 'utf8');
const out = transform(raw);
fs.writeFileSync(destPath, out);
console.log(
`Synced CLI README from ${path.relative(repoRoot, srcPath)} -> ${path.relative(repoRoot, destPath)}`
);
}
main();