
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
@ottocode/web-sdk
Advanced tools
Reusable React components, hooks, and utilities for building ottocode web interfaces
Reusable React components, hooks, and utilities for building ottocode web interfaces.
npm install @ottocode/web-sdk
# or
bun add @ottocode/web-sdk
The components in this package use Tailwind CSS classes. You must configure Tailwind to scan the web-sdk package for class names.
In your tailwind.config.js (or tailwind.config.ts):
export default {
content: [
'./index.html',
'./src/**/*.{js,ts,jsx,tsx}',
// ⚠️ IMPORTANT: Include web-sdk package
'./node_modules/@ottocode/web-sdk/dist/**/*.{js,jsx}',
// Or if using a monorepo with workspace:*
'../../packages/web-sdk/src/**/*.{js,ts,jsx,tsx}',
],
// ... rest of your config
};
The components use CSS custom properties for theming. Add these to your global CSS:
@layer base {
:root {
--background: 220 25% 95%;
--foreground: 220 10% 15%;
--card: 220 25% 98%;
--card-foreground: 220 10% 15%;
--primary: 222.2 47.4% 11.2%;
--primary-foreground: 210 40% 98%;
--border: 220 15% 89%;
--input: 220 15% 89%;
--ring: 222.2 84% 4.9%;
/* ... other variables */
}
.dark {
--background: 240 10% 8%;
--foreground: 0 0% 98%;
/* ... dark theme variables */
}
}
See the apps/web/src/index.css file for the complete set of CSS variables.
import {
ChatInput,
ChatInputContainer,
MessageThread,
SessionListContainer
} from '@ottocode/web-sdk/components';
function MyApp() {
return (
<div>
<SessionListContainer
activeSessionId={sessionId}
onSelectSession={handleSelect}
/>
<MessageThread messages={messages} />
<ChatInputContainer sessionId={sessionId} />
</div>
);
}
import {
useSessions,
useMessages,
useSessionStream,
useTheme
} from '@ottocode/web-sdk/hooks';
function MyComponent() {
const { data: sessions } = useSessions();
const { data: messages } = useMessages(sessionId);
const { theme, toggleTheme } = useTheme();
// ...
}
import { useGitStore, useSidebarStore } from '@ottocode/web-sdk/stores';
function MyComponent() {
const gitFiles = useGitStore((state) => state.files);
const isSidebarCollapsed = useSidebarStore((state) => state.collapsed);
// ...
}
import { apiClient, SSEClient } from '@ottocode/web-sdk/lib';
// Use the API client
const sessions = await apiClient.getSessions();
// Use the SSE client for streaming
const sseClient = new SSEClient('/v1/sessions/123/stream');
sseClient.onMessage((data) => console.log(data));
@ottocode/web-sdk/
├── components/ # React components
├── hooks/ # React hooks
├── lib/ # Utilities (API client, SSE client, config)
├── stores/ # Zustand stores
└── types/ # TypeScript type definitions
If the components appear unstyled:
tailwind.config.js includes the web-sdk packageMake sure you're importing from the correct path:
// ✅ Correct
import { Button } from '@ottocode/web-sdk/components';
// ❌ Wrong
import { Button } from '@ottocode/web-sdk';
@ottocode/web-ui - Pre-built static web app@ottocode/sdk - Node.js SDK for ottocode@ottocode/api - API client types@ottocode/server - Backend serverMIT
FAQs
Reusable React components, hooks, and utilities for building ottocode web interfaces
We found that @ottocode/web-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.