@xagent/x-cli 1.1.76 → 1.1.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  <!-- Test comment for PR creation -->
2
2
 
3
- ## 1.1.76 – Logo Assets & NPM Publication Complete
3
+ ## 1.1.77 – Logo Assets & NPM Publication Complete
4
4
 
5
5
  ✅ **Live on NPM**: [@xagent/x-cli](https://www.npmjs.com/package/@xagent/x-cli) - Fully published and ready for global installation
6
6
 
@@ -21,7 +21,7 @@ This release includes corrected logo assets and complete automated publishing pi
21
21
  [![License](https://img.shields.io/github/license/x-cli-team/x-cli?style=for-the-badge&color=green)](https://github.com/x-cli-team/x-cli/blob/main/LICENSE)
22
22
  [![Discord](https://img.shields.io/badge/Discord-xAI_Community-5865F2?style=for-the-badge&logo=discord)](https://discord.com/channels/1315720379607679066/1315822328139223064)
23
23
 
24
- A conversational AI CLI tool powered by Grok with **Claude Code-level intelligence** and advanced tool capabilities.
24
+ A conversational AI CLI tool powered by x.ai with **Claude Code-level intelligence** and advanced tool capabilities.
25
25
 
26
26
  <div align="center">
27
27
  <img src="docs/assets/logos/x-cli-logo-large.svg" alt="X CLI Logo" width="120" />
@@ -41,7 +41,7 @@ A conversational AI CLI tool powered by Grok with **Claude Code-level intelligen
41
41
 
42
42
  - **🎯 Shift+Tab Twice Activation**: Exact Claude Code Plan Mode with read-only exploration
43
43
  - **🔍 Comprehensive Codebase Analysis**: Project structure, dependencies, complexity metrics, and architecture patterns
44
- - **🧠 AI-Powered Implementation Planning**: Strategic plan generation using Grok models with risk assessment
44
+ - **🧠 AI-Powered Implementation Planning**: Strategic plan generation using x.ai models with risk assessment
45
45
  - **🛡️ Read-Only Tool Execution**: Safe exploration with destructive operation blocking and simulation
46
46
  - **📊 Progress Visualization**: Real-time exploration and planning progress with phase-specific guidance
47
47
  - **📋 User Approval Workflow**: Complete plan review and confirmation before execution
@@ -103,7 +103,7 @@ A conversational AI CLI tool powered by Grok with **Claude Code-level intelligen
103
103
 
104
104
  - **🎯 Shift+Tab Twice**: Activate read-only exploration mode (exact Claude Code parity)
105
105
  - **🔍 Codebase Analysis**: Comprehensive project structure, dependencies, and complexity analysis
106
- - **🧠 AI-Powered Planning**: Strategic implementation plans generated by Grok models
106
+ - **🧠 AI-Powered Planning**: Strategic implementation plans generated by x.ai models
107
107
  - **🛡️ Read-Only Safety**: Zero file modifications during exploration with tool simulation
108
108
  - **📊 Progress Tracking**: Real-time exploration progress with phase-specific guidance
109
109
  - **📋 Plan Approval**: Review and approve implementation plans before execution
@@ -128,7 +128,7 @@ A conversational AI CLI tool powered by Grok with **Claude Code-level intelligen
128
128
 
129
129
  ### 🤖 **Core AI Capabilities**
130
130
 
131
- - **💬 Conversational Interface**: Natural language powered by Grok models
131
+ - **💬 Conversational Interface**: Natural language powered by x.ai models
132
132
  - **🔧 Intelligent Tool Selection**: AI automatically chooses the right tools for your requests
133
133
  - **⚡ Bash Integration**: Execute shell commands through natural conversation
134
134
  - **🔌 MCP Extension**: Extend capabilities with Model Context Protocol servers (Linear, GitHub, etc.)
@@ -277,7 +277,7 @@ npm link
277
277
 
278
278
  ## Setup
279
279
 
280
- 1. Get your Grok API key from [X.AI](https://x.ai)
280
+ 1. Get your x.ai API key from [X.AI](https://x.ai)
281
281
 
282
282
  2. Set up your API key (choose one method):
283
283
 
@@ -328,7 +328,7 @@ MORPH_API_KEY=your_morph_api_key_here
328
328
 
329
329
  ### Custom Base URL (Optional)
330
330
 
331
- By default, the CLI uses `https://api.x.ai/v1` as the Grok API endpoint. You can configure a custom endpoint if needed (choose one method):
331
+ By default, the CLI uses `https://api.x.ai/v1` as the x.ai API endpoint. You can configure a custom endpoint if needed (choose one method):
332
332
 
333
333
  **Method 1: Environment Variable**
334
334
 
@@ -360,7 +360,7 @@ X CLI uses two types of configuration files to manage settings:
360
360
 
361
361
  This file stores **global settings** that apply across all projects. These settings rarely change and include:
362
362
 
363
- - **API Key**: Your Grok API key
363
+ - **API Key**: Your x.ai API key
364
364
  - **Base URL**: Custom API endpoint (if needed)
365
365
  - **Default Model**: Your preferred model (e.g., `grok-code-fast-1`)
366
366
  - **Available Models**: List of models you can use
@@ -420,7 +420,7 @@ This means you can have different models for different projects while maintainin
420
420
 
421
421
  **Popular Providers**:
422
422
 
423
- - **X.AI (Grok)**: `https://api.x.ai/v1` (default)
423
+ - **X.AI**: `https://api.x.ai/v1` (default)
424
424
  - **OpenAI**: `https://api.openai.com/v1`
425
425
  - **OpenRouter**: `https://openrouter.ai/api/v1`
426
426
  - **Groq**: `https://api.groq.com/openai/v1`
@@ -444,7 +444,7 @@ This means you can have different models for different projects while maintainin
444
444
 
445
445
  ### 🎯 **Best Feature of X CLI - AI Context Optimization**
446
446
 
447
- The **`.agent` folder** is the most powerful feature of X CLI, enabling **self-documenting AI workflows** that automatically provide context to AI agents. This revolutionary approach ensures every AI interaction is informed by comprehensive project documentation, making conversations with Grok significantly more productive and accurate.
447
+ The **`.agent` folder** is the most powerful feature of X CLI, enabling **self-documenting AI workflows** that automatically provide context to AI agents. This revolutionary approach ensures every AI interaction is informed by comprehensive project documentation, making conversations with x.ai models significantly more productive and accurate.
448
448
 
449
449
  ### 🏗️ **How It Works**
450
450
 
@@ -646,7 +646,7 @@ You can specify which AI model to use with the `--model` parameter or `GROK_MODE
646
646
  **Method 1: Command Line Flag**
647
647
 
648
648
  ```bash
649
- # Use Grok models
649
+ # Use x.ai models
650
650
  xcli --model grok-code-fast-1
651
651
  xcli --model grok-4-latest
652
652
  xcli --model grok-3-latest
@@ -684,8 +684,8 @@ xcli [options]
684
684
  Options:
685
685
  -V, --version output the version number
686
686
  -d, --directory <dir> set working directory
687
- -k, --api-key <key> Grok API key (or set X_API_KEY env var)
688
- -u, --base-url <url> Grok API base URL (or set GROK_BASE_URL env var)
687
+ -k, --api-key <key> x.ai API key (or set X_API_KEY env var)
688
+ -u, --base-url <url> x.ai API base URL (or set GROK_BASE_URL env var)
689
689
  -m, --model <model> AI model to use (e.g., grok-code-fast-1, grok-4-latest) (or set GROK_MODEL env var)
690
690
  -p, --prompt <prompt> process a single prompt and exit (headless mode)
691
691
  --max-tool-rounds <rounds> maximum number of tool execution rounds (default: 400)
@@ -712,7 +712,7 @@ Always add JSDoc comments for public functions and interfaces.
712
712
  Follow the existing code style and patterns in this project.
713
713
  ```
714
714
 
715
- Grok will automatically load and follow these instructions when working in your project directory. The custom instructions are added to Grok's system prompt and take priority over default behavior.
715
+ X CLI will automatically load and follow these instructions when working in your project directory. The custom instructions are added to the AI model's system prompt and take priority over default behavior.
716
716
 
717
717
  ## Morph Fast Apply (Optional)
718
718
 
package/dist/index.js CHANGED
@@ -15797,7 +15797,7 @@ ${guardrail.createdFrom ? `- Created from incident: ${guardrail.createdFrom}` :
15797
15797
  var package_default = {
15798
15798
  type: "module",
15799
15799
  name: "@xagent/x-cli",
15800
- version: "1.1.76",
15800
+ version: "1.1.77",
15801
15801
  description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal.",
15802
15802
  main: "dist/index.js",
15803
15803
  module: "dist/index.js",
@@ -16274,6 +16274,7 @@ function useInputHandler({
16274
16274
  { command: "/comments", description: "Add code comments to files" },
16275
16275
  { command: "/commit-and-push", description: "AI commit & push to remote" },
16276
16276
  { command: "/smart-push", description: "Intelligent staging, commit message generation, and push" },
16277
+ { command: "/context", description: "Show loaded documentation and context status" },
16277
16278
  { command: "/exit", description: "Exit the application" }
16278
16279
  ];
16279
16280
  const availableModels = useMemo(() => {
@@ -16281,6 +16282,36 @@ function useInputHandler({
16281
16282
  }, []);
16282
16283
  const handleDirectCommand = async (input2) => {
16283
16284
  const trimmedInput = input2.trim();
16285
+ if (trimmedInput === "/context") {
16286
+ const contextEntry = {
16287
+ type: "assistant",
16288
+ content: `\u{1F4DA} **Loaded Documentation Context**
16289
+
16290
+ The .agent documentation system has been automatically loaded at startup:
16291
+
16292
+ **System Documentation:**
16293
+ - \u{1F4CB} System Architecture (architecture.md)
16294
+ - \u{1F3D7}\uFE0F Critical State (critical-state.md)
16295
+ - \u{1F3D7}\uFE0F Installation Guide (installation.md)
16296
+ - \u{1F3D7}\uFE0F API Schema (api-schema.md)
16297
+ - \u{1F3D7}\uFE0F Auto-Read System (auto-read-system.md)
16298
+
16299
+ **SOP Documentation:**
16300
+ - \u{1F527} Git Workflow SOP (git-workflow.md)
16301
+ - \u{1F4D6} Release Management SOP (release-management.md)
16302
+ - \u{1F4D6} Automation Protection SOP (automation-protection.md)
16303
+ - \u{1F4D6} NPM Publishing Troubleshooting (npm-publishing-troubleshooting.md)
16304
+
16305
+ **Purpose:**
16306
+ This documentation provides context for all AI operations, ensuring consistent understanding of project architecture, processes, and standards.
16307
+
16308
+ **Auto-Read Status:** \u2705 Active - Loaded automatically on startup`,
16309
+ timestamp: /* @__PURE__ */ new Date()
16310
+ };
16311
+ setChatHistory((prev) => [...prev, contextEntry]);
16312
+ clearInput();
16313
+ return true;
16314
+ }
16284
16315
  if (trimmedInput === "/clear") {
16285
16316
  setChatHistory([]);
16286
16317
  setIsProcessing(false);
@@ -16361,6 +16392,36 @@ Examples:
16361
16392
  clearInput();
16362
16393
  return true;
16363
16394
  }
16395
+ if (trimmedInput === "/context") {
16396
+ const contextEntry = {
16397
+ type: "assistant",
16398
+ content: `\u{1F4DA} **Loaded Documentation Context**
16399
+
16400
+ The .agent documentation system has been automatically loaded at startup:
16401
+
16402
+ **System Documentation:**
16403
+ - \u{1F4CB} System Architecture (architecture.md)
16404
+ - \u{1F3D7}\uFE0F Critical State (critical-state.md)
16405
+ - \u{1F3D7}\uFE0F Installation Guide (installation.md)
16406
+ - \u{1F3D7}\uFE0F API Schema (api-schema.md)
16407
+ - \u{1F3D7}\uFE0F Auto-Read System (auto-read-system.md)
16408
+
16409
+ **SOP Documentation:**
16410
+ - \u{1F527} Git Workflow SOP (git-workflow.md)
16411
+ - \u{1F4D6} Release Management SOP (release-management.md)
16412
+ - \u{1F4D6} Automation Protection SOP (automation-protection.md)
16413
+ - \u{1F4D6} NPM Publishing Troubleshooting (npm-publishing-troubleshooting.md)
16414
+
16415
+ **Purpose:**
16416
+ This documentation provides context for all AI operations, ensuring consistent understanding of project architecture, processes, and standards.
16417
+
16418
+ **Auto-Read Status:** \u2705 Active - Loaded automatically on startup`,
16419
+ timestamp: /* @__PURE__ */ new Date()
16420
+ };
16421
+ setChatHistory((prev) => [...prev, contextEntry]);
16422
+ clearInput();
16423
+ return true;
16424
+ }
16364
16425
  if (trimmedInput === "/exit") {
16365
16426
  process.exit(0);
16366
16427
  return true;
@@ -18508,6 +18569,7 @@ function useAutoRead(setChatHistory) {
18508
18569
  timestamp: /* @__PURE__ */ new Date()
18509
18570
  });
18510
18571
  }
18572
+ console.log("\u{1F50D} Auto-reading .agent documentation...");
18511
18573
  const folders = config2?.folders || [
18512
18574
  {
18513
18575
  name: "system",
@@ -18557,6 +18619,7 @@ function useAutoRead(setChatHistory) {
18557
18619
  const content = fs__default.readFileSync(filePath, "utf8");
18558
18620
  const displayTitle = file.title || fileName.replace(".md", "").replace("-", " ").toUpperCase();
18559
18621
  const icon = file.icon || "\u{1F4C4}";
18622
+ console.log(`\u{1F4C4} Loaded: ${folder.name}/${fileName} (${content.length} chars)`);
18560
18623
  if (showFileContents) {
18561
18624
  initialMessages.push({
18562
18625
  type: "assistant",
@@ -18568,10 +18631,12 @@ ${content}`,
18568
18631
  }
18569
18632
  docsRead++;
18570
18633
  } catch (_error) {
18634
+ console.log(`\u26A0\uFE0F Failed to read: ${folder.name}/${fileName}`);
18571
18635
  }
18572
18636
  }
18573
18637
  }
18574
18638
  }
18639
+ console.log(`\u2705 Auto-read complete: ${docsRead} documentation files loaded`);
18575
18640
  if (showSummaryMessage && docsRead > 0) {
18576
18641
  initialMessages.push({
18577
18642
  type: "assistant",
@@ -19055,20 +19120,20 @@ function formatTimeAgo(date) {
19055
19120
  if (seconds < 86400) return `${Math.floor(seconds / 3600)}h ago`;
19056
19121
  return `${Math.floor(seconds / 86400)}d ago`;
19057
19122
  }
19058
- var grokBanner = `
19123
+ var xcliBanner = `
19059
19124
  \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588
19060
19125
  \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
19061
19126
  \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
19062
19127
  \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
19063
19128
  \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588
19064
19129
  `;
19065
- var grokMini = `
19130
+ var xcliMini = `
19066
19131
  \u2584 \u2584 \u2584\u2584\u2584\u2584\u2584\u2584 \u2584 \u2584
19067
19132
  \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
19068
19133
  \u2588\u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588
19069
19134
  \u2588\u2588 \u2588\u2588 \u2588\u2588\u2588\u2588\u2588\u2588 \u2588\u2588 \u2588\u2588
19070
19135
  `;
19071
- var grokRetro = `
19136
+ var xcliRetro = `
19072
19137
  \u2554\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2557
19073
19138
  \u2551 \u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584 \u2584\u2584\u2584\u2584\u2584 \u2584 \u2584 \u2584\u2584\u2584\u2584\u2584 \u2584 \u2584 \u2551
19074
19139
  \u2551 \u2588\u2588 \u2588\u2588 \u2588 \u2588\u2588 \u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2588\u2588 \u2551
@@ -19087,11 +19152,11 @@ function Banner({
19087
19152
  const getBannerArt = () => {
19088
19153
  switch (style) {
19089
19154
  case "mini":
19090
- return grokMini;
19155
+ return xcliMini;
19091
19156
  case "retro":
19092
- return grokRetro;
19157
+ return xcliRetro;
19093
19158
  default:
19094
- return grokBanner;
19159
+ return xcliBanner;
19095
19160
  }
19096
19161
  };
19097
19162
  const getContextStatus = () => {