Installation
Add Depute components to your project using the CLI.
Requirements
- React 18+
- TypeScript
- CSS Modules support (standard in Vite, Next.js, CRA)
Depute is agent-agnostic — it works with any AI backend (OpenAI, Anthropic, LangChain, AutoGen, or custom).
Install a component
npx ax-depute@latest add approval-gatepnpm dlx ax-depute@latest add approval-gateyarn dlx ax-depute@latest add approval-gatebunx ax-depute@latest add approval-gateThis copies the component source files directly into src/components/ApprovalGate/. You own the code.
Each fetched file is checked against the release checksum before anything is written. If one does not match, or the command is interrupted, that attempt removes only the files and directories it created and restores any stylesheet it edited. Files and directories that were already in the project are left as they were, including empty directories.
On first install, shared files are also added once, next to the component directory:
src/types/ax-common.ts— shared TypeScript types (PlanStep,ToolCall,Artifact)src/types/ax-core.ts— handoff and presented-payload types (HandoffContext,PresentedPayload)src/utils/ax-receipt.ts— canonical approval receipt, hash, andverifysrc/utils/ax-a11y.tsx— accessibility utilities used across componentssrc/styles/depute.css— design tokens and motion. This is the one stylesheet import.
Styles
Component CSS reads --ax-* tokens. Without the stylesheet, an installed component renders unstyled. The CLI copies depute.css, tokens.css, and animations.css into src/styles/ and, when it finds a global stylesheet such as src/index.css, inserts:
@import "./styles/depute.css";Pass --css src/index.css to choose the file, or --no-css to skip the edit and add the import yourself. That single import is the only manual step when the CLI cannot find a stylesheet.
--dir moves the shared files with the components. add run-controls --dir components/ax writes the component to components/ax/RunControls/ and the shared files to components/types, components/utils, and components/styles, then rewrites the imports so they resolve.
Initialize the AI Skill Layer
Depute ships with a native Skill Layer that teaches your AI agent (Claude Code, Cursor, Copilot) how to use the components you just installed.
npx ax-depute@latest initpnpm dlx ax-depute@latest inityarn dlx ax-depute@latest initbunx ax-depute@latest initThis command writes skills/depute/SKILL.md (and its reference files) into your repository, plus skills/depute/depute.skill.json with the CLI version. It also installs the design tokens when src/styles/depute.css is not already there, and writes src/types/ax-common.ts and src/utils/ax-a11y.tsx when those files are missing. A second run skips files that already exist and does not duplicate the CSS import. The skill tells an agent how to compose the primitives. It is not a runtime dependency.
List all components
npx ax-depute listpnpm dlx ax-depute listyarn dlx ax-depute listbunx ax-depute listInstall multiple components
npx ax-depute@latest add plan-card
npx ax-depute@latest add tool-trace
npx ax-depute@latest add run-controlspnpm dlx ax-depute@latest add plan-card
pnpm dlx ax-depute@latest add tool-trace
pnpm dlx ax-depute@latest add run-controlsyarn dlx ax-depute@latest add plan-card
yarn dlx ax-depute@latest add tool-trace
yarn dlx ax-depute@latest add run-controlsbunx ax-depute@latest add plan-card
bunx ax-depute@latest add tool-trace
bunx ax-depute@latest add run-controlsShared types
All components use these core types from src/types/ax-common.ts:
interface PlanStep {
id: string;
label: string;
status: 'pending' | 'active' | 'completed' | 'failed';
confidence?: number;
}
interface ToolCall {
id: string;
name: string;
input?: Record<string, unknown>;
output?: Record<string, unknown>;
status: 'pending' | 'running' | 'completed' | 'failed';
timestamp: string;
policyFlags?: {
requiresApproval?: boolean;
writesState?: boolean;
externalAction?: boolean;
};
}
interface Artifact {
id: string;
content: string;
format: 'markdown' | 'json' | 'csv' | 'code';
sourceStepId?: string;
toolCallIds?: string[];
}No backend required
Optional prototyping generators are a separate install. They are not copied with a component:
npx ax-depute add mock-dataimport { generateMockPlan, generateMockToolCalls } from '../utils/mockData';
const plan = generateMockPlan(4); // 4-step agent plan
const trace = generateMockToolCalls(3); // 3 tool call entriesmock-data type-imports the components it describes. Add those components before typechecking. With --dir, the file is written under that directory's parent utils/ folder and its imports point at the components you installed there.
