@sudobility/shaperouter_client
v0.0.10
Published
React client library for ShapeRouter API with TanStack Query hooks
Downloads
1,347
Maintainers
Readme
@sudobility/shaperouter_client
React client library for the ShapeRouter API with state management hooks.
Installation
bun add @sudobility/shaperouter_clientUsage
import { useKeys, useProjects, useAiExecute } from '@sudobility/shaperouter_client';
const { keys, isLoading, refresh, createKey } = useKeys(networkClient, baseUrl);
await refresh(userId, token);Hooks
| Hook | Purpose |
|------|---------|
| useKeys | LLM API key management |
| useProjects | Project CRUD |
| useEndpoints | Endpoint configuration |
| useAiExecute | LLM inference |
| useAnalytics | Usage analytics |
| useSettings | User settings |
Each hook returns { data, isLoading, error, refresh, clearError, reset } plus CRUD methods.
Development
bun run build # Build to dist/
bun run test # Run Vitest
bun run typecheck # TypeScript check
bun run lint # ESLint
bun run verify # Typecheck + lint + test + buildRelated Packages
@sudobility/shaperouter_types-- Shared type definitions@sudobility/shaperouter_lib-- Zustand stores wrapping these hooksshaperouter_app-- Frontend consumer
License
BUSL-1.1
