cohere-local-dev-loop

Featured

Configure Cohere local development with mocking, testing, and hot reload. Use when setting up a development environment, configuring test workflows, or establishing a fast iteration cycle with Cohere API v2. Trigger with phrases like "cohere dev setup", "cohere local development", "cohere dev environment", "develop with cohere", "mock cohere".

AI & Automation 2,926 stars 433 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 99/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Cohere Local Dev Loop ## Overview Set up a fast, reproducible local development workflow with Cohere API v2 mocking, vitest testing, and hot reload. ## Prerequisites - Completed `cohere-install-auth` setup - Node.js 18+ with npm/pnpm - TypeScript project with `tsx` or `ts-node` ## Instructions ### Step 1: Project Structure ``` my-cohere-project/ ├── src/ │ ├── cohere/ │ │ ├── client.ts # CohereClientV2 wrapper │ │ ├── chat.ts # Chat completions │ │ ├── embed.ts # Embedding operations │ │ └── rerank.ts # Reranking operations │ └── index.ts ├── tests/ │ ├── chat.test.ts │ ├── embed.test.ts │ └── fixtures/ │ └── responses.ts # Mock API responses ├── .env.local # Local secrets (git-ignored) ├── .env.example # Template for team └── package.json ``` ### Step 2: Package Setup ```json { "scripts": { "dev": "tsx watch src/index.ts", "test": "vitest", "test:watch": "vitest --watch", "test:integration": "COHERE_INTEGRATION=1 vitest --run" }, "dependencies": { "cohere-ai": "^7.0.0" }, "devDependencies": { "tsx": "^4.0.0", "vitest": "^2.0.0", "typescript": "^5.5.0" } } ``` ### Step 3: Client Wrapper ```typescript // src/cohere/client.ts import { CohereClientV2 } from 'cohere-ai'; let instance: CohereClientV2 | null = null; export function getCohere(): CohereClientV2 { if (!instance) { instance = new CohereClientV2({ token: process.env.C...

Details

Author
jeremylongshore
Repository
jeremylongshore/claude-code-plugins-plus-skills
Created
1 years ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category