Skip to content

Latest commit

 

History

History

README.md

layout home
hero
name text tagline actions
@codeguide/core
TypeScript SDK
Complete TypeScript SDK for integrating CodeGuide functionality into your applications
theme text link
brand
Get Started
/codeguide-client
theme text link
alt
View on GitHub
features
title details
🔑 Multiple Authentication Methods
Database API keys, legacy keys, and JWT tokens with automatic fallback
title details
📝 Project Management
Create, update, and manage projects programmatically with full CRUD operations
title details
🤖 Codespace Tasks
Create and manage AI-powered coding tasks with support for multiple execution modes
title details
🎯 Model Management
Query and manage LLM models and providers for your codespace tasks
title details
🔐 Security Keys
Securely manage provider API keys and GitHub tokens with encryption
title details
🛡️ TypeScript Support
Full type safety and IntelliSense support for all API methods

Quick Start

Installation

npm install @codeguide/core

Basic Usage

import { CodeGuide } from '@codeguide/core'

// Initialize the CodeGuide client
const codeguide = new CodeGuide({
  baseUrl: 'https://api.codeguide.ai',
  databaseApiKey: 'sk_your_database_api_key', // Recommended
})

// Access services
const projects = await codeguide.projects.getAllProjects()
const tasks = await codeguide.codespace.getCodespaceTasksByProject({
  project_id: 'your_project_id'
})

Documentation Structure

Core Components

Services

Features

  • 🔑 Multiple Authentication Methods - Database API keys, legacy keys, and JWT tokens
  • 📝 Project Management - Create, update, and manage projects programmatically
  • 🤖 Codespace Tasks - Create and manage AI-powered coding tasks
  • 🎯 Model Management - Query and manage LLM models and providers
  • 🔐 Security Keys - Securely manage provider API keys and GitHub tokens
  • 📊 Usage Tracking - Monitor API usage and credits
  • 🛡️ TypeScript Support - Full type safety and IntelliSense

Getting Started

  1. Install the package: npm install @codeguide/core
  2. Get your API key: Sign up at codeguide.ai to get your API key
  3. Initialize the client: See CodeGuide Client for setup instructions
  4. Authenticate: See Authentication for authentication options
  5. Start building: Explore the service documentation to learn about available features

Common Use Cases

Creating a Project

const project = await codeguide.projects.createProject({
  title: 'My New Project',
  description: 'Project description here'
})

Creating a Codespace Task

const task = await codeguide.codespace.createCodespaceTaskV2({
  project_id: project.id,
  task_description: 'Implement user authentication',
  execution_mode: 'implementation'
})

Managing Security Keys

// Store a provider API key
await codeguide.securityKeys.createProviderAPIKey({
  provider_key: 'openai',
  api_key: 'sk-your-openai-key'
})

// Store a GitHub token
await codeguide.securityKeys.createGitHubToken({
  github_token: 'ghp_your_github_token'
})

Support

License

MIT License - see the LICENSE file for details.