@xagent/x-cli 1.1.112 → 1.1.115
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 +77 -62
- package/dist/index.js +43 -28
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,8 +1,18 @@
|
|
|
1
|
-
## 1.1.
|
|
1
|
+
## 1.1.113 – Repository Migration Complete
|
|
2
2
|
|
|
3
|
-
✅ **
|
|
3
|
+
✅ **Repository Successfully Renamed**: `x-cli-team/x-cli` → `x-cli-team/grok-one-shot`
|
|
4
|
+
✅ **Live on NPM**: [@xagent/one-shot](https://www.npmjs.com/package/@xagent/one-shot) - Fully published and ready for global installation
|
|
5
|
+
✅ **Full Backward Compatibility**: All existing commands and URLs continue working seamlessly
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
**Migration Highlights:**
|
|
8
|
+
|
|
9
|
+
- Repository renamed to align with CLI identity (`grok-one-shot`)
|
|
10
|
+
- GitHub redirects ensure zero user impact
|
|
11
|
+
- Both `grok-one-shot` and legacy `grok` commands work
|
|
12
|
+
- NPM packages maintain same names for compatibility
|
|
13
|
+
- All documentation and workflows updated
|
|
14
|
+
|
|
15
|
+
This release includes the complete repository migration with critical streaming fixes and major code cleanup.
|
|
6
16
|
|
|
7
17
|
### 🚨 **Critical Fixes**
|
|
8
18
|
|
|
@@ -41,9 +51,9 @@ This release includes critical streaming fixes and major code cleanup.
|
|
|
41
51
|
</div>
|
|
42
52
|
|
|
43
53
|
[](https://www.npmjs.com/package/@xagent/one-shot)
|
|
44
|
-
[](https://github.com/x-cli-team/grok-one-shot/releases)
|
|
45
55
|
[](https://www.npmjs.com/package/@xagent/one-shot)
|
|
46
|
-
[](https://github.com/x-cli-team/grok-one-shot/blob/main/LICENSE)
|
|
47
57
|
[](https://discord.com/channels/1315720379607679066/1315822328139223064)
|
|
48
58
|
|
|
49
59
|
A conversational AI CLI tool powered by x.ai with **Claude Code-level intelligence** and advanced tool capabilities.
|
|
@@ -55,10 +65,10 @@ A conversational AI CLI tool powered by x.ai with **Claude Code-level intelligen
|
|
|
55
65
|
## 🔗 Quick Links
|
|
56
66
|
|
|
57
67
|
- **📦 [NPM Package](https://www.npmjs.com/package/@xagent/one-shot)** - Install globally with `npm install -g @xagent/one-shot`
|
|
58
|
-
- **🐙 [GitHub Repository](https://github.com/x-cli-team/
|
|
68
|
+
- **🐙 [GitHub Repository](https://github.com/x-cli-team/grok-one-shot)** - Source code, issues, and contributions
|
|
59
69
|
- **🎯 [Competitive Parity Analysis](./.agent/parity/)** - Strategic analysis vs Claude Code, Cursor IDE, and OpenAI Codex
|
|
60
70
|
- **💬 [xAI Community Discord](https://discord.com/channels/1315720379607679066/1315822328139223064)** - Official xAI API community support
|
|
61
|
-
- **📚 [Releases](https://github.com/x-cli-team/
|
|
71
|
+
- **📚 [Releases](https://github.com/x-cli-team/grok-one-shot/releases)** - Version history and changelogs
|
|
62
72
|
|
|
63
73
|
## Featured In
|
|
64
74
|
|
|
@@ -338,7 +348,7 @@ pnpm add -g @xagent/one-shot@latest
|
|
|
338
348
|
bun add -g @xagent/one-shot@latest
|
|
339
349
|
```
|
|
340
350
|
|
|
341
|
-
### 🛠️ PATH Setup (If `
|
|
351
|
+
### 🛠️ PATH Setup (If `grok-one-shot` command not found)
|
|
342
352
|
|
|
343
353
|
After installation, if you get "command not found", add npm's global bin to your PATH:
|
|
344
354
|
|
|
@@ -365,8 +375,8 @@ $env:PATH += ";$npmPath"
|
|
|
365
375
|
**Verify installation:**
|
|
366
376
|
|
|
367
377
|
```bash
|
|
368
|
-
|
|
369
|
-
which
|
|
378
|
+
grok-one-shot --version # Should show current version
|
|
379
|
+
which grok-one-shot # Should show installation path
|
|
370
380
|
```
|
|
371
381
|
|
|
372
382
|
### ⚡ Quick Start (One-liner)
|
|
@@ -383,7 +393,7 @@ X_API_KEY=your_api_key_here npx -y @xagent/one-shot@latest --help
|
|
|
383
393
|
npm install -g @xagent/one-shot@latest && \
|
|
384
394
|
echo 'export X_API_KEY=your_api_key_here' >> ~/.zshrc && \
|
|
385
395
|
source ~/.zshrc && \
|
|
386
|
-
|
|
396
|
+
grok-one-shot --help
|
|
387
397
|
```
|
|
388
398
|
|
|
389
399
|
### Local Development
|
|
@@ -418,7 +428,7 @@ cp .env.example .env
|
|
|
418
428
|
**Method 3: Command Line Flag**
|
|
419
429
|
|
|
420
430
|
```bash
|
|
421
|
-
|
|
431
|
+
grok-one-shot --api-key your_api_key_here
|
|
422
432
|
```
|
|
423
433
|
|
|
424
434
|
**Method 4: User Settings File**
|
|
@@ -460,7 +470,7 @@ export GROK_BASE_URL=https://your-custom-endpoint.com/v1
|
|
|
460
470
|
**Method 2: Command Line Flag**
|
|
461
471
|
|
|
462
472
|
```bash
|
|
463
|
-
|
|
473
|
+
grok-one-shot --api-key your_api_key_here --base-url https://your-custom-endpoint.com/v1
|
|
464
474
|
```
|
|
465
475
|
|
|
466
476
|
**Method 3: User Settings File**
|
|
@@ -537,7 +547,7 @@ This means you can have different models for different projects while maintainin
|
|
|
537
547
|
|
|
538
548
|
### Using Other API Providers
|
|
539
549
|
|
|
540
|
-
**Important**:
|
|
550
|
+
**Important**: Grok One Shot uses **OpenAI-compatible APIs**. You can use any provider that implements the OpenAI chat completions standard.
|
|
541
551
|
|
|
542
552
|
**Popular Providers**:
|
|
543
553
|
|
|
@@ -631,7 +641,7 @@ The `.agent` folder is intentionally **gitignored** (contains sensitive project-
|
|
|
631
641
|
1. **Initialize `.agent` system**:
|
|
632
642
|
|
|
633
643
|
```bash
|
|
634
|
-
|
|
644
|
+
grok-one-shot
|
|
635
645
|
/init-agent
|
|
636
646
|
```
|
|
637
647
|
|
|
@@ -653,7 +663,7 @@ npx husky add .husky/pre-commit "npm run sync-docs"
|
|
|
653
663
|
```json
|
|
654
664
|
{
|
|
655
665
|
"scripts": {
|
|
656
|
-
"sync-docs": "
|
|
666
|
+
"sync-docs": "grok-one-shot /update-agent-docs --sync-to-docusaurus"
|
|
657
667
|
}
|
|
658
668
|
}
|
|
659
669
|
```
|
|
@@ -682,7 +692,7 @@ npx husky add .husky/pre-commit "npm run sync-docs"
|
|
|
682
692
|
1. **Initialize your project**:
|
|
683
693
|
|
|
684
694
|
```bash
|
|
685
|
-
|
|
695
|
+
grok-one-shot
|
|
686
696
|
/init-agent
|
|
687
697
|
```
|
|
688
698
|
|
|
@@ -703,13 +713,13 @@ xcli
|
|
|
703
713
|
Start the conversational AI assistant:
|
|
704
714
|
|
|
705
715
|
```bash
|
|
706
|
-
|
|
716
|
+
grok-one-shot
|
|
707
717
|
```
|
|
708
718
|
|
|
709
719
|
Or specify a working directory:
|
|
710
720
|
|
|
711
721
|
```bash
|
|
712
|
-
|
|
722
|
+
grok-one-shot -d /path/to/project
|
|
713
723
|
```
|
|
714
724
|
|
|
715
725
|
#### ⌨️ Keyboard Shortcuts
|
|
@@ -725,10 +735,10 @@ xcli -d /path/to/project
|
|
|
725
735
|
Process a single prompt and exit (useful for scripting and automation):
|
|
726
736
|
|
|
727
737
|
```bash
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
738
|
+
grok-one-shot --prompt "show me the package.json file"
|
|
739
|
+
grok-one-shot -p "create a new file called example.js with a hello world function"
|
|
740
|
+
grok-one-shot --prompt "run bun test and show me the results" --directory /path/to/project
|
|
741
|
+
grok-one-shot --prompt "complex task" --max-tool-rounds 50 # Limit tool usage for faster execution
|
|
732
742
|
```
|
|
733
743
|
|
|
734
744
|
This mode is particularly useful for:
|
|
@@ -740,18 +750,18 @@ This mode is particularly useful for:
|
|
|
740
750
|
|
|
741
751
|
### Tool Execution Control
|
|
742
752
|
|
|
743
|
-
By default,
|
|
753
|
+
By default, Grok One Shot allows up to 400 tool execution rounds to handle complex multi-step tasks. You can control this behavior:
|
|
744
754
|
|
|
745
755
|
```bash
|
|
746
756
|
# Limit tool rounds for faster execution on simple tasks
|
|
747
|
-
|
|
757
|
+
grok-one-shot --max-tool-rounds 10 --prompt "show me the current directory"
|
|
748
758
|
|
|
749
759
|
# Increase limit for very complex tasks (use with caution)
|
|
750
|
-
|
|
760
|
+
grok-one-shot --max-tool-rounds 1000 --prompt "comprehensive code refactoring"
|
|
751
761
|
|
|
752
762
|
# Works with all modes
|
|
753
|
-
|
|
754
|
-
|
|
763
|
+
grok-one-shot --max-tool-rounds 20 # Interactive mode
|
|
764
|
+
grok-one-shot git commit-and-push --max-tool-rounds 30 # Git commands
|
|
755
765
|
```
|
|
756
766
|
|
|
757
767
|
**Use Cases**:
|
|
@@ -768,21 +778,21 @@ You can specify which AI model to use with the `--model` parameter or `GROK_MODE
|
|
|
768
778
|
|
|
769
779
|
```bash
|
|
770
780
|
# Use x.ai models
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
781
|
+
grok-one-shot --model grok-4-fast-non-reasoning
|
|
782
|
+
grok-one-shot --model grok-4-latest
|
|
783
|
+
grok-one-shot --model grok-3-latest
|
|
784
|
+
grok-one-shot --model grok-3-fast
|
|
775
785
|
|
|
776
786
|
# Use other models (with appropriate API endpoint)
|
|
777
|
-
|
|
778
|
-
|
|
787
|
+
grok-one-shot --model gemini-2.5-pro --base-url https://api-endpoint.com/v1
|
|
788
|
+
grok-one-shot --model claude-sonnet-4-20250514 --base-url https://api-endpoint.com/v1
|
|
779
789
|
```
|
|
780
790
|
|
|
781
791
|
**Method 2: Environment Variable**
|
|
782
792
|
|
|
783
793
|
```bash
|
|
784
794
|
export GROK_MODEL=grok-4-fast-non-reasoning
|
|
785
|
-
|
|
795
|
+
grok-one-shot
|
|
786
796
|
```
|
|
787
797
|
|
|
788
798
|
**Method 3: User Settings File**
|
|
@@ -800,7 +810,7 @@ Add to `~/.xcli/user-settings.json`:
|
|
|
800
810
|
### Command Line Options
|
|
801
811
|
|
|
802
812
|
```bash
|
|
803
|
-
|
|
813
|
+
grok-one-shot [options]
|
|
804
814
|
|
|
805
815
|
Options:
|
|
806
816
|
-V, --version output the version number
|
|
@@ -837,7 +847,7 @@ Grok One-Shot will automatically load and follow these instructions when working
|
|
|
837
847
|
|
|
838
848
|
## Morph Fast Apply (Optional)
|
|
839
849
|
|
|
840
|
-
|
|
850
|
+
Grok One Shot supports Morph's Fast Apply model for high-speed code editing at **4,500+ tokens/sec with 98% accuracy**. This is an optional feature that provides lightning-fast file editing capabilities.
|
|
841
851
|
|
|
842
852
|
**Setup**: Configure your Morph API key following the [setup instructions](#setup) above.
|
|
843
853
|
|
|
@@ -860,15 +870,15 @@ When `MORPH_API_KEY` is configured:
|
|
|
860
870
|
With Morph Fast Apply configured, you can request complex code changes:
|
|
861
871
|
|
|
862
872
|
```bash
|
|
863
|
-
|
|
864
|
-
|
|
873
|
+
grok-one-shot --prompt "refactor this function to use async/await and add error handling"
|
|
874
|
+
grok-one-shot -p "convert this class to TypeScript and add proper type annotations"
|
|
865
875
|
```
|
|
866
876
|
|
|
867
877
|
The AI will automatically choose between `edit_file` (Morph) for complex changes or `str_replace_editor` for simple replacements.
|
|
868
878
|
|
|
869
879
|
## MCP Tools
|
|
870
880
|
|
|
871
|
-
|
|
881
|
+
Grok One Shot supports MCP (Model Context Protocol) servers, allowing you to extend the AI assistant with additional tools and capabilities.
|
|
872
882
|
|
|
873
883
|
### Adding MCP Tools
|
|
874
884
|
|
|
@@ -876,19 +886,19 @@ X-CLI supports MCP (Model Context Protocol) servers, allowing you to extend the
|
|
|
876
886
|
|
|
877
887
|
```bash
|
|
878
888
|
# Add an stdio-based MCP server
|
|
879
|
-
|
|
889
|
+
grok-one-shot mcp add my-server --transport stdio --command "bun" --args server.js
|
|
880
890
|
|
|
881
891
|
# Add an HTTP-based MCP server
|
|
882
|
-
|
|
892
|
+
grok-one-shot mcp add my-server --transport http --url "http://localhost:3000"
|
|
883
893
|
|
|
884
894
|
# Add with environment variables
|
|
885
|
-
|
|
895
|
+
grok-one-shot mcp add my-server --transport stdio --command "python" --args "-m" "my_mcp_server" --env "API_KEY=your_key"
|
|
886
896
|
```
|
|
887
897
|
|
|
888
898
|
#### Add from JSON configuration:
|
|
889
899
|
|
|
890
900
|
```bash
|
|
891
|
-
|
|
901
|
+
grok-one-shot mcp add-json my-server '{"command": "bun", "args": ["server.js"], "env": {"API_KEY": "your_key"}}'
|
|
892
902
|
```
|
|
893
903
|
|
|
894
904
|
### Linear Integration Example
|
|
@@ -897,7 +907,7 @@ To add Linear MCP tools for project management:
|
|
|
897
907
|
|
|
898
908
|
```bash
|
|
899
909
|
# Add Linear MCP server
|
|
900
|
-
|
|
910
|
+
grok-one-shot mcp add linear --transport sse --url "https://mcp.linear.app/sse"
|
|
901
911
|
```
|
|
902
912
|
|
|
903
913
|
This enables Linear tools like:
|
|
@@ -911,13 +921,13 @@ This enables Linear tools like:
|
|
|
911
921
|
|
|
912
922
|
```bash
|
|
913
923
|
# List all configured servers
|
|
914
|
-
|
|
924
|
+
grok-one-shot mcp list
|
|
915
925
|
|
|
916
926
|
# Test server connection
|
|
917
|
-
|
|
927
|
+
grok-one-shot mcp test server-name
|
|
918
928
|
|
|
919
929
|
# Remove a server
|
|
920
|
-
|
|
930
|
+
grok-one-shot mcp remove server-name
|
|
921
931
|
```
|
|
922
932
|
|
|
923
933
|
### Available Transport Types
|
|
@@ -1026,7 +1036,7 @@ npm run smart-push
|
|
|
1026
1036
|
#### GitHub Secrets (Required)
|
|
1027
1037
|
|
|
1028
1038
|
- **`PAT_TOKEN`**: Personal Access Token with repo permissions (for git operations)
|
|
1029
|
-
- **`NPM_TOKEN`**: NPM Automation token from `
|
|
1039
|
+
- **`NPM_TOKEN`**: NPM Automation token from `grok-one-shot_cli` account (for publishing)
|
|
1030
1040
|
|
|
1031
1041
|
#### Package Configuration (Sacred Settings)
|
|
1032
1042
|
|
|
@@ -1066,7 +1076,7 @@ git push origin main --follow-tags
|
|
|
1066
1076
|
|
|
1067
1077
|
### 📊 Monitoring
|
|
1068
1078
|
|
|
1069
|
-
- **GitHub Actions**: https://github.com/x-cli-team/
|
|
1079
|
+
- **GitHub Actions**: https://github.com/x-cli-team/grok-one-shot/actions
|
|
1070
1080
|
- **NPM Package**: https://www.npmjs.com/package/@xagent/one-shot
|
|
1071
1081
|
- **Release History**: Check git tags or NPM version history
|
|
1072
1082
|
|
|
@@ -1106,16 +1116,16 @@ MIT
|
|
|
1106
1116
|
|
|
1107
1117
|
## Credits
|
|
1108
1118
|
|
|
1109
|
-
This project is based on [
|
|
1119
|
+
This project is based on [grok-one-shot-cli](https://github.com/superagent-ai/grok-one-shot-cli) by [@pelaseyed](https://x.com/pelaseyed).
|
|
1110
1120
|
|
|
1111
1121
|
## Troubleshooting
|
|
1112
1122
|
|
|
1113
1123
|
### Installation Issues
|
|
1114
1124
|
|
|
1115
|
-
**🚨 "Command not found:
|
|
1125
|
+
**🚨 "Command not found: grok-one-shot"**
|
|
1116
1126
|
|
|
1117
1127
|
```bash
|
|
1118
|
-
# Check if
|
|
1128
|
+
# Check if grok-one-shot is installed
|
|
1119
1129
|
npm list -g @xagent/one-shot
|
|
1120
1130
|
|
|
1121
1131
|
# If installed but not in PATH, add npm global bin to PATH:
|
|
@@ -1123,7 +1133,7 @@ echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
|
|
|
1123
1133
|
source ~/.zshrc
|
|
1124
1134
|
|
|
1125
1135
|
# Verify it works
|
|
1126
|
-
|
|
1136
|
+
grok-one-shot --version
|
|
1127
1137
|
```
|
|
1128
1138
|
|
|
1129
1139
|
**🚨 "Permission denied" during installation**
|
|
@@ -1155,7 +1165,7 @@ npm install -g @xagent/one-shot@latest
|
|
|
1155
1165
|
|
|
1156
1166
|
```bash
|
|
1157
1167
|
# Check current version
|
|
1158
|
-
|
|
1168
|
+
grok-one-shot --version
|
|
1159
1169
|
npm view @xagent/one-shot version
|
|
1160
1170
|
|
|
1161
1171
|
# Update to latest
|
|
@@ -1193,7 +1203,7 @@ echo $X_API_KEY
|
|
|
1193
1203
|
|
|
1194
1204
|
```bash
|
|
1195
1205
|
# Test with verbose output
|
|
1196
|
-
|
|
1206
|
+
grok-one-shot --verbose "test message"
|
|
1197
1207
|
|
|
1198
1208
|
# Check API endpoint connectivity
|
|
1199
1209
|
curl -I https://api.x.ai/v1/models
|
|
@@ -1204,19 +1214,19 @@ curl -I https://api.x.ai/v1/models
|
|
|
1204
1214
|
- **File operations fail**: Check that the file path exists and is accessible
|
|
1205
1215
|
- **Bash commands fail**: Ensure you have the necessary permissions
|
|
1206
1216
|
- **Tool timeouts**: Complex operations may take time; the spinner indicates progress
|
|
1207
|
-
- **Slow responses**: Try a different model with `
|
|
1217
|
+
- **Slow responses**: Try a different model with `grok-one-shot --model grok-4-fast-non-reasoning`
|
|
1208
1218
|
|
|
1209
1219
|
## 🙏 Credits
|
|
1210
1220
|
|
|
1211
|
-
This project is built upon the excellent foundation of the original [
|
|
1221
|
+
This project is built upon the excellent foundation of the original [Grok One Shot](https://github.com/superagent-ai/grok-one-shot-cli) created by [Ismail Pelaseyed](https://github.com/homanp) at [Superagent.ai](https://github.com/superagent-ai).
|
|
1212
1222
|
|
|
1213
|
-
**Original Project**: [superagent-ai/
|
|
1223
|
+
**Original Project**: [superagent-ai/grok-one-shot-cli](https://github.com/superagent-ai/grok-one-shot-cli)
|
|
1214
1224
|
**Founder**: [Ismail Pelaseyed](https://github.com/homanp)
|
|
1215
1225
|
**Organization**: [Superagent.ai](https://github.com/superagent-ai)
|
|
1216
1226
|
|
|
1217
1227
|
Grok One-Shot extends the original with advanced file operations, enhanced tool systems, and comprehensive automation while maintaining the core vision of bringing AI-powered terminal intelligence to developers.
|
|
1218
1228
|
|
|
1219
|
-
**🚀 Now live on NPM**: Install globally with `npm install -g @xagent/one-shot` and start using `
|
|
1229
|
+
**🚀 Now live on NPM**: Install globally with `npm install -g @xagent/one-shot` and start using `grok-one-shot` immediately!
|
|
1220
1230
|
|
|
1221
1231
|
## 👥 Contributors
|
|
1222
1232
|
|
|
@@ -1232,7 +1242,7 @@ To add yourself as a contributor:
|
|
|
1232
1242
|
### Core Contributors
|
|
1233
1243
|
|
|
1234
1244
|
- **[@hinetapora](https://github.com/hinetapora)** — Fork maintainer, advanced tool systems, UX enhancements, auto-upgrade system
|
|
1235
|
-
- **[@homanp](https://github.com/homanp)** — Original
|
|
1245
|
+
- **[@homanp](https://github.com/homanp)** — Original Grok One Shot creator and foundation
|
|
1236
1246
|
|
|
1237
1247
|
### Community Contributors
|
|
1238
1248
|
|
|
@@ -1250,7 +1260,7 @@ _Want to see your name here? Check out our [Contributing Guide](CONTRIBUTING.md)
|
|
|
1250
1260
|
### How to Contribute
|
|
1251
1261
|
|
|
1252
1262
|
1. **Fork** the repository on GitHub
|
|
1253
|
-
2. **Clone** your fork locally: `git clone https://github.com/yourusername/
|
|
1263
|
+
2. **Clone** your fork locally: `git clone https://github.com/yourusername/grok-one-shot.git`
|
|
1254
1264
|
3. **Create** a feature branch: `git checkout -b feature/your-feature-name`
|
|
1255
1265
|
4. **Make** your changes and commit them: `git commit -m "feat: add awesome feature"`
|
|
1256
1266
|
5. **Push** to your fork: `git push origin feature/your-feature-name`
|
|
@@ -1267,3 +1277,8 @@ _Want to see your name here? Check out our [Contributing Guide](CONTRIBUTING.md)
|
|
|
1267
1277
|
- 💡 **Feature requests** - Suggest new functionality
|
|
1268
1278
|
|
|
1269
1279
|
Join our growing community of AI-powered terminal enthusiasts!
|
|
1280
|
+
|
|
1281
|
+
---
|
|
1282
|
+
|
|
1283
|
+
**🎉 Repository Successfully Migrated to `grok-one-shot`**
|
|
1284
|
+
All services verified and operational. GitHub redirects, NPM packages, Vercel deployments, and CLI commands functioning perfectly with full backward compatibility.
|
package/dist/index.js
CHANGED
|
@@ -18500,7 +18500,7 @@ var init_package = __esm({
|
|
|
18500
18500
|
package_default = {
|
|
18501
18501
|
type: "module",
|
|
18502
18502
|
name: "@xagent/one-shot",
|
|
18503
|
-
version: "1.1.
|
|
18503
|
+
version: "1.1.115",
|
|
18504
18504
|
description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal with automatic documentation updates.",
|
|
18505
18505
|
main: "dist/index.js",
|
|
18506
18506
|
module: "dist/index.js",
|
|
@@ -18512,6 +18512,7 @@ var init_package = __esm({
|
|
|
18512
18512
|
}
|
|
18513
18513
|
},
|
|
18514
18514
|
bin: {
|
|
18515
|
+
"grok-one-shot": "./dist/index.js",
|
|
18515
18516
|
grok: "./dist/index.js"
|
|
18516
18517
|
},
|
|
18517
18518
|
files: [
|
|
@@ -18525,6 +18526,11 @@ var init_package = __esm({
|
|
|
18525
18526
|
dev: "tsx watch src/index.ts",
|
|
18526
18527
|
lint: "eslint src --ext .ts",
|
|
18527
18528
|
typecheck: "tsc --noEmit",
|
|
18529
|
+
test: "./scripts/test-core-features.sh",
|
|
18530
|
+
"test:core": "./scripts/test-core-features.sh",
|
|
18531
|
+
"test:tools": "./scripts/test-all-tools.sh",
|
|
18532
|
+
"test:tools:quick": "./scripts/test-tools-quick.sh",
|
|
18533
|
+
"test:tools:validate": "./scripts/validate-tool-code.sh",
|
|
18528
18534
|
prepare: "husky install",
|
|
18529
18535
|
"dev:site": "cd apps/site && npm run start",
|
|
18530
18536
|
"build:site": "cd apps/site && npm run build",
|
|
@@ -18609,12 +18615,12 @@ var init_package = __esm({
|
|
|
18609
18615
|
preferGlobal: true,
|
|
18610
18616
|
repository: {
|
|
18611
18617
|
type: "git",
|
|
18612
|
-
url: "https://github.com/x-cli-team/
|
|
18618
|
+
url: "https://github.com/x-cli-team/grok-one-shot.git"
|
|
18613
18619
|
},
|
|
18614
18620
|
bugs: {
|
|
18615
|
-
url: "https://github.com/x-cli-team/
|
|
18621
|
+
url: "https://github.com/x-cli-team/grok-one-shot/issues"
|
|
18616
18622
|
},
|
|
18617
|
-
homepage: "https://
|
|
18623
|
+
homepage: "https://grok-one-shot.org",
|
|
18618
18624
|
icon: "docs/assets/logos/x-cli-logo.svg",
|
|
18619
18625
|
publishConfig: {
|
|
18620
18626
|
access: "public"
|
|
@@ -19190,7 +19196,7 @@ Use \`/upgrade\` to update automatically or run:
|
|
|
19190
19196
|
\`${versionInfo.updateCommand}\`` : "\u2705 **You are up to date!**"}
|
|
19191
19197
|
|
|
19192
19198
|
Package: ${package_default.name}
|
|
19193
|
-
GitHub: https://github.com/x-cli-team/
|
|
19199
|
+
GitHub: https://github.com/x-cli-team/grok-one-shot
|
|
19194
19200
|
NPM: https://www.npmjs.com/package/${package_default.name}`,
|
|
19195
19201
|
timestamp: /* @__PURE__ */ new Date()
|
|
19196
19202
|
};
|
|
@@ -21801,29 +21807,32 @@ var init_banner = __esm({
|
|
|
21801
21807
|
init_colors();
|
|
21802
21808
|
init_context_status();
|
|
21803
21809
|
xcliBanner = `
|
|
21804
|
-
|
|
21805
|
-
___
|
|
21806
|
-
__
|
|
21807
|
-
_
|
|
21808
|
-
_
|
|
21809
|
-
_
|
|
21810
|
-
_
|
|
21811
|
-
_
|
|
21812
|
-
__
|
|
21810
|
+
_____/\\\\\\\\\\\\\\\\\\\\\\\\______/\\\\\\\\\\____
|
|
21811
|
+
___/\\\\\\\\//////////___/\\\\\\\\\\\\\\\\____
|
|
21812
|
+
__/\\\\\\_____________\\\\/////\\/\\\\____
|
|
21813
|
+
_\\\\/\\\\\\\\____/\\\\\\\\\\\\\\_____\\\\/\\\\____
|
|
21814
|
+
_\\\\/\\\\\\\\___\\/////\\\\\\_____\\\\/\\\\____
|
|
21815
|
+
_\\\\/\\\\\\_______\\\\/\\\\\\_____\\\\/\\\\____
|
|
21816
|
+
_\\\\/\\\\\\_______\\\\/\\\\\\_____\\\\/\\\\____
|
|
21817
|
+
_\\\\//\\\\\\\\\\\\\\\\\\\\\\/________\\\\/\\\\\\\\__
|
|
21818
|
+
__\\\\////////////_________\\\\/\\//___
|
|
21813
21819
|
`;
|
|
21814
21820
|
xcliMini = `
|
|
21815
|
-
\
|
|
21816
|
-
\u2588\u2588
|
|
21817
|
-
|
|
21818
|
-
\u2588\u2588
|
|
21821
|
+
\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557
|
|
21822
|
+
\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2588\u2551
|
|
21823
|
+
\u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2551
|
|
21824
|
+
\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551
|
|
21825
|
+
\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551
|
|
21826
|
+
\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D
|
|
21819
21827
|
`;
|
|
21820
21828
|
xcliRetro = `
|
|
21821
21829
|
\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
|
|
21822
|
-
\u2551
|
|
21823
|
-
\u2551 \u2588\u2588
|
|
21824
|
-
\u2551
|
|
21825
|
-
\u2551
|
|
21826
|
-
\u2551 \
|
|
21830
|
+
\u2551 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2551
|
|
21831
|
+
\u2551 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2554\u255D \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u2588\u2588\u2588\u2551 \u2551
|
|
21832
|
+
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2551 \u2551
|
|
21833
|
+
\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2588\u2588\u2557 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551 \u2551
|
|
21834
|
+
\u2551 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2557 \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D \u2588\u2588\u2551 \u2551
|
|
21835
|
+
\u2551 \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u255D \u2551
|
|
21827
21836
|
\u255A\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\u255D
|
|
21828
21837
|
`;
|
|
21829
21838
|
}
|
|
@@ -23758,7 +23767,7 @@ var require_package = __commonJS({
|
|
|
23758
23767
|
module.exports = {
|
|
23759
23768
|
type: "module",
|
|
23760
23769
|
name: "@xagent/one-shot",
|
|
23761
|
-
version: "1.1.
|
|
23770
|
+
version: "1.1.115",
|
|
23762
23771
|
description: "An open-source AI agent that brings advanced AI capabilities directly into your terminal with automatic documentation updates.",
|
|
23763
23772
|
main: "dist/index.js",
|
|
23764
23773
|
module: "dist/index.js",
|
|
@@ -23770,6 +23779,7 @@ var require_package = __commonJS({
|
|
|
23770
23779
|
}
|
|
23771
23780
|
},
|
|
23772
23781
|
bin: {
|
|
23782
|
+
"grok-one-shot": "./dist/index.js",
|
|
23773
23783
|
grok: "./dist/index.js"
|
|
23774
23784
|
},
|
|
23775
23785
|
files: [
|
|
@@ -23783,6 +23793,11 @@ var require_package = __commonJS({
|
|
|
23783
23793
|
dev: "tsx watch src/index.ts",
|
|
23784
23794
|
lint: "eslint src --ext .ts",
|
|
23785
23795
|
typecheck: "tsc --noEmit",
|
|
23796
|
+
test: "./scripts/test-core-features.sh",
|
|
23797
|
+
"test:core": "./scripts/test-core-features.sh",
|
|
23798
|
+
"test:tools": "./scripts/test-all-tools.sh",
|
|
23799
|
+
"test:tools:quick": "./scripts/test-tools-quick.sh",
|
|
23800
|
+
"test:tools:validate": "./scripts/validate-tool-code.sh",
|
|
23786
23801
|
prepare: "husky install",
|
|
23787
23802
|
"dev:site": "cd apps/site && npm run start",
|
|
23788
23803
|
"build:site": "cd apps/site && npm run build",
|
|
@@ -23867,12 +23882,12 @@ var require_package = __commonJS({
|
|
|
23867
23882
|
preferGlobal: true,
|
|
23868
23883
|
repository: {
|
|
23869
23884
|
type: "git",
|
|
23870
|
-
url: "https://github.com/x-cli-team/
|
|
23885
|
+
url: "https://github.com/x-cli-team/grok-one-shot.git"
|
|
23871
23886
|
},
|
|
23872
23887
|
bugs: {
|
|
23873
|
-
url: "https://github.com/x-cli-team/
|
|
23888
|
+
url: "https://github.com/x-cli-team/grok-one-shot/issues"
|
|
23874
23889
|
},
|
|
23875
|
-
homepage: "https://
|
|
23890
|
+
homepage: "https://grok-one-shot.org",
|
|
23876
23891
|
icon: "docs/assets/logos/x-cli-logo.svg",
|
|
23877
23892
|
publishConfig: {
|
|
23878
23893
|
access: "public"
|
|
@@ -23981,7 +23996,7 @@ try {
|
|
|
23981
23996
|
log("\u{1F916} Creating GrokAgent instance...");
|
|
23982
23997
|
const agent = new GrokAgent2(apiKey, baseURL, model, maxToolRounds);
|
|
23983
23998
|
log("\u{1F4CB} Setting up Commander CLI...");
|
|
23984
|
-
program.name("
|
|
23999
|
+
program.name("grok one shot").description("AI-powered CLI assistant").version(pkg.default.version).argument("[message...]", "Initial message to send to Grok").option("-d, --directory <dir>", "set working directory", process.cwd()).option("-k, --api-key <key>", "X API key").option("-u, --base-url <url>", "Grok API base URL").option("-m, --model <model>", "AI model to use").option("-p, --prompt <prompt>", "process a single prompt and exit (headless mode)").option("--max-tool-rounds <rounds>", "maximum tool rounds", "400").option("-q, --quiet", "suppress startup banner and messages").action(async (message, options) => {
|
|
23985
24000
|
log("\u{1F3AF} Starting main execution...");
|
|
23986
24001
|
if (options.directory) {
|
|
23987
24002
|
try {
|