Nightly index of the Grok / xAI integration surface of every open-source project listed in Blockchains/awesome-grokhack (forked into github.com/Blockchains). Search UI: https://blockchains.github.io/grokhack-index/ · used by the grokhack-forge composer.
A file counts as Grok/xAI surface only if it contains an anchor: api.x.ai, XAI_API_KEY, GROK_API_KEY, xai-sdk/xai_sdk, @ai-sdk/xai,
langchain-xai, ChatXAI, createXai, xai.Client, or a grok-<version> model id. For those files:
- API endpoints (
/v1/chat/completions,/v1/responses,/v1/messages,/v1/images/generations,/v1/embeddings,/v1/realtime, ...) and hosts - Models (
grok-4.6,grok-4-fast-reasoning,grok-imagine-image, ...) - Features: tool calling, streaming, structured output, live search, vision, image generation, reasoning, embeddings, voice/realtime, MCP, gRPC, OpenAI/Anthropic-compatible usage
- Auth / config env vars (
XAI_API_KEY,XAI_BASE_URL, ...) - SDK exports (TS
index.tsexports and Python__all__/public defs inside xai/grok paths), packages (npm/pypi names + versions) - Code snippets (first anchor in each source/example file, <= 24 lines, with commit-pinned URL and licence)
- Licence (SPDX from GitHub + the LICENSE file head), languages, file counts, commit SHA
data/repos/<owner>__<repo>.json— one shard per forkdata/parts.json— composable parts (repo-surface,sdk-exports,code-snippet,package)data/search-index.json— inverted index token -> part positionsdata/stats.json— totals and repos-per-endpoint/model/feature/env varrepos.json— the repo list used for the last run (from awesome-grokhackgrok-forge.json)
.github/workflows/nightly-index.yml (02:41 UTC + manual): refresh repos.json from awesome-grokhack -> optional upstream sync (needs FORK_SYNC_TOKEN)
-> indexer/grokindex.py shallow-clones each fork (--depth 1, LFS smudge off, 6 in parallel), scans, deletes each clone right after
-> gitleaks on data/ -> commit if changed. Stdlib-only Python.
python3 indexer/grokindex.py --repos repos.json --out data --jobs 6
python3 indexer/search.py "streaming tool calling typescript" --data data
python3 indexer/check.py dataCode snippets remain under their projects' licences (shown on each part); the indexer and this README are MIT.
For AI agents and builders: read
AGENTS.md(setup, commands, structure, rules),llms.txt(doc map) and the machine-readableblocks.json(schema). How all Blockchains blocks fit together: Build with Blocks · org catalogue: https://blockchains.github.io/blocks.json.
What it exports
| Export | Type | Install / access |
|---|---|---|
data/parts.json |
http | composable parts: repo-surface, sdk-exports, code-snippet, package |
data/repos/<owner>__<repo>.json |
file | one shard per fork |
indexer/search.py |
cli | python3 indexer/search.py "streaming tool calling typescript" --data data |
search UI |
web | https://blockchains.github.io/grokhack-index/ |
Minimal example (run on 2026-10-04)
git clone --depth 1 https://github.com/Blockchains/grokhack-index && cd grokhack-index
python3 indexer/search.py "streaming tool calling typescript" --data data | head
curl -s https://blockchains.github.io/grokhack-index/data/parts.json | jq '[.[] | select(.type=="package")] | .[:3]'Inputs → outputs
- In:
repos.json(file) from awesome-grokhack grok-forge.json;query(string) for search.py - Out:
parts(JSON);stats(JSON) repos per endpoint/model/feature/env var;search-index(JSON) token → part positions
Composes with
- Blockchains/awesome-grokhack: source repo list
- Blockchains/grokhack-forge: consumes parts to compose apps
- Blockchains/grok-tools-chat: parts recorded in its PARTS.md
Versioning & stability: beta. Rebuilt nightly (02:41 UTC); shards for repos dropped from awesome-grokhack are removed on the next run. Part fields are additive.
No keys are needed to search the published index. To rebuild it:
| Variable | Required | Purpose |
|---|---|---|
GH_CLONE_TOKEN |
no | Token used by indexer/grokindex.py for authenticated clones (higher rate limits) |
FORK_SYNC_TOKEN (repo secret) |
no | Used by the nightly workflow as GH_TOKEN when set |
Issues and pull requests are welcome. Please read the contributing guide, code of conduct and security policy first.
Built by Blockchain Lab — blockchainlab.com