Files
davila7__claude-code-templates/cli-tool/bin/create-claude-config.js
Daniel Avila 7f890b1b3b feat: add Loops component type with referenced components (#643)
* feat: add Loops component type with referenced components

Introduce "loops" as a new first-class component type — autonomous
agentic workflows (goal + interval + stop condition) inspired by Loop
Engineering and the Forward Future Loop Library. A loop references other
components (agents, skills, hooks, commands) and the dashboard renders
those references as clickable cards on the loop detail page.

- Add 10 starter loops under cli-tool/components/loops/
  (engineering, evaluation, operations)
- Catalog generator: scan loops + write per-component content files
- Dashboard: new type in icons/types/data, /loops page, and a
  "Referenced Components" section on the loop detail page
- CLI: --loop flag installs the loop to .claude/loops/ and
  auto-installs its referenced components
- Docs: CLAUDE.md and cli-tool rule updated

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T9ynMiCHt8JwdMd8KjCkES

* feat: add 8 more loops (goal/loop/schedule patterns)

Expand the loops catalog to 18, drawing ideas from community "Loop
Engineering" patterns. Adds loops across the three trigger verbs
(/goal, /loop, /schedule) and emphasizes the verifier-in-the-loop and
budget / anti-spin guardrails:

- engineering/five-minute-maintainer-loop
- engineering/build-test-fix-loop
- engineering/anti-spin-build-loop
- engineering/completion-contract-loop (goal)
- engineering/goal-refiner-loop (goal)
- engineering/adversarial-review-loop (cross-model)
- operations/overnight-pr-routine-loop (schedule)
- evaluation/human-approval-loop (human-in-the-loop)

All referenced components verified to exist; catalog regenerated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01T9ynMiCHt8JwdMd8KjCkES

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-06-21 20:19:16 -04:00

70 lines
4.6 KiB
JavaScript
Executable File

#!/usr/bin/env node
const { program } = require('commander');
const chalk = require('chalk');
const { createClaudeConfig } = require('../src/index');
const { showBanner } = require('../src/tui');
const pkg = require('../package.json');
program
.name('create-claude-config')
.description('Setup Claude Code configurations and create global AI agents powered by Claude Code SDK')
.version(require('../package.json').version)
.option('-l, --language <language>', 'specify programming language (deprecated, use --template)')
.option('-f, --framework <framework>', 'specify framework (deprecated, use --template)')
.option('-t, --template <template>', 'specify template (e.g., common, javascript-typescript, python, ruby)')
.option('-d, --directory <directory>', 'target directory (default: current directory)')
.option('-y, --yes', 'skip prompts and use defaults')
.option('--dry-run', 'show what would be copied without actually copying')
.option('--command-stats, --commands-stats', 'analyze existing Claude Code commands and offer optimization')
.option('--hook-stats, --hooks-stats', 'analyze existing automation hooks and offer optimization')
.option('--mcp-stats, --mcps-stats', 'analyze existing MCP server configurations and offer optimization')
.option('--analytics', 'launch real-time Claude Code analytics dashboard')
.option('--chats', 'launch mobile-first chats interface (AI-optimized for mobile devices)')
.option('--agents', 'launch Claude Code agents dashboard (opens directly to conversations)')
.option('--chats-mobile', 'launch mobile-first chats interface (AI-optimized for mobile devices)')
.option('--plugins', 'launch Plugin Dashboard to view marketplaces, installed plugins, and permissions')
.option('--skills-manager', 'launch Skills Dashboard to view and explore installed Claude Code Skills')
.option('--teams', 'launch Agent Teams Dashboard to review multi-agent collaboration sessions')
.option('--2025', 'launch 2025 Year in Review dashboard (showcase your Claude Code usage statistics)')
.option('--tunnel', 'enable Cloudflare Tunnel for remote access (use with --analytics or --chats)')
.option('--verbose', 'enable verbose logging for debugging and development')
.option('--health-check, --health, --check, --verify', 'run comprehensive health check to verify Claude Code setup')
.option('--agent <agent>', 'install specific agent component (supports comma-separated values)')
.option('--command <command>', 'install specific command component (supports comma-separated values)')
.option('--mcp <mcp>', 'install specific MCP component (supports comma-separated values)')
.option('--setting <setting>', 'install specific setting component (supports comma-separated values)')
.option('--hook <hook>', 'install specific hook component (supports comma-separated values)')
.option('--skill <skill>', 'install specific skill component (supports comma-separated values)')
.option('--loop <loop>', 'install specific loop component and its referenced components (supports comma-separated values)')
.option('--workflow <workflow>', 'install workflow from hash (#hash) OR workflow YAML (base64 encoded) when used with --agent/--command/--mcp')
.option('--prompt <prompt>', 'execute the provided prompt in Claude Code after installation or in sandbox')
.option('--create-agent <agent>', 'create a global agent accessible from anywhere (e.g., customer-support)')
.option('--list-agents', 'list all installed global agents')
.option('--remove-agent <agent>', 'remove a global agent')
.option('--update-agent <agent>', 'update a global agent to the latest version')
.option('--studio', 'launch Claude Code Studio interface for local and cloud execution')
.option('--sandbox <provider>', 'execute Claude Code in isolated sandbox environment (e.g., e2b)')
.option('--e2b-api-key <key>', 'E2B API key for sandbox execution (alternative to environment variable)')
.option('--anthropic-api-key <key>', 'Anthropic API key for Claude Code (alternative to environment variable)')
.option('--clone-session <url>', 'download and import a shared Claude Code session from URL')
.action(async (options) => {
try {
// Only show banner for non-agent-list commands
const isQuietCommand = options.listAgents ||
options.removeAgent ||
options.updateAgent;
if (!isQuietCommand) {
showBanner(pkg.version);
}
await createClaudeConfig(options);
} catch (error) {
console.error(chalk.red('Error:'), error.message);
process.exit(1);
}
});
program.parse(process.argv);