{"id":26052661,"url":"https://github.com/evex-dev/xrpc-hono","last_synced_at":"2026-04-22T10:33:07.826Z","repository":{"id":270459257,"uuid":"910448321","full_name":"evex-dev/xrpc-hono","owner":"evex-dev","description":null,"archived":false,"fork":false,"pushed_at":"2025-09-24T20:28:40.000Z","size":130,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-25T18:28:33.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://jsr.io/@evex/xrpc-hono","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/evex-dev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-31T09:52:45.000Z","updated_at":"2025-09-24T20:28:44.000Z","dependencies_parsed_at":"2025-03-08T06:41:39.826Z","dependency_job_id":"478a00db-f7c6-4d90-8e54-1688e28b0fc4","html_url":"https://github.com/evex-dev/xrpc-hono","commit_stats":null,"previous_names":["evex-dev/xrpc-hono"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/evex-dev/xrpc-hono","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fxrpc-hono","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fxrpc-hono/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fxrpc-hono/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fxrpc-hono/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evex-dev","download_url":"https://codeload.github.com/evex-dev/xrpc-hono/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evex-dev%2Fxrpc-hono/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32132383,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T08:34:57.708Z","status":"ssl_error","status_checked_at":"2026-04-22T08:34:55.583Z","response_time":58,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2025-03-08T06:41:37.744Z","updated_at":"2026-04-22T10:33:07.821Z","avatar_url":"https://github.com/evex-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xrpc-hono\n\nTypeScript library for implementing atproto HTTP API services with Hono and Lexicon schema validation.\n\n[![NPM](https://img.shields.io/npm/v/@evex-dev/xrpc-hono)](https://www.npmjs.com/package/@evex-dev/xrpc-hono)\n\n## Installation\n\nInstall from npm:\n\n```sh\nnpm install @evex-dev/xrpc-hono\n# or\npnpm add @evex-dev/xrpc-hono\n```\n\n## CLI\n\nA small CLI is included for generating server bindings from Lexicon files.\n\n```sh\n# generate server files from lexicon JSON\ngen-xrpc-hono ./src/lexicons/ ./lexicons/io/example/*.json\n```\n\n## Usage\n\n### With generated server bindings\n\n```ts\nimport { createServer } from './src/lexicons'\nimport { Hono } from 'hono'\n\ntype Env = { Bindings: {}; Variables: {} }\n\nconst xrpc = createServer\u003cEnv\u003e()\n\nxrpc.io.example.ping(async ({ auth, params, input, c }) =\u003e {\n  return {\n    encoding: 'application/json',\n    body: { pong: true },\n  }\n})\n\nconst app = new Hono\u003cEnv\u003e()\napp.route('/', xrpc.createApp())\nexport default app\n```\n\n### Without generation (runtime registration)\n\n```ts\nimport type { LexiconDoc } from '@atproto/lexicon'\nimport { Hono } from 'hono'\nimport { createXRPCHono } from '@evex-dev/xrpc-hono'\n\nconst lexicons: LexiconDoc[] = [\n  {\n    lexicon: 1,\n    id: 'io.example.ping',\n    defs: {\n      main: {\n        type: 'query',\n        parameters: { type: 'params', properties: { message: { type: 'string' } } },\n        output: { encoding: 'application/json' },\n      },\n    },\n  },\n]\n\ntype Env = { Bindings: {}; Variables: {} }\n\nconst app = new Hono\u003cEnv\u003e()\nconst xrpc = createXRPCHono\u003cEnv\u003e(lexicons)\n\nxrpc.addMethod('io.example.ping', async ({ auth, params, input, c }) =\u003e ({\n  encoding: 'application/json',\n  body: { pong: true },\n}))\n\n// With auth handler\nxrpc.addMethod('io.example.ping', {\n  auth: async ({ ctx }) =\u003e ({ credentials: {}, artifacts: {} }),\n  handler: async ({ auth, params, input, c }) =\u003e ({\n    encoding: 'application/json',\n    body: { pong: true },\n  }),\n})\n\napp.route('/', xrpc.createApp())\nexport default app\n```\n\n## License\n\nMIT — see the repository root LICENCE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevex-dev%2Fxrpc-hono","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevex-dev%2Fxrpc-hono","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevex-dev%2Fxrpc-hono/lists"}