{"id":50082468,"url":"https://github.com/rajkaria/0gkit","last_synced_at":"2026-05-26T01:01:14.723Z","repository":{"id":359146139,"uuid":"1243446309","full_name":"rajkaria/0gkit","owner":"rajkaria","description":"0gkit — the neutral 0G builder toolkit: modular npm packages for Storage, Compute, DA \u0026 TEE attestation, plus a 0g CLI, MCP server, and React hooks.","archived":false,"fork":false,"pushed_at":"2026-05-21T14:25:45.000Z","size":603,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-21T17:51:46.166Z","etag":null,"topics":["0g","0g-labs","ai-inference","cli","data-availability","decentralized-storage","mcp","sdk","tee-attestation","typescript","web3"],"latest_commit_sha":null,"homepage":"https://github.com/rajkaria/0G-ai-kit","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rajkaria.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-19T10:53:30.000Z","updated_at":"2026-05-21T14:13:36.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/rajkaria/0gkit","commit_stats":null,"previous_names":["rajkaria/0g-ai-kit","rajkaria/0gkit"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/rajkaria/0gkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajkaria%2F0gkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajkaria%2F0gkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajkaria%2F0gkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajkaria%2F0gkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rajkaria","download_url":"https://codeload.github.com/rajkaria/0gkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rajkaria%2F0gkit/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33352371,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["0g","0g-labs","ai-inference","cli","data-availability","decentralized-storage","mcp","sdk","tee-attestation","typescript","web3"],"created_at":"2026-05-22T16:01:09.400Z","updated_at":"2026-05-26T01:01:14.693Z","avatar_url":"https://github.com/rajkaria.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 0gkit — the neutral 0G builder toolkit\n\n**Website:** [**0gkit.com**](https://0gkit.com) · **Docs:** [docs.0gkit.com](https://docs.0gkit.com) · **Playground:** [playground.0gkit.com](https://playground.0gkit.com)\n\n[![CI](https://github.com/rajkaria/0gkit/actions/workflows/ci.yml/badge.svg)](https://github.com/rajkaria/0gkit/actions/workflows/ci.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](./LICENSE)\n[![npm](https://img.shields.io/npm/v/create-0gkit-app?label=create-0gkit-app)](https://www.npmjs.com/package/create-0gkit-app)\n[![v1.0.0](https://img.shields.io/badge/release-v1.0.0-22d3ee.svg)](https://github.com/rajkaria/0gkit/releases/tag/v1.0.0)\n\n**0gkit** is the fastest way to build on the [0G](https://0g.ai) network —\nStorage, Compute (inference), Data Availability, TEE Attestation, and chain\nhelpers — as 18 small, independently-installable npm packages, plus a `0g`\nCLI, an MCP server for AI agents, and React hooks.\n\nIt is **neutral and standalone**: no package depends on any application\nframework or protocol. Install only what you need.\n\n\u003e Packages publish under the `@foundryprotocol/0gkit-*` npm scope. The code is\n\u003e protocol-neutral; the scope is just the publishing org. The CLI binary is `0g`.\n\n## Quick start\n\n```bash\nnpm create 0gkit-app@latest my-app\ncd my-app\n0g dev          # in another terminal — starts the local devnet\nnpm run dev\n```\n\nThat is the whole thing. `create-0gkit-app` clones a template, writes a\nnetwork-aware `.env.example`, runs install, and `git init`s — so the only\nthing left for you is `cd` + run.\n\nFive templates ship today: `storage-app`, `inference-app`,\n`attestation-verify`, `mcp-agent`, `react-app`. Pick one with\n`--template \u003cname\u003e` or interactively at the prompt.\n\n### Or install primitives directly\n\n```bash\n# One primitive at a time — install only what you use\nnpm i @foundryprotocol/0gkit-storage   # upload / download / Merkle root\nnpm i @foundryprotocol/0gkit-compute   # provider discovery + inference\nnpm i @foundryprotocol/0gkit-da        # data availability publish / verify\nnpm i @foundryprotocol/0gkit-attestation\nnpm i @foundryprotocol/0gkit-chain     # explorer URLs, balance, receipts, faucet\nnpm i @foundryprotocol/0gkit-contracts # typed contract clients + Foundry codegen\n\n# The CLI — zero install\nnpx @foundryprotocol/0gkit-cli init\nnpx @foundryprotocol/0gkit-cli doctor\n\n# React hooks\nnpm i @foundryprotocol/0gkit-react\n```\n\n```ts\nimport { fromEnv } from \"@foundryprotocol/0gkit-wallet\";\nimport { Storage } from \"@foundryprotocol/0gkit-storage\";\n\n// fromEnv() auto-picks: KMS_KEY_ID \u003e KEY_FILE+KEY_PASSWORD \u003e PRIVATE_KEY\nconst signer = await fromEnv();\nconst storage = new Storage({ network: \"galileo\", signer });\nconst { root, tx } = await storage.upload(new TextEncoder().encode(\"gm\"));\nconst bytes = await storage.download(root);\n\n// \"What will this cost?\" — every primitive answers, every write supports dry-run\nconst est = await storage.estimate(new TextEncoder().encode(\"gm\"));\nconst dryRun = await storage.upload(new TextEncoder().encode(\"gm\"), { dryRun: true });\n```\n\n```bash\n# Or from the CLI\n0g estimate storage ./README.md\n0g storage put ./README.md --dry-run\n```\n\n## Packages\n\n| Package                                                                | What it does                                                                                                    |\n| ---------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------- |\n| [`@foundryprotocol/0gkit-core`](./packages/0gkit-core)                 | Network presets, viem client factory, `Receipt`, `ZeroGError` taxonomy. The shared base.                        |\n| [`@foundryprotocol/0gkit-chain`](./packages/0gkit-chain)               | Explorer URLs, balance, `waitForReceipt`, testnet faucet.                                                       |\n| [`@foundryprotocol/0gkit-storage`](./packages/0gkit-storage)           | `upload` / `download` / `computeRoot` / `exists`.                                                               |\n| [`@foundryprotocol/0gkit-compute`](./packages/0gkit-compute)           | Provider discovery, broker inference, OpenAI-compatible shim.                                                   |\n| [`@foundryprotocol/0gkit-da`](./packages/0gkit-da)                     | Data Availability publish + verify (canonical digest).                                                          |\n| [`@foundryprotocol/0gkit-attestation`](./packages/0gkit-attestation)   | TEE attestation parse / sign / recover / verify / report.                                                       |\n| [`@foundryprotocol/0gkit-contracts`](./packages/0gkit-contracts)       | Typed contract clients — 5 standard 0G contracts + `forge build` → typed TS codegen.                            |\n| [`@foundryprotocol/0gkit-testing`](./packages/0gkit-testing)           | Vitest mocks, fixtures, `testWallet`, `setupLocalDevnet`, four 0G-aware matchers.                               |\n| [`@foundryprotocol/0gkit-indexer`](./packages/0gkit-indexer)           | Reorg-safe event subscriptions on 0G (memory/sqlite/redis cursors).                                             |\n| [`@foundryprotocol/0gkit-wallet`](./packages/0gkit-wallet)             | Node wallet loaders: `fromPrivateKey`, `fromFile`, `fromEnv`, `fromKMS`, SIWE.                                  |\n| [`@foundryprotocol/0gkit-wallet-react`](./packages/0gkit-wallet-react) | React + wagmi v2: `ZeroGWalletProvider`, `useWallet`, `useConnect`, `useSwitchNetwork`.                         |\n| [`@foundryprotocol/0gkit-cli`](./packages/0gkit-cli)                   | The `0g` command line — `init`, `doctor`, `chain`, `storage`, `infer`, `da`, `attest`, `contracts`, `estimate`. |\n| [`@foundryprotocol/0gkit-mcp`](./packages/0gkit-mcp)                   | Every primitive as an MCP tool for Claude / Cursor / Cline / any agent.                                         |\n| [`@foundryprotocol/0gkit-react`](./packages/0gkit-react)               | `useUpload` / `useDownload` / `useInference` / `useAttestation` / `useEvent` / `useLogs`.                       |\n\n## Documentation\n\nFull documentation — every package explained in detail, with examples and\nguidance on **what / when / where** to use each — lives in the docs site:\n\n```bash\npnpm --filter @foundryprotocol/0gkit-docs dev   # http://localhost:3000\n```\n\nIt is also deployable to Vercel from `apps/docs`.\n\n## Templates\n\nReady-to-clone starter projects under [`templates/`](./templates):\n\n| Template             | Use case                                                         |\n| -------------------- | ---------------------------------------------------------------- |\n| `storage-app`        | Upload + download a file, print the Merkle root + tx receipt     |\n| `inference-app`      | Discover a provider and run an OpenAI-compatible chat completion |\n| `attestation-verify` | Parse + verify a TEE attestation report (pure crypto)            |\n| `mcp-agent`          | Wire `@foundryprotocol/0gkit-mcp` into an agent runtime          |\n| `react-app`          | Next.js app using the React hooks                                |\n\n## Repository layout\n\n```\npackages/0gkit-*   the published library packages\napps/playground    zero-setup web console (private)\napps/docs          the documentation site (private, Vercel-deployable)\ntemplates/         degit-able starter projects\n```\n\n## Contributing\n\nSee [CONTRIBUTING.md](./CONTRIBUTING.md). Every change to a published package\nneeds a changeset (`pnpm changeset`). CI must be green.\n\n## License\n\nMIT — see [LICENSE](./LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajkaria%2F0gkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frajkaria%2F0gkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frajkaria%2F0gkit/lists"}