fabro/docs/api-reference/client-sdks.mdx
Bryan Helmkamp 28884ae093 rename Arc to Fabro in all Rust crates, symbols, env vars, and supporting files
- Rename 20 crate directories lib/crates/arc-* → fabro-*
- Update all Cargo.toml: crate names, dep paths, feature flags, bin name
- Rename arc_server module → fabro_server in fabro-llm
- ArcError → FabroError across 30+ files
- ARC_VERSION/ARC_GIT_SHA/ARC_BUILD_DATE → FABRO_* constants
- All use/qualified paths: arc_agent:: → fabro_agent::, etc. (~1500 occurrences)
- Env vars ARC_* → FABRO_* in string literals and shell scripts
- String literals: X-Arc-Demo, arc-bot, arc@local, arc-web, arc-mcp, etc.
- Path strings: .arc/ → .fabro/, arc.toml → fabro.toml, refs/arc/ → refs/fabro/
- arc-api.yaml → fabro-api.yaml (OpenAPI spec)
- skills/arc-create-workflow → fabro-create-workflow
- trycmd fixtures: $ arc → $ fabro
- Inline snapshots (insta) updated
- CI, Docker, install.sh, scripts, CLAUDE.md, AGENTS.md
- TypeScript app: env vars, headers, JWT issuer
- Docs: page slugs, git refs, config paths, sandbox names, repo URLs
- Repo references: brynary/arc → fabro-sh/fabro

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-12 12:25:58 -04:00

64 lines
2.3 KiB
Text

---
title: "Client SDKs"
description: "Language-specific clients generated from the Fabro OpenAPI spec"
---
The Fabro API is defined by an OpenAPI 3.1 specification (`docs/api-reference/fabro-api.yaml` in the repository) that serves as the single source of truth for all endpoints, request/response schemas, and parameter definitions. The spec is also available at runtime from the server at `GET /openapi.json`. Both client SDKs below are generated directly from this spec.
## TypeScript (Axios)
The `@qltysh/fabro-api-client` package is a fully typed HTTP client generated with the [OpenAPI Generator](https://openapi-generator.tech/) using the `typescript-axios` template. It produces typed API classes (one per tag) and model interfaces for every schema.
### Regenerating
From the repository root:
```bash
cd lib/packages/fabro-api-client
bun run generate
```
This runs `openapi-generator-cli` against `docs/api-reference/fabro-api.yaml` and writes the generated source into `lib/packages/fabro-api-client/src/`.
### Usage
```typescript
import { RunsApi, Configuration } from "@qltysh/fabro-api-client";
const config = new Configuration({ basePath: "http://localhost:3000" });
const runs = new RunsApi(config);
const { data } = await runs.listRuns();
console.log(data);
```
The generated client includes a typed API class for each endpoint group: `RunsApi`, `WorkflowsApi`, `SessionsApi`, `VerificationsApi`, `InsightsApi`, and others.
## Rust (Types Only)
The `fabro-types` crate generates Rust structs and enums from the OpenAPI component schemas at compile time using [typify](https://github.com/oxidecomputer/typify). This provides type-safe representations of all API models but does not include an HTTP client.
### How It Works
A `build.rs` script reads `docs/api-reference/fabro-api.yaml`, extracts `components/schemas`, and feeds them to typify. The generated code is written to `OUT_DIR` and included via:
```rust
// lib/crates/fabro-types/src/lib.rs
include!(concat!(env!("OUT_DIR"), "/openapi_types.rs"));
```
### Regenerating
The types are regenerated automatically on every `cargo build` when the OpenAPI spec changes:
```bash
cargo build -p fabro-types
```
### Usage
```rust
use fabro_types::RunListItem;
```
All generated types derive `serde::Deserialize` and `serde::Serialize`, so they work directly with any Rust HTTP client for request and response parsing.