Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grokhack-index

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.

What is extracted (from real file contents, per repo)

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.ts exports 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

Files

  • data/repos/<owner>__<repo>.json — one shard per fork
  • data/parts.json — composable parts (repo-surface, sdk-exports, code-snippet, package)
  • data/search-index.json — inverted index token -> part positions
  • data/stats.json — totals and repos-per-endpoint/model/feature/env var
  • repos.json — the repo list used for the last run (from awesome-grokhack grok-forge.json)

How it runs

.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 data

Code snippets remain under their projects' licences (shown on each part); the indexer and this README are MIT.

Use as a building block

For AI agents and builders: read AGENTS.md (setup, commands, structure, rules), llms.txt (doc map) and the machine-readable blocks.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

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.

Configuration

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

Contributing

Issues and pull requests are welcome. Please read the contributing guide, code of conduct and security policy first.


Built by Blockchain Lab — blockchainlab.com

About

Nightly index of the Grok/xAI integration surface across awesome-grokhack forks

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages