{"id":48089720,"url":"https://github.com/oxhq/oxcribe","last_synced_at":"2026-04-23T20:01:21.014Z","repository":{"id":346917506,"uuid":"1192156838","full_name":"oxhq/oxcribe","owner":"oxhq","description":"Runtime-first Laravel package that enriches routes with Oxinfer static analysis","archived":false,"fork":false,"pushed_at":"2026-04-15T03:38:42.000Z","size":306,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-15T05:25:32.507Z","etag":null,"topics":["api-documentation","laravel","openapi","php","static-analysis"],"latest_commit_sha":null,"homepage":"https://github.com/oxhq/oxcribe","language":"PHP","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/oxhq.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T00:15:24.000Z","updated_at":"2026-04-15T03:38:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/oxhq/oxcribe","commit_stats":null,"previous_names":["oxhq/oxcribe"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/oxhq/oxcribe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Foxcribe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Foxcribe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Foxcribe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Foxcribe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxhq","download_url":"https://codeload.github.com/oxhq/oxcribe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxhq%2Foxcribe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32196155,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-23T15:28:30.493Z","status":"ssl_error","status_checked_at":"2026-04-23T15:28:29.972Z","response_time":53,"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":["api-documentation","laravel","openapi","php","static-analysis"],"created_at":"2026-04-04T15:29:04.402Z","updated_at":"2026-04-23T20:01:21.003Z","avatar_url":"https://github.com/oxhq.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Oxcribe\n\n`Oxcribe` is a runtime-first Laravel package for generating and publishing API docs from the routes, middleware, bindings, and responses your app actually serves.\n\nIt boots Laravel, captures the real route graph, sends a strict `AnalysisRequest` to `oxinfer`, and merges runtime truth with static analysis before emitting OpenAPI and docs payloads.\n\n## Status\n\n`v0.1.4` is the current public preview release of `oxcribe`.\n\nThis release is aimed at Laravel teams that already ship APIs and want accurate docs without hand-maintained OpenAPI files. It is ready for real-world preview use on Laravel API projects, but it should still be treated as an early release: validate the output on your own routes before rolling it into a production docs workflow.\n\n## Why Oxcribe\n\n- use Laravel runtime as the source of truth for routes, middleware, guards, and bindings\n- enrich runtime truth with `oxinfer` static analysis for request fields, resources, examples, and response overlays\n- publish the same normalized docs payload to a local viewer or to `oxcloud`\n\nThe intended launch path is simple:\n\n1. Install `oxcribe` inside the Laravel app.\n2. Install or point to an `oxinfer` binary.\n3. Issue one project-scoped publish token from Oxcribe Cloud.\n4. Run `php artisan oxcribe:doctor`.\n5. Run `php artisan oxcribe:publish`.\n6. Open the hosted docs, explorer, and changelog for that version.\n\n## What It Owns\n\n- boots Laravel and snapshots real routes, middleware, bindings and action references\n- keeps runtime auth/security as the source of truth for OpenAPI `security`\n- merges static controller analysis, resources, request/response overlays and authorization hints from `oxinfer`\n- exports an OpenAPI document with `x-oxcribe.*` metadata for runtime and static provenance\n\n## Requirements\n\n- PHP `8.2+`\n- Laravel `10`, `11`, `12` or `13`\n- a local `oxinfer` binary available on `PATH`, placed at `bin/oxinfer` inside the Laravel app, or configured in `config/oxcribe.php`\n\n`oxinfer` is the Rust analysis engine behind `oxcribe`. Build it like this:\n\n```bash\ncargo build --locked --release\ncargo test --locked\n```\n\nIf `oxinfer` is not on `PATH`, either place it at `bin/oxinfer` in the Laravel app or point `oxcribe.oxinfer.binary` to the built binary.\n\n## Install\n\n```bash\ncomposer require oxhq/oxcribe\nphp artisan vendor:publish --tag=oxcribe-config\n```\n\nIf you do not already have `oxinfer`, install the matching release binary directly from GitHub:\n\n```bash\nphp artisan oxcribe:install-binary v0.1.4\n```\n\nThat command detects the local OS and architecture, downloads the release asset from `oxhq/oxinfer`, verifies its SHA-256 checksum, and installs it into the app-local binary path that `oxcribe` already resolves.\n\n## Minimal Config\n\n```php\n// config/oxcribe.php\nreturn [\n    'oxinfer' =\u003e [\n        'binary' =\u003e env('OXINFER_BINARY', 'oxinfer'),\n        'working_directory' =\u003e env('OXINFER_WORKING_DIRECTORY'),\n        'timeout' =\u003e (int) env('OXINFER_TIMEOUT', 120),\n    ],\n];\n```\n\n## Commands\n\n```bash\nphp artisan oxcribe:analyze\nphp artisan oxcribe:export-openapi\nphp artisan oxcribe:publish\nphp artisan oxcribe:doctor\nphp artisan oxcribe:install-binary v0.1.4\n```\n\nBoth commands support `--write=/absolute/path.json` and `--pretty`.\n`oxcribe:publish` pushes the current OpenAPI document and `oxcribe.docs.v1` payload to `oxcloud`.\n\n## Docs Data Endpoints\n\n`oxcribe` exposes stable JSON endpoints. The package owns the data contract; your local app or `oxcloud` can render any viewer on top of it.\n\nEnable docs in `config/oxcribe.php`:\n\n```php\n'docs' =\u003e [\n    'enabled' =\u003e true,\n    'route' =\u003e 'oxcribe/docs',\n    'openapi_route' =\u003e 'oxcribe/openapi.json',\n    'payload_route' =\u003e 'oxcribe/docs/payload.json',\n],\n```\n\nRoutes provided by the package:\n\n- `GET /oxcribe/docs`\n- `GET /oxcribe/openapi.json`\n- `GET /oxcribe/docs/payload.json`\n\n`/oxcribe/docs` is a package-owned local Vue viewer, similar in spirit to how Scramble serves its UI from the package itself.\nThe OpenAPI route is the canonical machine-readable document.\nThe payload route returns the richer `oxcribe.docs.v1` viewer payload, including generated examples, snippets, runtime metadata, and component schemas.\n`oxcloud` can consume that same payload contract and host a more advanced version of the same experience.\n\n## Publish To Oxcloud\n\nConfigure the publish target:\n\n```env\nOXCLOUD_BASE_URL=https://oxcloud.example.test\nOXCLOUD_TOKEN=your-project-publish-token\nOXCLOUD_TIMEOUT=30\nOXCLOUD_DEFAULT_VERSION=dev\n```\n\nThen publish:\n\n```bash\nphp artisan oxcribe:doctor\nphp artisan oxcribe:publish\nphp artisan oxcribe:publish --publish-version=2026.03.25\n```\n\nOn success the command prints:\n\n- the hosted version URL\n- the explorer URL for the same version\n- the changelog URL for the same version\n- the project latest URL\n\nThe command sends:\n\n- `contractVersion = \"oxcloud.publish.v1\"`\n- `version`\n- `openapi`\n- `docsPayload`\n- `source.appName`\n- `source.appUrl`\n- `source.framework = \"laravel\"`\n- `source.packageVersion = \"oxcribe v0.1.4\"`\n\n## Overrides\n\nRuntime is the primary source of truth, but `oxcribe` also supports route-level overrides through `.oxcribe.php` or `oxcribe.overrides.php`.\n\n- docs: [docs/overrides.md](docs/overrides.md)\n- minimal example: [docs/minimal.oxcribe.php](docs/minimal.oxcribe.php)\n\n## Supported Stacks\n\n- Laravel core request/response/resource patterns\n- runtime auth and middleware-derived OpenAPI security\n- first-class publish visibility via `oxcribe.publish` / `oxcribe.private` middleware markers\n- Inertia transport metadata\n- Spatie `laravel-data`, `laravel-query-builder`, `laravel-permission`, `laravel-medialibrary` and `laravel-translatable`\n\n## Current Limits\n\n- `security` is derived from runtime middleware/auth, not from static authorization hints\n- static authorization hints are exposed under `x-oxcribe.authorizationStatic`\n- Livewire and non-Laravel stacks are out of scope\n- preview release: validate generated docs on your own routes before depending on them as the only source of truth\n- the local viewer is package-owned and does not depend on publishing frontend stubs into the host app\n\n## Smart Examples\n\nThe next product layer for `oxcribe` is deterministic smart examples built from runtime + static analysis.\nThe design lives in [docs/smart-examples-v1.md](docs/smart-examples-v1.md).\n\n## Package Docs\n\n- installation: [docs/installation.md](docs/installation.md)\n- troubleshooting: [docs/troubleshooting.md](docs/troubleshooting.md)\n- compatibility and fixtures: [docs/compatibility.md](docs/compatibility.md)\n- overrides: [docs/overrides.md](docs/overrides.md)\n- smart examples: [docs/smart-examples-v1.md](docs/smart-examples-v1.md)\n- release checklist: [docs/release.md](docs/release.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxhq%2Foxcribe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxhq%2Foxcribe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxhq%2Foxcribe/lists"}