diff --git a/package.json b/package.json index 440edcf..ba410f2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@vibe-kit/grok-cli", - "version": "0.0.25", + "version": "0.0.26", "description": "An open-source AI agent that brings the power of Grok directly into your terminal.", "main": "dist/index.js", "bin": { diff --git a/src/index.ts b/src/index.ts index 78973ef..277537c 100755 --- a/src/index.ts +++ b/src/index.ts @@ -313,7 +313,7 @@ program "A conversational AI CLI tool powered by Grok with text editor capabilities" ) .version("1.0.1") - .argument("[message]", "Initial message to send to Grok") + .argument("[message...]", "Initial message to send to Grok") .option("-d, --directory ", "set working directory", process.cwd()) .option("-k, --api-key ", "Grok API key (or set GROK_API_KEY env var)") .option( @@ -383,9 +383,12 @@ program ensureUserSettingsDirectory(); - render( - React.createElement(ChatInterface, { agent, initialMessage: message }) - ); + // Support variadic positional arguments for multi-word initial message + const initialMessage = Array.isArray(message) + ? message.join(" ") + : message; + + render(React.createElement(ChatInterface, { agent, initialMessage })); } catch (error: any) { console.error("❌ Error initializing Grok CLI:", error.message); process.exit(1);