{"_id":"@apekshik/grok-cli-apek","_rev":"2-8b048d6f2a5671d8f00f907c3c504b03","name":"@apekshik/grok-cli-apek","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.5":{"name":"@apekshik/grok-cli-apek","version":"0.1.5","keywords":["grok","cli","ai","xai","assistant","tool"],"author":{"name":"apekshik"},"license":"Apache-2.0","_id":"@apekshik/grok-cli-apek@0.1.5","maintainers":[{"name":"apekshik","email":"apekshik@gmail.com"}],"homepage":"https://github.com/apekshik/grok-cli-apek#readme","bugs":{"url":"https://github.com/apekshik/grok-cli-apek/issues"},"bin":{"grok":"bundle/gemini.js"},"dist":{"shasum":"d8cf9e98bb50b92f76d1add6300064af14c3a69e","tarball":"https://registry.npmjs.org/@apekshik/grok-cli-apek/-/grok-cli-apek-0.1.5.tgz","fileCount":12,"integrity":"sha512-iI7N/yvrUHJlmZEPRXAXnKjBC6ygLhWa3DikTzVCkZzTE3Z4X5F0Icn6MoJEiutFdh9VZGMxthLxVwFXoWAZqQ==","signatures":[{"sig":"MEUCIQDQfHl01/AGVLsUZcrsa53fenVGrF7H7Yos/C9qRxf/cgIgfHZZGeKaNRdN9pWaQz5dzVkfhxBpdGblUtPdSJ7pdAU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10786983},"type":"module","config":{"sandboxImageUri":"us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.4"},"engines":{"node":">=18.0.0"},"gitHead":"86d92be67598f7131adf3b68efc926ca184d7309","scripts":{"auth":"npm run auth:npm && npm run auth:docker","lint":"eslint . --ext .ts,.tsx && eslint integration-tests","test":"npm run test --workspaces","build":"node scripts/build.js","clean":"node scripts/clean.js","debug":"cross-env DEBUG=1 node --inspect-brk scripts/start.js","start":"node scripts/start.js","bundle":"npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js","format":"prettier --write .","lint:ci":"eslint . --ext .ts,.tsx --max-warnings 0 && eslint integration-tests --max-warnings 0","prepare":"npm run bundle","test:ci":"npm run test:ci --workspaces --if-present","auth:npm":"npx google-artifactregistry-auth","generate":"node scripts/generate-git-commit-info.js","lint:fix":"eslint . --fix && eslint integration-tests --fix","test:e2e":"npm run test:integration:sandbox:none -- --verbose --keep-output","build:all":"npm run build && npm run build:sandbox","build:cli":"npm run build --workspace packages/cli","preflight":"npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci","start:gcp":"concurrently --raw --kill-others \"npm run telemetry -- --target=gcp\" \"npm start\"","telemetry":"node scripts/telemetry.js","typecheck":"npm run typecheck --workspaces --if-present","build:core":"npm run build --workspace packages/core","auth:docker":"gcloud auth configure-docker us-west1-docker.pkg.dev","publish:npm":"npm publish --workspaces ${NPM_PUBLISH_TAG:+--tag=$NPM_PUBLISH_TAG} ${NPM_DRY_RUN:+--dry-run}","build:sandbox":"node scripts/build_sandbox.js","build:packages":"npm run build:core && npm run build:cli","prerelease:dev":"npm run prerelease:version --workspaces && npm run prerelease:deps --workspaces","publish:release":"npm run build:packages && npm run prepare:cli-packagejson && npm run build:sandbox:fast && npm run publish:sandbox && npm run publish:npm","publish:sandbox":"node scripts/publish-sandbox.js","build:sandbox:fast":"node scripts/build_sandbox.js --skip-npm-install-build","test:integration:all":"npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman","prepare:cli-packagejson":"node scripts/prepare-cli-packagejson.js","test:integration:sandbox:none":"GEMINI_SANDBOX=false node integration-tests/run-tests.js","test:integration:sandbox:docker":"GEMINI_SANDBOX=docker node integration-tests/run-tests.js","test:integration:sandbox:podman":"GEMINI_SANDBOX=podman node integration-tests/run-tests.js"},"_npmUser":{"name":"apekshik","actor":{"name":"apekshik","type":"user","email":"apekshik@gmail.com"},"email":"apekshik@gmail.com"},"repository":{"url":"git+https://github.com/apekshik/grok-cli-apek.git","type":"git"},"workspaces":["packages/*"],"_npmVersion":"10.2.4","description":"A command-line AI workflow tool powered by xAI's Grok","directories":{},"_nodeVersion":"18.19.1","dependencies":{"@google/gemini-cli":"^0.1.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"glob":"^10.4.5","json":"^11.0.0","memfs":"^4.17.2","yargs":"^17.7.2","eslint":"^9.24.0","lodash":"^4.17.21","esbuild":"^0.25.0","globals":"^16.0.0","prettier":"^3.5.3","cross-env":"^7.0.3","concurrently":"^9.2.0","@types/minimatch":"^5.1.2","@types/micromatch":"^4.0.9","@types/mime-types":"^2.1.4","typescript-eslint":"^8.30.1","@vitest/coverage-v8":"^3.1.1","eslint-plugin-react":"^7.37.5","react-devtools-core":"^4.28.5","eslint-plugin-import":"^2.31.0","eslint-config-prettier":"^10.1.2","eslint-plugin-react-hooks":"^5.2.0","eslint-plugin-license-header":"^0.8.0"},"_npmOperationalInternal":{"tmp":"tmp/grok-cli-apek_0.1.5_1750994189995_0.008694324888536498","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@apekshik/grok-cli-apek","version":"0.1.6","engines":{"node":">=18.0.0"},"type":"module","workspaces":["packages/*"],"repository":{"type":"git","url":"git+https://github.com/apekshik/grok-cli-apek.git"},"keywords":["grok","cli","ai","xai","assistant","tool"],"author":{"name":"apekshik"},"license":"Apache-2.0","description":"A command-line AI workflow tool powered by xAI's Grok","publishConfig":{"access":"public"},"config":{"sandboxImageUri":"us-docker.pkg.dev/gemini-code-dev/gemini-cli/sandbox:0.1.4"},"scripts":{"generate":"node scripts/generate-git-commit-info.js","build":"node scripts/build.js","build:sandbox":"node scripts/build_sandbox.js","build:all":"npm run build && npm run build:sandbox","clean":"node scripts/clean.js","prepare":"npm run bundle","test":"npm run test --workspaces","test:ci":"npm run test:ci --workspaces --if-present","test:e2e":"npm run test:integration:sandbox:none -- --verbose --keep-output","test:integration:all":"npm run test:integration:sandbox:none && npm run test:integration:sandbox:docker && npm run test:integration:sandbox:podman","test:integration:sandbox:none":"GEMINI_SANDBOX=false node integration-tests/run-tests.js","test:integration:sandbox:docker":"GEMINI_SANDBOX=docker node integration-tests/run-tests.js","test:integration:sandbox:podman":"GEMINI_SANDBOX=podman node integration-tests/run-tests.js","start":"node scripts/start.js","debug":"cross-env DEBUG=1 node --inspect-brk scripts/start.js","lint:fix":"eslint . --fix && eslint integration-tests --fix","lint":"eslint . --ext .ts,.tsx && eslint integration-tests","lint:ci":"eslint . --ext .ts,.tsx --max-warnings 0 && eslint integration-tests --max-warnings 0","typecheck":"npm run typecheck --workspaces --if-present","format":"prettier --write .","preflight":"npm run clean && npm ci && npm run format && npm run lint:ci && npm run build && npm run typecheck && npm run test:ci","auth:npm":"npx google-artifactregistry-auth","auth:docker":"gcloud auth configure-docker us-west1-docker.pkg.dev","auth":"npm run auth:npm && npm run auth:docker","prerelease:dev":"npm run prerelease:version --workspaces && npm run prerelease:deps --workspaces","bundle":"npm run generate && node esbuild.config.js && node scripts/copy_bundle_assets.js","build:cli":"npm run build --workspace packages/cli","build:core":"npm run build --workspace packages/core","build:packages":"npm run build:core && npm run build:cli","build:sandbox:fast":"node scripts/build_sandbox.js --skip-npm-install-build","prepare:cli-packagejson":"node scripts/prepare-cli-packagejson.js","publish:sandbox":"node scripts/publish-sandbox.js","publish:npm":"npm publish --workspaces ${NPM_PUBLISH_TAG:+--tag=$NPM_PUBLISH_TAG} ${NPM_DRY_RUN:+--dry-run}","publish:release":"npm run build:packages && npm run prepare:cli-packagejson && npm run build:sandbox:fast && npm run publish:sandbox && npm run publish:npm","telemetry":"node scripts/telemetry.js","start:gcp":"concurrently --raw --kill-others \"npm run telemetry -- --target=gcp\" \"npm start\""},"bin":{"grok":"bundle/gemini.js"},"devDependencies":{"@types/micromatch":"^4.0.9","@types/mime-types":"^2.1.4","@types/minimatch":"^5.1.2","@vitest/coverage-v8":"^3.1.1","concurrently":"^9.2.0","cross-env":"^7.0.3","esbuild":"^0.25.0","eslint":"^9.24.0","eslint-config-prettier":"^10.1.2","eslint-plugin-import":"^2.31.0","eslint-plugin-license-header":"^0.8.0","eslint-plugin-react":"^7.37.5","eslint-plugin-react-hooks":"^5.2.0","glob":"^10.4.5","globals":"^16.0.0","json":"^11.0.0","lodash":"^4.17.21","memfs":"^4.17.2","prettier":"^3.5.3","react-devtools-core":"^4.28.5","typescript-eslint":"^8.30.1","yargs":"^17.7.2"},"dependencies":{"@google/gemini-cli":"^0.1.1"},"_id":"@apekshik/grok-cli-apek@0.1.6","gitHead":"86d92be67598f7131adf3b68efc926ca184d7309","bugs":{"url":"https://github.com/apekshik/grok-cli-apek/issues"},"homepage":"https://github.com/apekshik/grok-cli-apek#readme","_nodeVersion":"18.19.1","_npmVersion":"10.2.4","dist":{"integrity":"sha512-v3DUNv9Wf+qy5ZL++yi6Pc9hFaSTGnhZ5t+39EhgI0TV9pvBqDcHrp9+JuZN2cHitc1z7ZNBOVXB6vxvqgUkFA==","shasum":"5b2f6838c75feabb52f621436329d2209fb3e7cc","tarball":"https://registry.npmjs.org/@apekshik/grok-cli-apek/-/grok-cli-apek-0.1.6.tgz","fileCount":12,"unpackedSize":10787442,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQC3RXQaRqS+ZwX3rsVv51hkO7o6KKVRQ3L2GsrDO7WF0AIgaFChAQV6P4GWwDIfr1TzOEA2PXhOw4IsOjhNRMB5nl8="}]},"_npmUser":{"name":"apekshik","email":"apekshik@gmail.com","actor":{"name":"apekshik","email":"apekshik@gmail.com","type":"user"}},"directories":{},"maintainers":[{"name":"apekshik","email":"apekshik@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/grok-cli-apek_0.1.6_1750994857950_0.4691501294656475"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-27T03:16:29.900Z","modified":"2025-06-27T03:27:38.288Z","0.1.5":"2025-06-27T03:16:30.301Z","0.1.6":"2025-06-27T03:27:38.133Z"},"bugs":{"url":"https://github.com/apekshik/grok-cli-apek/issues"},"author":{"name":"apekshik"},"license":"Apache-2.0","homepage":"https://github.com/apekshik/grok-cli-apek#readme","keywords":["grok","cli","ai","xai","assistant","tool"],"repository":{"type":"git","url":"git+https://github.com/apekshik/grok-cli-apek.git"},"description":"A command-line AI workflow tool powered by xAI's Grok","maintainers":[{"name":"apekshik","email":"apekshik@gmail.com"}],"readme":"# Grok CLI\n\nA command-line AI workflow tool powered by xAI's Grok that connects to your tools, understands your code, and accelerates your workflows.\n\n![Grok CLI Screenshot](./grok-cli-screenshot.png)\n\nWith the Grok CLI you can:\n\n- Query and edit large codebases with intelligent context management for Grok's token limits\n- Generate new apps and solve complex coding problems using Grok's reasoning capabilities\n- Automate operational tasks, like querying pull requests or handling complex rebases\n- Use tools and MCP servers to connect new capabilities\n- Smart file selection that adapts to Grok's context window for optimal performance\n\n## Quickstart\n\n1. **Prerequisites:** Ensure you have [Node.js version 18](https://nodejs.org/en/download) or higher installed.\n\n2. **Install globally:**\n\n   ```bash\n   npm install -g @apekshik/grok-cli-apek\n   ```\n\n3. **Set up your xAI API Key:**\n\n   Get your API key from [xAI Console](https://console.x.ai/) and set it as an environment variable:\n\n   ```bash\n   export XAI_API_KEY=\"your-api-key-here\"\n   ```\n\n4. **Run the CLI:**\n\n   ```bash\n   grok\n   ```\n\n5. **Pick a color theme** and start chatting with Grok!\n\nYou are now ready to use the Grok CLI!\n\n## Examples\n\nOnce the CLI is running, you can start interacting with Grok from your shell.\n\nYou can start a project from a new directory:\n\n```sh\ncd new-project/\ngrok\n> Write me a Discord bot that answers questions using a FAQ.md file I will provide\n```\n\nOr work with an existing project:\n\n```sh\ngit clone https://github.com/apekshik/grok-cli-apek\ncd grok-cli-apek\ngrok\n> Give me a summary of all of the changes that went in yesterday\n```\n\n## Provider Switching\n\nThe CLI supports both Grok and Gemini providers. You can switch between them during a conversation:\n\n```bash\n# Switch to Grok (default)\n/provider grok\n\n# Switch to Grok Mini for faster responses\n/provider grok-mini\n\n# Switch to Gemini (requires GEMINI_API_KEY)\n/provider gemini\n```\n\n## Smart Context Management\n\nThe Grok CLI includes intelligent context management that automatically adapts to Grok's token limitations:\n\n- **Automatic file selection**: When reading many files, it previews them and asks Grok to select the most relevant ones\n- **Token-aware processing**: Tracks token usage and prevents API errors\n- **Graceful fallbacks**: Multiple strategies to handle large codebases effectively\n\n## Popular tasks\n\n### Explore a new codebase\n\nStart by `cd`ing into an existing or newly-cloned repository and running `grok`.\n\n```text\n> Describe the main pieces of this system's architecture.\n```\n\n```text\n> What security mechanisms are in place?\n```\n\n### Work with your existing code\n\n```text\n> Implement a first draft for GitHub issue #123.\n```\n\n```text\n> Help me migrate this codebase to the latest version of Node.js. Start with a plan.\n```\n\n### Automate your workflows\n\n```text\n> Convert all the images in this directory to png, and rename them to use dates from the exif data.\n```\n\n```text\n> Organize my PDF invoices by month of expenditure.\n```\n\n## Authentication\n\n### xAI API Key (Recommended)\n\n1. Sign up at [xAI Console](https://console.x.ai/)\n2. Generate an API key\n3. Set it as an environment variable:\n\n   ```bash\n   export XAI_API_KEY=\"your-api-key-here\"\n   ```\n\n### Alternative: Gemini API Key\n\nYou can also use Google's Gemini API by setting:\n\n```bash\nexport GEMINI_API_KEY=\"your-gemini-api-key\"\n```\n\nGet your Gemini API key from [Google AI Studio](https://aistudio.google.com/apikey).\n\n## CLI Commands\n\nAvailable slash commands:\n\n- `/help` - Show help information\n- `/provider <provider>` - Switch between grok, grok-mini, and gemini\n- `/clear` - Clear conversation history\n- `/theme` - Change color theme\n- `/memory` - Show current context files\n- `/tools` - List available tools\n\n## Features\n\n- **Context Files**: Create `GROK.md` files to provide persistent context\n- **File Operations**: Read, edit, and write files with confirmation\n- **Shell Integration**: Run shell commands with `!command`\n- **Web Search**: Built-in web search capabilities\n- **MCP Support**: Model Context Protocol for extensible tools\n\n## Installation from Source\n\n```bash\ngit clone https://github.com/apekshik/grok-cli-apek\ncd grok-cli-apek\nnpm install\nnpm run build\nnpm run bundle\nnpm link\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **API Key Issues**: Make sure `XAI_API_KEY` is set correctly\n2. **Token Limits**: The CLI automatically handles Grok's context limits with smart selection\n3. **Node.js Version**: Ensure you're using Node.js 18 or higher\n\n### Debug Mode\n\nRun with debug mode for detailed logging:\n\n```bash\ngrok --debug\n```\n\n## Contributing\n\nContributions are welcome! Please see [CONTRIBUTING.md](./CONTRIBUTING.md) for guidelines.\n\n## License\n\nApache-2.0 License - see [LICENSE](./LICENSE) for details.","readmeFilename":"README.md"}