> ## Documentation Index
> Fetch the complete documentation index at: https://docs.switchport.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TypeScript SDK - Coming Soon

> The Switchport TypeScript SDK is currently in development

## TypeScript SDK Coming Soon

We're actively developing the Switchport TypeScript/JavaScript SDK to bring the same powerful prompt management and A/B testing capabilities to Node.js and browser environments.

## Expected Features

The TypeScript SDK will include:

<CardGroup cols={2}>
  <Card title="Full Type Safety" icon="shield-check">
    Built with TypeScript for excellent IDE support and type safety
  </Card>

  <Card title="Promise-based API" icon="code">
    Async/await support for modern JavaScript development
  </Card>

  <Card title="Same Core Features" icon="copy">
    Prompt execution, metrics tracking, and A/B testing just like Python SDK
  </Card>

  <Card title="Browser Support" icon="window">
    Works in both Node.js and browser environments
  </Card>
</CardGroup>

## Planned API

The API will be similar to the Python SDK for consistency:

```typescript theme={null}
import { Switchport } from '@switchport/sdk';

// Initialize client
const client = new Switchport({
  apiKey: process.env.SWITCHPORT_API_KEY
});

// Execute a prompt
const response = await client.prompts.execute({
  promptKey: 'welcome-message',
  user: { userId: 'user_123' },
  variables: { name: 'Alice' }
});

console.log(response.text);

// Record a metric
await client.metrics.record({
  metricKey: 'satisfaction',
  value: 4.5,
  user: { userId: 'user_123' }
});
```

## Stay Updated

Want to be notified when the TypeScript SDK is released?

<CardGroup cols={3}>
  <Card title="GitHub" icon="github" href="https://github.com/switchport-ai">
    Star our repo to get updates
  </Card>

  <Card title="Discord" icon="discord" href="https://discord.gg/switchport">
    Join our community
  </Card>

  <Card title="Twitter" icon="x-twitter" href="https://twitter.com/switchport">
    Follow for announcements
  </Card>
</CardGroup>

## In the Meantime

While you wait for the TypeScript SDK, you can:

### Use the Python SDK

If you have a Python backend, you can use the Python SDK today:

<Card title="Python SDK Quickstart" icon="python" href="/sdk/python/quickstart">
  Get started with the Python SDK in 5 minutes
</Card>

### Use the REST API Directly

You can call the Switchport API directly from TypeScript:

```typescript theme={null}
// Example: Execute a prompt via REST API
async function executePrompt(promptKey: string, variables: Record<string, any>) {
  const response = await fetch('https://switchport-api.vercel.app/api/sdk/v1/prompts/execute', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${process.env.SWITCHPORT_API_KEY}`,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      prompt_key: promptKey,
      variables,
      user: {}
    })
  });

  const data = await response.json();
  return data.text;
}

// Usage
const text = await executePrompt('welcome-message', { name: 'Alice' });
console.log(text);
```

<Card title="REST API Reference" icon="terminal" href="/api-reference/introduction">
  View the complete REST API documentation
</Card>

## Contributing

Interested in contributing to the TypeScript SDK development?

We welcome contributions! Here's how you can help:

<Steps>
  <Step title="Join our Discord">
    Connect with the team and other contributors in our Discord community
  </Step>

  <Step title="Check GitHub issues">
    Look for issues tagged with `typescript-sdk` or `help-wanted`
  </Step>

  <Step title="Share feedback">
    Let us know what features are most important for your use case
  </Step>
</Steps>

<Card title="GitHub Repository" icon="github" href="https://github.com/switchport-ai">
  Contribute to the Switchport SDKs
</Card>

## SDK Roadmap

Our SDK development roadmap:

* ✅ **Python SDK** - Available now
* 🚧 **TypeScript SDK** - In development
* 📋 **Go SDK** - Planned
* 📋 **Ruby SDK** - Planned
* 📋 **PHP SDK** - Planned

## Questions?

Have questions about the TypeScript SDK or want to request specific features?

<CardGroup cols={2}>
  <Card title="Discord Community" icon="discord" href="https://discord.gg/switchport">
    Ask questions and share ideas
  </Card>

  <Card title="Email Support" icon="envelope" href="mailto:support@switchport.ai">
    Contact our support team
  </Card>
</CardGroup>
