From 4daeee3397e807f603fd3706faa648d98d2cf062 Mon Sep 17 00:00:00 2001 From: joelteply Date: Wed, 9 Apr 2025 00:34:49 -0500 Subject: [PATCH 1/4] Implement context-aware CLI entry point MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This change completely reimagines the Continuum CLI experience by creating a single-command entry point that intelligently detects context and performs the appropriate action: - Detects and analyzes the current environment (git repo, config files, etc.) - Automatically initializes when no configuration exists - Suggests next steps based on what's missing - Provides direct integration with AI assistants via --ask option - Maintains backward compatibility with command-style usage - Creates a frictionless, intent-based developer experience šŸ¤– Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- packages/cli/bin/continuum.js | 221 +++++---------- packages/cli/src/ask.js | 170 ++++++++++++ packages/cli/src/context.js | 507 ++++++++++++++++++++++++++++++++++ 3 files changed, 743 insertions(+), 155 deletions(-) create mode 100644 packages/cli/src/ask.js create mode 100644 packages/cli/src/context.js diff --git a/packages/cli/bin/continuum.js b/packages/cli/bin/continuum.js index 0e6800d769..5a9a3201d2 100755 --- a/packages/cli/bin/continuum.js +++ b/packages/cli/bin/continuum.js @@ -1,13 +1,15 @@ #!/usr/bin/env node -// Simple CLI implementation for Continuum -// Beta version - full features coming soon +/** + * Continuum - A contextually aware AI configuration protocol + * + * This CLI is designed to be simple and automatically do the right thing + * based on the context of your project, user profile, and organization. + */ import { Command } from 'commander'; import chalk from 'chalk'; -import fs from 'fs'; -import path from 'path'; -// No need for path and fileURLToPath in this simplified version +import { analyzeContext, executeAction } from '../src/context.js'; // Check Node.js version const currentNodeVersion = process.versions.node; @@ -25,171 +27,80 @@ if (major < 18) { process.exit(1); } -// Setup CLI +// Setup CLI with a simpler interface const program = new Command(); program .name('continuum') .description('Continuum - Designed by AI and humans for AI and humans') .version('0.1.0') + .option('-a, --assistant ', 'Target assistant to configure (claude, gpt)') + .option('-t, --template