grok-cli-hurry-mode 1.0.60 → 1.0.88
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 +206 -32
- package/dist/index.d.ts +2 -0
- package/dist/index.js +15703 -0
- package/dist/index.js.map +1 -0
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## 1.0.
|
|
1
|
+
## 1.0.88 – Stability Release
|
|
2
2
|
|
|
3
3
|
This release includes latest updates and automated publishing via GitHub Actions.
|
|
4
4
|
- Fixes all Read/Update tool reliability issues
|
|
@@ -8,19 +8,6 @@ This release includes latest updates and automated publishing via GitHub Actions
|
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
## 🚨 Critical Configuration Warnings
|
|
12
|
-
|
|
13
|
-
**DO NOT MODIFY THESE SETTINGS UNLESS YOU KNOW WHAT YOU'RE DOING:**
|
|
14
|
-
|
|
15
|
-
- **`package.json` name**: Must remain `"grok-cli-hurry-mode"` (unscoped). Changing to scoped (e.g., `@username/grok-cli-hurry-mode`) will break NPM publishing unless you have token access for that scope.
|
|
16
|
-
- **`package.json` publishConfig**: Must not include `"registry": "https://npm.pkg.github.com/"`. Publishing should go to npmjs.com, not GitHub Packages.
|
|
17
|
-
- **NPM_TOKEN secret**: Must be a valid automation token from the NPM account owning `grok-cli-hurry-mode`.
|
|
18
|
-
- **Git Hooks**: Do not re-enable interactive pre-push hooks, as they block CI/CD pushes.
|
|
19
|
-
|
|
20
|
-
**Why?** Previous changes to these broke the entire publishing flow. If you need to change the package name or scope, create a new package and update all references.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
11
|
# Grok CLI
|
|
25
12
|
|
|
26
13
|
[](https://www.npmjs.com/package/grok-cli-hurry-mode)
|
|
@@ -139,45 +126,62 @@ A conversational AI CLI tool powered by Grok with **Claude Code-level intelligen
|
|
|
139
126
|
|
|
140
127
|
### 🚀 Quick Install
|
|
141
128
|
|
|
142
|
-
**
|
|
129
|
+
**Option 1: Latest version with npm (Recommended)**
|
|
143
130
|
```bash
|
|
144
|
-
|
|
131
|
+
npm install -g grok-cli-hurry-mode@latest
|
|
145
132
|
```
|
|
146
133
|
|
|
147
|
-
**
|
|
134
|
+
**Option 2: Try without installing (using npx)**
|
|
148
135
|
```bash
|
|
149
|
-
|
|
136
|
+
npx grok-cli-hurry-mode@latest
|
|
150
137
|
```
|
|
151
138
|
|
|
152
|
-
**
|
|
139
|
+
**Option 3: Alternative package managers**
|
|
153
140
|
```bash
|
|
154
141
|
# Using Yarn
|
|
155
|
-
yarn global add grok-cli-hurry-mode
|
|
142
|
+
yarn global add grok-cli-hurry-mode@latest
|
|
156
143
|
|
|
157
144
|
# Using pnpm
|
|
158
|
-
pnpm add -g grok-cli-hurry-mode
|
|
145
|
+
pnpm add -g grok-cli-hurry-mode@latest
|
|
159
146
|
|
|
160
|
-
# Using
|
|
161
|
-
|
|
147
|
+
# Using bun
|
|
148
|
+
bun add -g grok-cli-hurry-mode@latest
|
|
162
149
|
```
|
|
163
150
|
|
|
164
|
-
###
|
|
151
|
+
### 🛠️ PATH Setup (If `grok` command not found)
|
|
152
|
+
|
|
153
|
+
After installation, if you get "command not found", add npm's global bin to your PATH:
|
|
154
|
+
|
|
155
|
+
**macOS/Linux:**
|
|
165
156
|
```bash
|
|
166
|
-
|
|
167
|
-
echo 'export
|
|
157
|
+
# Add to ~/.zshrc (macOS) or ~/.bashrc (Linux)
|
|
158
|
+
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
|
|
159
|
+
source ~/.zshrc
|
|
160
|
+
|
|
161
|
+
# Or for bash users:
|
|
162
|
+
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.bashrc
|
|
168
163
|
source ~/.bashrc
|
|
169
164
|
```
|
|
170
|
-
- Grok API key from X.AI
|
|
171
|
-
- (Optional, Recommended) Morph API key for Fast Apply editing
|
|
172
165
|
|
|
173
|
-
|
|
166
|
+
**Windows:**
|
|
174
167
|
```bash
|
|
175
|
-
|
|
168
|
+
# PowerShell
|
|
169
|
+
$npmPath = npm config get prefix
|
|
170
|
+
$env:PATH += ";$npmPath"
|
|
176
171
|
```
|
|
177
172
|
|
|
178
|
-
|
|
173
|
+
**Verify installation:**
|
|
179
174
|
```bash
|
|
180
|
-
|
|
175
|
+
grok --version # Should show current version
|
|
176
|
+
which grok # Should show installation path
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### ⚡ Quick Start (One-liner)
|
|
180
|
+
```bash
|
|
181
|
+
npm install -g grok-cli-hurry-mode@latest && \
|
|
182
|
+
echo 'export GROK_API_KEY=your_api_key_here' >> ~/.zshrc && \
|
|
183
|
+
source ~/.zshrc && \
|
|
184
|
+
grok --help
|
|
181
185
|
```
|
|
182
186
|
|
|
183
187
|
### Local Development
|
|
@@ -582,6 +586,103 @@ The pre-commit hook runs `npx lint-staged`, which processes `*.{ts,tsx}` files w
|
|
|
582
586
|
|
|
583
587
|
If checks fail, the commit is blocked until issues are resolved.
|
|
584
588
|
|
|
589
|
+
## 🤖 Automated Release System
|
|
590
|
+
|
|
591
|
+
**Status**: ✅ **FULLY AUTOMATED** (as of 2025-10-17)
|
|
592
|
+
|
|
593
|
+
### How It Works
|
|
594
|
+
|
|
595
|
+
Every push to the `main` branch automatically:
|
|
596
|
+
|
|
597
|
+
1. **🔄 Bumps version** (patch increment: 1.0.X → 1.0.X+1)
|
|
598
|
+
2. **📝 Updates README** with new version number
|
|
599
|
+
3. **🏗️ Builds the project** with fresh dependencies
|
|
600
|
+
4. **📦 Publishes to NPM** at https://www.npmjs.com/package/grok-cli-hurry-mode
|
|
601
|
+
5. **🏷️ Creates git tag** (e.g., `v1.0.87`)
|
|
602
|
+
|
|
603
|
+
**⏱️ Timeline**: ~3-5 minutes from push to NPM availability
|
|
604
|
+
|
|
605
|
+
### What You Need to Do
|
|
606
|
+
|
|
607
|
+
**Nothing!** Just push your changes to main:
|
|
608
|
+
|
|
609
|
+
```bash
|
|
610
|
+
git add .
|
|
611
|
+
git commit -m "your feature/fix"
|
|
612
|
+
git push origin main
|
|
613
|
+
# ✨ Automation handles the rest!
|
|
614
|
+
```
|
|
615
|
+
|
|
616
|
+
### 🚨 Critical Dependencies
|
|
617
|
+
|
|
618
|
+
**⚠️ DO NOT MODIFY without understanding the full impact:**
|
|
619
|
+
|
|
620
|
+
#### GitHub Secrets (Required)
|
|
621
|
+
- **`PAT_TOKEN`**: Personal Access Token with repo permissions (for git operations)
|
|
622
|
+
- **`NPM_TOKEN`**: NPM Automation token from `grok_cli` account (for publishing)
|
|
623
|
+
|
|
624
|
+
#### Package Configuration (Sacred Settings)
|
|
625
|
+
```json
|
|
626
|
+
{
|
|
627
|
+
"name": "grok-cli-hurry-mode", // ⚠️ NEVER change - breaks publishing
|
|
628
|
+
"publishConfig": {
|
|
629
|
+
"access": "public" // ⚠️ Must NOT include registry override
|
|
630
|
+
}
|
|
631
|
+
}
|
|
632
|
+
```
|
|
633
|
+
|
|
634
|
+
#### Workflow File (`.github/workflows/release.yml`)
|
|
635
|
+
**⚠️ This took multiple attempts to get working - modify with extreme caution!**
|
|
636
|
+
|
|
637
|
+
### 🔧 Manual Release (Emergency Only)
|
|
638
|
+
|
|
639
|
+
If automation fails and you need to publish immediately:
|
|
640
|
+
|
|
641
|
+
```bash
|
|
642
|
+
# 1. Bump version locally
|
|
643
|
+
npm version patch # or minor/major
|
|
644
|
+
|
|
645
|
+
# 2. Test build
|
|
646
|
+
npm run build
|
|
647
|
+
npm run local # Test CLI locally
|
|
648
|
+
|
|
649
|
+
# 3. Manual publish
|
|
650
|
+
npm publish --access public
|
|
651
|
+
|
|
652
|
+
# 4. Push changes
|
|
653
|
+
git push origin main --follow-tags
|
|
654
|
+
|
|
655
|
+
# 5. Fix automation before next release!
|
|
656
|
+
```
|
|
657
|
+
|
|
658
|
+
### 📊 Monitoring
|
|
659
|
+
|
|
660
|
+
- **GitHub Actions**: https://github.com/hinetapora/grok-cli-hurry-mode/actions
|
|
661
|
+
- **NPM Package**: https://www.npmjs.com/package/grok-cli-hurry-mode
|
|
662
|
+
- **Release History**: Check git tags or NPM version history
|
|
663
|
+
|
|
664
|
+
### 🛠️ Troubleshooting
|
|
665
|
+
|
|
666
|
+
If automation fails:
|
|
667
|
+
|
|
668
|
+
1. **Check GitHub Actions logs** for specific errors
|
|
669
|
+
2. **Verify secrets** (`PAT_TOKEN`, `NPM_TOKEN`) haven't expired
|
|
670
|
+
3. **Confirm package.json** name hasn't been modified
|
|
671
|
+
4. **See documentation**: `.agent/sop/npm-publishing-troubleshooting.md`
|
|
672
|
+
|
|
673
|
+
**Common Issues**:
|
|
674
|
+
- **Build fails**: Usually Rollup dependency cache (auto-fixed with clean install)
|
|
675
|
+
- **Publish fails**: Check NPM token is valid and from correct account
|
|
676
|
+
- **Git push fails**: Verify PAT_TOKEN has repo permissions
|
|
677
|
+
|
|
678
|
+
### 📚 Related Documentation
|
|
679
|
+
|
|
680
|
+
- **📋 Release Management**: `.agent/sop/release-management.md`
|
|
681
|
+
- **🚨 Incident History**: `.agent/incidents/incident-npm-publish-failure.md`
|
|
682
|
+
- **🔧 Troubleshooting**: `.agent/sop/npm-publishing-troubleshooting.md`
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
585
686
|
## Architecture
|
|
586
687
|
|
|
587
688
|
- **Agent**: Core command processing and execution logic
|
|
@@ -599,6 +700,54 @@ This project is based on [grok-cli](https://github.com/superagent-ai/grok-cli) b
|
|
|
599
700
|
|
|
600
701
|
## Troubleshooting
|
|
601
702
|
|
|
703
|
+
### Installation Issues
|
|
704
|
+
|
|
705
|
+
**🚨 "Command not found: grok"**
|
|
706
|
+
```bash
|
|
707
|
+
# Check if grok is installed
|
|
708
|
+
npm list -g grok-cli-hurry-mode
|
|
709
|
+
|
|
710
|
+
# If installed but not in PATH, add npm global bin to PATH:
|
|
711
|
+
echo 'export PATH="$(npm config get prefix)/bin:$PATH"' >> ~/.zshrc
|
|
712
|
+
source ~/.zshrc
|
|
713
|
+
|
|
714
|
+
# Verify it works
|
|
715
|
+
grok --version
|
|
716
|
+
```
|
|
717
|
+
|
|
718
|
+
**🚨 "Permission denied" during installation**
|
|
719
|
+
```bash
|
|
720
|
+
# Option 1: Use npx (no installation needed)
|
|
721
|
+
npx grok-cli-hurry-mode@latest
|
|
722
|
+
|
|
723
|
+
# Option 2: Fix npm permissions (macOS/Linux)
|
|
724
|
+
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
|
|
725
|
+
|
|
726
|
+
# Option 3: Configure npm to use different directory
|
|
727
|
+
mkdir ~/.npm-global
|
|
728
|
+
npm config set prefix '~/.npm-global'
|
|
729
|
+
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.zshrc
|
|
730
|
+
source ~/.zshrc
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
**🚨 "Cannot find module" errors**
|
|
734
|
+
```bash
|
|
735
|
+
# Clear npm cache and reinstall
|
|
736
|
+
npm cache clean --force
|
|
737
|
+
npm uninstall -g grok-cli-hurry-mode
|
|
738
|
+
npm install -g grok-cli-hurry-mode@latest
|
|
739
|
+
```
|
|
740
|
+
|
|
741
|
+
**🚨 Outdated version**
|
|
742
|
+
```bash
|
|
743
|
+
# Check current version
|
|
744
|
+
grok --version
|
|
745
|
+
npm view grok-cli-hurry-mode version
|
|
746
|
+
|
|
747
|
+
# Update to latest
|
|
748
|
+
npm update -g grok-cli-hurry-mode@latest
|
|
749
|
+
```
|
|
750
|
+
|
|
602
751
|
### Tool Execution Errors
|
|
603
752
|
|
|
604
753
|
If you encounter errors like `fs.readFile is not a function` or `fs.stat is not a function` when using file operations:
|
|
@@ -610,9 +759,34 @@ If you encounter errors like `fs.readFile is not a function` or `fs.stat is not
|
|
|
610
759
|
|
|
611
760
|
This issue is being tracked and the fallbacks ensure the CLI remains functional.
|
|
612
761
|
|
|
762
|
+
### Runtime Issues
|
|
763
|
+
|
|
764
|
+
**🚨 API Key errors**
|
|
765
|
+
```bash
|
|
766
|
+
# Set your API key (replace with your actual key)
|
|
767
|
+
export GROK_API_KEY=your_actual_api_key_here
|
|
768
|
+
|
|
769
|
+
# Or add to your shell profile permanently
|
|
770
|
+
echo 'export GROK_API_KEY=your_actual_api_key_here' >> ~/.zshrc
|
|
771
|
+
source ~/.zshrc
|
|
772
|
+
|
|
773
|
+
# Verify it's set
|
|
774
|
+
echo $GROK_API_KEY
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
**🚨 Network/connectivity issues**
|
|
778
|
+
```bash
|
|
779
|
+
# Test with verbose output
|
|
780
|
+
grok --verbose "test message"
|
|
781
|
+
|
|
782
|
+
# Check API endpoint connectivity
|
|
783
|
+
curl -I https://api.x.ai/v1/models
|
|
784
|
+
```
|
|
785
|
+
|
|
613
786
|
### Common Issues
|
|
614
787
|
|
|
615
788
|
- **File operations fail**: Check that the file path exists and is accessible
|
|
616
789
|
- **Bash commands fail**: Ensure you have the necessary permissions
|
|
617
790
|
- **Tool timeouts**: Complex operations may take time; the spinner indicates progress
|
|
791
|
+
- **Slow responses**: Try a different model with `grok --model grok-code-fast-1`
|
|
618
792
|
|
package/dist/index.d.ts
ADDED