### Quick Sanity Project Setup Source: https://github.com/continuedev/continue/blob/main/docs/guides/sanity-mcp-continue-cookbook.mdx Quickly set up a new Sanity project and start the development server. This is useful for new users to get a Sanity project running. ```bash npm create sanity@latest cd your-project-name npm run dev ``` -------------------------------- ### Headless Mode Example: Use Specific Assistant Source: https://github.com/continuedev/continue/blob/main/docs/cli/headless-mode.mdx Execute a task using a specific assistant configured in your Continue setup. This is done by specifying the assistant path with the `--config` flag. ```bash # Use a specific assistant cn -p "Triage this error log" --config my-org/error-triage-assistant ``` -------------------------------- ### Research Similar Content Prompt Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Use this prompt to research existing model provider setup guides and understand their common structure for creating new guides. ```markdown "I want to create a guide for setting up Continue with Amazon Bedrock. Search the Continue docs for similar model provider setup guides and show me the common structure they follow." ``` -------------------------------- ### Install OpenAPI Client via Setuptools Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/python/api/README.md Install the Python package using Setuptools. This method is suitable for local installations or when managing package dependencies. ```sh python setup.py install --user ``` -------------------------------- ### Install and Run ClawRouter Source: https://github.com/continuedev/continue/blob/main/docs/customize/model-providers/more/clawrouter.mdx Commands to start the ClawRouter service locally using npx or global npm installation. ```bash npx clawrouter ``` ```bash npm install -g clawrouter clawrouter ``` -------------------------------- ### Install dlt MCP via CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/dlt-mcp-continue-cookbook.mdx Install the dlt MCP using the Continue CLI for quick setup. This makes dlt MCP tools available to your Continue agent. ```bash cn --mcp dlthub/dlt-mcp ``` -------------------------------- ### Install the Continue CLI Source: https://github.com/continuedev/continue/blob/main/skills/cn-check/SKILL.md Install the CLI globally via npm. ```bash npm install -g @continuedev/cli ``` -------------------------------- ### Install Continue CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/github-mcp-continue-cookbook.mdx Installs the Continue CLI. Ensure Node.js 22+ is installed. ```bash npm install -g continue-cli ``` -------------------------------- ### Install Continue CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/netlify-mcp-continuous-deployment.mdx Installs the Continue CLI, a prerequisite for using Netlify MCP with Continue. ```bash npm i -g continue-cli ``` -------------------------------- ### Example Extraction Prompt Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Prompt to extract all MCP server configuration examples from Continue docs and format them into a reference page with explanations. ```bash "Extract all code examples showing MCP server configuration from the Continue docs. Format them as a single reference page with explanations for each pattern." ``` -------------------------------- ### Install Continue CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/cli.mdx Install the Continue CLI using npm or yarn. This is the first step to using the command-line agent. ```bash npm install -g continue-cli # or yarn global add continue-cli ``` -------------------------------- ### Quick Start with Docs Assistant - Mintlify Agent Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Use this command to quickly start with the pre-built Docs Assistant agent, which includes the Continue Docs MCP and Mintlify formatting rules. This is the recommended approach for most users. ```bash # From your Continue docs directory cn --config continuedev/docs-mintlify ``` -------------------------------- ### Complete YAML Configuration Example Source: https://github.com/continuedev/continue/blob/main/docs/reference.mdx A comprehensive example of a config.yaml file, demonstrating model configurations, rules, prompts, and data destinations. ```yaml name: My Config version: 1.0.0 schema: v1 models: - uses: anthropic/claude-sonnet-4-6 with: ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} override: defaultCompletionOptions: temperature: 0.8 - name: GPT-4 provider: openai model: gpt-4 roles: - chat - edit defaultCompletionOptions: temperature: 0.5 maxTokens: 2000 requestOptions: headers: Authorization: Bearer YOUR_OPENAI_API_KEY - name: Ollama Starcoder provider: ollama model: starcoder roles: - autocomplete autocompleteOptions: debounceDelay: 350 maxPromptTokens: 1024 onlyMyCode: true defaultCompletionOptions: temperature: 0.3 stop: - "\n" rules: - Give concise responses - Always assume TypeScript rather than JavaScript prompts: - name: test description: Unit test a function prompt: | Please write a complete suite of unit tests for this function. You should use the Jest testing framework. The tests should cover all possible edge cases and should be as thorough as possible. You should also include a description of each test case. - uses: myprofile/my-favorite-prompt context: - provider: diff - provider: file - provider: code mcpServers: - name: DevServer command: npm args: - run - dev env: PORT: "3000" data: - name: My Private Company destination: https://mycompany.com/ingest schema: 0.2.0 level: noCode events: - autocomplete - chatInteraction ``` -------------------------------- ### Configure Continue CLI with Custom Config Source: https://github.com/continuedev/continue/blob/main/docs/guides/cli.mdx Start the Continue CLI with a specific configuration file using the --config flag. This allows switching between different setups. ```bash cn --config continuedev/default-cli-config cn --config ~/.continue/config.yaml ``` -------------------------------- ### Mock LLM Server Setup and Usage Source: https://github.com/continuedev/continue/blob/main/extensions/cli/src/test-helpers/README.md Demonstrates the basic setup and usage of the mock LLM server for testing. ```APIDOC ## Mock LLM Server Setup and Usage ### Description This example shows how to set up a mock LLM server for testing, make a CLI call, and assert the response. ### Method `setupMockLLMTest(context, options)` ### Endpoint N/A (Internal testing utility) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body `context`: Test context object. `options` (object): Configuration for the mock server. - `response` (string | function): The response to send. Can be a static string or a function that takes a prompt and returns a response. - `streaming` (boolean): Whether the response should be streamed (default: true). ### Request Example ```typescript import { setupMockLLMTest, cleanupMockLLMServer, } from "../test-helpers/mock-llm-server.js"; describe("My Test", () => { let context: any; let mockServer: MockLLMServer; beforeEach(async () => { context = await createTestContext(); mockServer = await setupMockLLMTest(context, { response: "Hello from mock LLM!", }); }); afterEach(async () => { await cleanupMockLLMServer(mockServer); await cleanupTestContext(context); }); it("should get response from mock", async () => { const result = await runCLI(context, { args: ["-p", "Test prompt", "--config", context.configPath], }); expect(result.stdout).toContain("Hello from mock LLM!"); }); }); ``` ### Response #### Success Response (200) N/A (This is a testing utility, not a direct API endpoint) #### Response Example N/A ``` -------------------------------- ### Setup Mock LLM Test Environment Source: https://github.com/continuedev/continue/blob/main/extensions/cli/src/test-helpers/README.md Demonstrates the standard lifecycle for testing the CLI with a mock LLM server using setup and cleanup helpers. ```typescript import { setupMockLLMTest, cleanupMockLLMServer, } from "../test-helpers/mock-llm-server.js"; describe("My Test", () => { let context: any; let mockServer: MockLLMServer; beforeEach(async () => { context = await createTestContext(); mockServer = await setupMockLLMTest(context, { response: "Hello from mock LLM!", }); }); afterEach(async () => { await cleanupMockLLMServer(mockServer); await cleanupTestContext(context); }); it("should get response from mock", async () => { const result = await runCLI(context, { args: ["-p", "Test prompt", "--config", context.configPath], }); expect(result.stdout).toContain("Hello from mock LLM!"); }); }); ``` -------------------------------- ### Install Continue SDK for Python Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/README.md Use this command to install the Continue SDK for Python projects. ```bash pip install continuedev ``` -------------------------------- ### Install and Build Hub API Client Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/api/README.md Run these commands to install dependencies and build the TypeScript sources into JavaScript. ```bash npm install npm run build ``` -------------------------------- ### Install and Authenticate Netlify CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/netlify-mcp-continuous-deployment.mdx Installs the Netlify CLI and authenticates your account, which is necessary for interacting with Netlify services. ```bash npm i -g netlify-cli netlify login ``` -------------------------------- ### Install Continue CLI on macOS/Linux Source: https://github.com/continuedev/continue/blob/main/docs/snippets/cli-install.mdx Use this command to install the Continue CLI on macOS or Linux systems by piping the installation script to bash. ```bash curl -fsSL https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.sh | bash ``` -------------------------------- ### Headless Mode Example: Generate Docs Source: https://github.com/continuedev/continue/blob/main/docs/cli/headless-mode.mdx Generate documentation from code using headless mode. This example shows how to pipe the output to a file. ```bash # Generate docs from code cn -p "@src/api/ Generate OpenAPI documentation for these endpoints" --silent > api-docs.yaml ``` -------------------------------- ### Verify Continue CLI Installation Source: https://github.com/continuedev/continue/blob/main/docs/cli/quickstart.mdx Check if the Continue CLI has been installed correctly by running the version command. ```bash cn --version ``` -------------------------------- ### Install via NPM Source: https://github.com/continuedev/continue/blob/main/core/vendor/modules/@xenova/transformers/README.md Command to install the library using the NPM package manager. ```bash npm i @xenova/transformers ``` -------------------------------- ### Install Continue SDK for TypeScript/JavaScript Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/README.md Use this command to install the Continue SDK for TypeScript or JavaScript projects. ```bash npm install @continuedev/sdk ``` -------------------------------- ### Install Mintlify CLI Source: https://github.com/continuedev/continue/blob/main/docs/README.md Install the Mintlify CLI globally to preview documentation changes locally. This command is run in your terminal. ```bash npm i -g mint ``` -------------------------------- ### Install Continue CLI on Windows Source: https://github.com/continuedev/continue/blob/main/docs/snippets/cli-install.mdx Use this command to install the Continue CLI on Windows systems by piping the installation script to PowerShell's Invoke-Expression. ```powershell irm https://raw.githubusercontent.com/continuedev/continue/main/extensions/cli/scripts/install.ps1 | iex ``` -------------------------------- ### Install Published Hub API Package Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/api/README.md Install the @continuedev/hub-api package from npm into your project. ```bash npm install @continuedev/hub-api@0.0.1 --save ``` -------------------------------- ### Install dlt Source: https://github.com/continuedev/continue/blob/main/docs/guides/dlt-mcp-continue-cookbook.mdx Install the dlt library using pip. This is a prerequisite for working with dlt pipelines. ```bash pip install dlt ``` -------------------------------- ### Start a New Continue CLI Session Source: https://github.com/continuedev/continue/blob/main/docs/cli/quickstart.mdx Navigate to your project directory and start an interactive TUI session with the Continue CLI. ```bash cd your-project cn ``` -------------------------------- ### Build Configuration Example Source: https://github.com/continuedev/continue/blob/main/extensions/intellij/rules.md This is an example of the build configuration file using Gradle Kotlin DSL. It is used to manage the project's dependencies and build process. ```kotlin build.gradle.kts ``` -------------------------------- ### Create New Guide Prompt Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Use this prompt to create a new guide, specifying the file path, structure, and content requirements, leveraging the Continue Docs MCP for accurate information. ```markdown "Create a new guide at docs/guides/amazon-bedrock-setup.mdx following the structure you found. Include: - Prerequisites - Step-by-step setup with code examples - Configuration options - Troubleshooting common issues Use the Continue Docs MCP to find accurate information about Continue's model provider configuration." ``` -------------------------------- ### Start Swagger UI for API Exploration Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/README.md This command starts the Swagger UI, allowing you to explore and interact with the Continue Hub API directly in your browser. ```bash npm run swagger-ui ``` -------------------------------- ### Install Continue CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/chrome-devtools-mcp-performance.mdx Installs the Continue CLI, a prerequisite for using Chrome DevTools MCP features with AI. ```bash npm install -g @continue-ai/continue ``` -------------------------------- ### Continue CLI Headless Mode Examples Source: https://github.com/continuedev/continue/blob/main/extensions/cli/README.md Examples demonstrating headless mode for automation, scripting, and CI/CD pipelines. Headless mode runs without an interactive terminal UI. ```bash # Basic usage cn -p "Generate a conventional commit name for the current git changes." ``` ```bash # With piped input echo "Review this code" | cn -p ``` ```bash # JSON output for scripting cn -p "Analyze the code" --format json ``` ```bash # Silent mode (strips thinking tags) cn -p "Write a README" --silent ``` -------------------------------- ### Install Continue CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/atlassian-mcp-continue-cookbook.mdx Install the Continue CLI to manage Atlassian workflows. This is a prerequisite for using the Atlassian agents. ```bash npm install -g continuedev ``` -------------------------------- ### Install Continue CLI with npm Source: https://github.com/continuedev/continue/blob/main/docs/overview.mdx Install the Continue CLI globally using npm. This command is used to add the package to your system's global npm modules. ```bash npm i -g @continuedev/cli ``` -------------------------------- ### Start Local Development Server Source: https://github.com/continuedev/continue/blob/main/docs/README.md Run the Mintlify development server from the root of your documentation project. Ensure docs.json is present in the directory. ```bash mint dev ``` -------------------------------- ### Start Agent with Artifact Support Source: https://github.com/continuedev/continue/blob/main/extensions/cli/docs/artifact-uploads.md Run the Continue CLI with the beta artifact tool enabled. ```bash cn serve --id --beta-upload-artifact-tool ``` -------------------------------- ### Prompts for Refining Cookbook Content Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx These prompts can be used after initial cookbook generation to refine its content. They allow for adding more examples, including specific workflow examples, and detailing setup procedures. ```plaintext "Add more examples to the troubleshooting section" ``` ```plaintext "Include a CI/CD workflow example using GitHub Actions" ``` ```plaintext "Add authentication setup using environment variables" ``` -------------------------------- ### Configure SambaNova in JSON Source: https://github.com/continuedev/continue/blob/main/docs/customize/model-providers/more/SambaNova.mdx This JSON configuration achieves the same setup as the YAML example for SambaNova models in Continue. Ensure you replace ``. ```json { "models": [ { "title": "GPT OSS 120B", "provider": "sambanova", "model": "gpt-oss-120b", "apiKey": "" } ] } ``` -------------------------------- ### Configure /onboard Slash Command Source: https://github.com/continuedev/continue/blob/main/docs/reference/json-reference.mdx Enable project onboarding assistance. ```json { "slashCommands": [ { "name": "onboard", "description": "Familiarize yourself with the codebase" } ] } ``` -------------------------------- ### Set up Real User Monitoring with Web Vitals Source: https://github.com/continuedev/continue/blob/main/docs/guides/netlify-mcp-continuous-deployment.mdx Integrate Web Vitals tracking by installing the library, sending metrics to a Netlify Functions endpoint, and storing performance data in Netlify Blobs. This setup is for custom RUM solutions. ```javascript import { onLCP, onCLS, onFID, onINP } from 'web-vitals'; function sendToNetlify(metric) { fetch('/.netlify/functions/track-metrics', { method: 'POST', body: JSON.stringify(metric), }); } onLCP(sendToNetlify); onCLS(sendToNetlify); onFID(sendToNetlify); onINP(sendToNetlify); ``` -------------------------------- ### Prompt to Update Documentation with New Information Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx This prompt guides the agent to update a specific documentation file (e.g., mcp-tools.mdx) by incorporating information about a new MCP server. It leverages the Continue Docs MCP to find relevant examples from other MCP documentation for consistency. ```plaintext "Update the MCP tools documentation at docs/customization/mcp-tools.mdx to include information about a new MCP server. Use the Continue Docs MCP to find examples of how other MCP servers are documented, then add a similar section for the new server." ``` -------------------------------- ### GitHub Actions Workflow for Performance Check Source: https://github.com/continuedev/continue/blob/main/docs/guides/chrome-devtools-mcp-performance.mdx This workflow automates performance testing for pull requests. It installs dependencies, builds the project, starts a dev server, runs performance tests using the Continue CLI, checks against predefined budgets, and comments the results on the PR. ```yaml name: Performance Check on: pull_request: jobs: performance: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: node-version: "20" - name: Install Dependencies run: | npm install -g @continuedev/cli npm ci - name: Build Project run: npm run build - name: Start Dev Server run: | npm run dev & npx wait-on http://localhost:3000 - name: Run Performance Tests env: CONTINUE_API_KEY: ${{ secrets.CONTINUE_API_KEY }} run: | cn --agent continuedev/chrome-dev-tools-agent \ -p "Navigate to http://localhost:3000 and: 1. Record performance trace with reload 2. Extract LCP, FID, CLS values 3. List network requests and calculate total bundle size 4. Output results as JSON to performance.json" \ --auto - name: Check Performance Budgets run: | node << 'EOF' const fs = require('fs'); const perf = JSON.parse(fs.readFileSync('performance.json')); const budgets = { lcp: 2.5, fid: 100, cls: 0.1, bundleSize: 300000 }; let failed = false; const results = []; if (perf.lcp > budgets.lcp) { results.push(`❌ LCP: ${perf.lcp}s (budget: ${budgets.lcp}s)`); failed = true; } else { results.push(`✅ LCP: ${perf.lcp}s`); } if (perf.fid > budgets.fid) { results.push(`❌ FID: ${perf.fid}ms (budget: ${budgets.fid}ms)`); failed = true; } else { results.push(`✅ FID: ${perf.fid}ms`); } if (perf.cls > budgets.cls) { results.push(`❌ CLS: ${perf.cls} (budget: ${budgets.cls})`); failed = true; } else { results.push(`✅ CLS: ${perf.cls}`); } if (perf.bundleSize > budgets.bundleSize) { results.push(`❌ Bundle: ${perf.bundleSize}KB (budget: ${budgets.bundleSize}KB)`); failed = true; } else { results.push(`✅ Bundle: ${perf.bundleSize}KB`); } console.log(results.join('\n')); if (failed) { process.exit(1); } EOF - name: Comment Performance Results if: always() uses: actions/github-script@v7 with: script: | const fs = require('fs'); const perf = JSON.parse(fs.readFileSync('performance.json')); const comment = `## 📊 Performance Report | Metric | Value | Budget | Status | |--------|-------|--------|--------| | LCP | ${perf.lcp}s | 2.5s | ${perf.lcp <= 2.5 ? '✅' : '❌'} | | FID | ${perf.fid}ms | 100ms | ${perf.fid <= 100 ? '✅' : '❌'} | | CLS | ${perf.cls} | 0.1 | ${perf.cls <= 0.1 ? '✅' : '❌'} | | Bundle Size | ${perf.bundleSize}KB | 300KB | ${perf.bundleSize <= 300 ? '✅' : '❌'} | ${perf.lcp > 2.5 || perf.fid > 100 || perf.cls > 0.1 || perf.bundleSize > 300 ? '⚠️ **Performance budgets exceeded. Please optimize before merging.**' : '✅ **All performance budgets met!**'}`; github.rest.issues.createComment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, body: comment }); ``` -------------------------------- ### Install Ollama on macOS and Linux Source: https://github.com/continuedev/continue/blob/main/docs/guides/ollama-guide.mdx Use Homebrew to install Ollama on macOS or a curl script for Linux. The Windows installation is typically done via a downloaded installer from ollama.ai. ```bash # macOS brew install ollama ``` ```bash # Linux curl -fsSL https://ollama.ai/install.sh | sh ``` ```bash # Windows # Download from ollama.ai ``` -------------------------------- ### Local Development Server Command Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Run this command to start the local development server for previewing documentation changes. Visit http://localhost:3000 to see the live preview. ```bash npm run dev ``` -------------------------------- ### Initialize Continue IDE Environment Source: https://github.com/continuedev/continue/blob/main/gui/public/jetbrains_editorInset_index.html Sets up the React refresh runtime and identifies the IDE as JetBrains in local storage. ```javascript import RefreshRuntime from "http://localhost:5173/@react-refresh"; RefreshRuntime.injectIntoGlobalHook(window); window.$RefreshReg$ = () => {}; window.$RefreshSig$ = () => (type) => type; window.__vite_plugin_react_preamble_installed__ = true; localStorage.setItem("ide", "jetbrains"); ``` -------------------------------- ### Build the Core Binary Source: https://github.com/continuedev/continue/blob/main/binary/README.md Run this command to build the Continue Core Binary. ```bash npm run build ``` -------------------------------- ### Install Vite Globally Source: https://github.com/continuedev/continue/blob/main/CONTRIBUTING.md Install Vite globally using npm. This is a pre-requisite for development. ```bash npm i -g vite ``` -------------------------------- ### Initialize CLI with Modes Source: https://github.com/continuedev/continue/blob/main/extensions/cli/spec/modes.md Start the CLI in a specific mode using command-line flags. ```bash cn --readonly "Help me analyze this code" # Starts in plan mode cn --auto "Fix all the linting errors" # Starts in auto mode cn "Let me implement this feature" # Starts in normal mode (default) ``` -------------------------------- ### Local Documentation Preview Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Command to start a local development server for previewing documentation changes. Visit http://localhost:3000 to view the site. ```bash cd docs npm run dev # Visit http://localhost:3000 ``` -------------------------------- ### Rules File Example Source: https://github.com/continuedev/continue/blob/main/docs/reference.mdx An example of a rule file that defines custom behavior, such as speaking like a pirate. ```md --- name: Pirate rule --- Talk like a pirate ``` -------------------------------- ### Validate Code Examples Prompt Source: https://github.com/continuedev/continue/blob/main/docs/guides/continue-docs-mcp-cookbook.mdx Prompt to verify the syntactic correctness of all code examples within a cookbook. ```bash # Test code examples "Verify that all code examples in this cookbook are syntactically correct" ``` -------------------------------- ### Install Sanity MCP via CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/sanity-mcp-continue-cookbook.mdx Quickly install the Sanity MCP using the Continue CLI command. ```bash cn --mcp sanity/sanity-mcp ``` -------------------------------- ### Initialize ClawRouter Source: https://github.com/continuedev/continue/blob/main/docs/customize/model-providers/more/clawrouter.mdx Run the npx clawrouter command to initialize ClawRouter. This command will create a wallet and output its address, which can then be funded to access premium models. ```bash npx clawrouter # Wallet created: 5g3cB6... # Fund your wallet to access premium models ``` -------------------------------- ### Install Sanity CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/sanity-mcp-continue-cookbook.mdx Install the Sanity command-line interface globally. This is a prerequisite for managing Sanity projects from your terminal. ```bash npm install -g @sanity/cli ``` -------------------------------- ### Initialize and Convert GetAssistant200Response Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/python/api/docs/GetAssistant200Response.md Demonstrates how to instantiate the model from JSON or a dictionary, and how to serialize it back to those formats. ```python from openapi_client.models.get_assistant200_response import GetAssistant200Response # TODO update the JSON string below json = "{}" # create an instance of GetAssistant200Response from a JSON string get_assistant200_response_instance = GetAssistant200Response.from_json(json) # print the JSON string representation of the object print(GetAssistant200Response.to_json()) # convert the object into a dict get_assistant200_response_dict = get_assistant200_response_instance.to_dict() # create an instance of GetAssistant200Response from a dict get_assistant200_response_from_dict = GetAssistant200Response.from_dict(get_assistant200_response_dict) ``` -------------------------------- ### Continue.from(options) Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/README.md Initializes a Continue instance to access the API client, OpenAI-compatible client, and assistant configurations. ```APIDOC ## Continue.from(options) ### Description Creates a Continue instance with a pre-configured OpenAI client and assistant. Returns an object containing the API client, and optionally an OpenAI-compatible client and assistant configuration. ### Parameters #### Request Body - **apiKey** (string) - Required - Your Continue API key - **assistant** (string) - Optional - The assistant identifier in the format owner-slug/assistant-slug - **organizationId** (string) - Optional - Optional organization ID - **baseURL** (string) - Optional - Base URL for the Continue API (defaults to https://api.continue.dev/) ### Response #### Success Response - **api** (object) - The Continue API client for direct API access - **client** (object) - An OpenAI-compatible client configured to use the Continue API (returned if assistant is provided) - **assistant** (object) - The assistant configuration with utility methods (returned if assistant is provided) ``` -------------------------------- ### Prompts File Example Source: https://github.com/continuedev/continue/blob/main/docs/reference.mdx An example of a prompt file that defines an invokable prompt, such as rewriting comments in a pirate style. ```md --- name: Make pirate comments invokable: true --- Rewrite all comments in the active file to talk like a pirate ``` -------------------------------- ### Create Example Tables for Testing Source: https://github.com/continuedev/continue/blob/main/docs/guides/supabase-mcp-database-workflow.mdx Define sample 'users' and 'posts' tables for testing RLS policies. Ensure you have a development environment set up in Supabase. ```sql CREATE TABLE users ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, email TEXT UNIQUE NOT NULL, created_at TIMESTAMPTZ DEFAULT NOW() ); CREATE TABLE posts ( id UUID DEFAULT gen_random_uuid() PRIMARY KEY, user_id UUID REFERENCES users(id), title TEXT NOT NULL, content TEXT, published BOOLEAN DEFAULT false, created_at TIMESTAMPTZ DEFAULT NOW() ); ``` -------------------------------- ### Query Optimization Rule Example Source: https://github.com/continuedev/continue/blob/main/docs/guides/sanity-mcp-continue-cookbook.mdx This bash command snippet shows how to use the Continue CLI to review GROQ queries for performance issues, suggesting optimizations like indexes or restructuring. ```bash "Review GROQ queries for performance issues and suggest indexes or query restructuring to improve response times." ``` -------------------------------- ### Install Snyk CLI Source: https://github.com/continuedev/continue/blob/main/docs/guides/snyk-mcp-continue-cookbook.mdx Install the Snyk CLI globally using npm. This is a prerequisite for authenticating with your Snyk account locally. ```bash npm install -g snyk ``` -------------------------------- ### Install Unpublished Hub API Package Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/typescript/api/README.md Install the hub-api package locally from a specific path. This is not recommended for production use. ```bash npm install PATH_TO_GENERATED_PACKAGE --save ``` -------------------------------- ### Example config.yaml for Model Configuration Source: https://github.com/continuedev/continue/blob/main/docs/reference.mdx This snippet shows a sample `config.yaml` file. It demonstrates how to configure multiple language models, including OpenAI's GPT-4o and Mistral's Codestral, with specific roles and options like `onlyMyCode`. ```yaml name: My Config version: 1.0.0 schema: v1 models: - name: GPT-4o provider: openai model: gpt-4o roles: - chat - edit - apply defaultCompletionOptions: temperature: 0.7 maxTokens: 1500 - name: Codestral provider: mistral model: codestral-latest roles: - autocomplete autocompleteOptions: debounceDelay: 250 maxPromptTokens: 1024 onlyMyCode: true - name: My Model - OpenAI-Compatible provider: openai apiBase: http://my-endpoint/v1 model: my-custom-model capabilities: - tool_use - image_input roles: - chat - edit ``` -------------------------------- ### Run Performance Analysis Prompt Source: https://github.com/continuedev/continue/blob/main/docs/guides/chrome-devtools-mcp-performance.mdx Analyzes the performance of a given URL and provides optimization recommendations using the pre-built agent. ```text Analyze performance of http://localhost:3000 and provide optimization recommendations ``` -------------------------------- ### Configure ClawRouter in Continue Source: https://github.com/continuedev/continue/blob/main/docs/customize/model-providers/more/clawrouter.mdx Configuration examples for adding ClawRouter to Continue using YAML or the deprecated JSON format. ```yaml name: My Config version: 0.0.1 schema: v1 models: - name: ClawRouter Auto provider: clawrouter model: blockrun/auto apiBase: http://localhost:1337/v1/ ``` ```json { "models": [ { "title": "ClawRouter Auto", "provider": "clawrouter", "model": "blockrun/auto", "apiBase": "http://localhost:1337/v1/" } ] } ``` -------------------------------- ### Configure Continue CLI with API Key (Headless/CI) Source: https://github.com/continuedev/continue/blob/main/docs/cli/quickstart.mdx Set the CONTINUE_API_KEY environment variable for headless or CI environments, then run a prompt. ```bash export CONTINUE_API_KEY=your-key-here cn -p "your prompt" ``` -------------------------------- ### Install OpenAPI Client via pip Source: https://github.com/continuedev/continue/blob/main/packages/continue-sdk/python/api/README.md Install the Python package directly from a Git repository using pip. This is useful if the package is hosted on a repository. ```sh pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git ``` -------------------------------- ### Generate API Documentation in Headless Mode Source: https://github.com/continuedev/continue/blob/main/docs/guides/notion-continue-guide.mdx This command automates fetching Notion databases, generating API documentation for specified routes, and saving it to Notion. It requires the Notion API key to be set. ```bash cn -p --auto "Fetch my Notion databases using the API key and secrets stored in this session. Generate API docs for src/api/routes and save to Notion in Technical Docs database" ``` -------------------------------- ### Basic config.yaml Structure Source: https://github.com/continuedev/continue/blob/main/docs/reference/yaml-migration.mdx Create a config.yaml file in your Continue Global Directory. This file requires a name and version, and will be loaded instead of config.json if present. ```yaml name: my-configuration version: 0.0.1 schema: v1 ``` -------------------------------- ### Install Continue CLI with yarn Source: https://github.com/continuedev/continue/blob/main/docs/overview.mdx Install the Continue CLI globally using yarn. This command adds the package to your system's global yarn packages. ```bash yarn global add @continuedev/cli ``` -------------------------------- ### Plugin Manifest Example Source: https://github.com/continuedev/continue/blob/main/extensions/intellij/rules.md This is an example of the plugin manifest file, which is essential for configuring the IntelliJ Platform Plugin. It defines the plugin's metadata and extension points. ```xml META-INF/plugin.xml ``` -------------------------------- ### Install Continue CLI with pnpm Source: https://github.com/continuedev/continue/blob/main/docs/overview.mdx Install the Continue CLI globally using pnpm. This command is used to add the package to your system's global pnpm modules. ```bash pnpm add -g @continuedev/cli ``` -------------------------------- ### Configure Multiple Built-in Slash Commands Source: https://github.com/continuedev/continue/blob/main/docs/reference/json-reference.mdx Example showing multiple built-in commands enabled simultaneously. ```json { "slashCommands": [ { "name": "commit", "description": "Generate a commit message" }, { "name": "share", "description": "Export this session as markdown" }, { "name": "cmd", "description": "Generate a shell command" } ] } ``` -------------------------------- ### Shell Mode Input Examples Source: https://github.com/continuedev/continue/blob/main/extensions/cli/spec/shell-mode.md Examples of shell commands executed via Shell Mode. The leading '!' is removed before execution, and the output is displayed as a Shell tool call. ```shell !git status ``` ```shell !echo hello ``` ```shell !some-unknown-cmd ``` -------------------------------- ### Switch Configuration at Runtime Source: https://github.com/continuedev/continue/blob/main/docs/cli/configuration.mdx Inside a TUI session, use the `/config` command to view and switch between available local configurations. The selected configuration is saved for future sessions. ```bash > /config ``` -------------------------------- ### Create Notion Changelog from GitHub PRs in Headless Mode Source: https://github.com/continuedev/continue/blob/main/docs/guides/notion-continue-guide.mdx Automate the creation of a Notion Launch document by analyzing merged GitHub PRs from the past month and using a Launch Template. Requires the Notion API key to be set. ```bash cn -p --auto " 1. Fetch my Notion databases using the API key stored in this session 2. Analyze all merged GitHub PRs from past month 3. In my Notion Launch Database, review the Launch Template. 4. Create an October Launch doc in Notion with a week of launches and materials based on the Launch documents based on the PR analysis and launch documents." ``` -------------------------------- ### Start and Verify Ollama Service Source: https://github.com/continuedev/continue/blob/main/docs/guides/ollama-guide.mdx Commands to start the Ollama service in the background and verify its status by checking the version and making a curl request to the local API endpoint. ```bash # Check Ollama version - verify it's installed ollama --version ``` ```bash # Start Ollama (runs in background) ollama serve ``` ```bash # Verify it's running curl http://localhost:11434 # Should return "Ollama is running" ``` -------------------------------- ### Test the Core Binary Source: https://github.com/continuedev/continue/blob/main/binary/README.md Run this command to execute tests for the Continue Core Binary. ```bash npm run test ``` -------------------------------- ### Headless Mode Examples: Git Hooks and CI Source: https://github.com/continuedev/continue/blob/main/docs/cli/headless-mode.mdx Examples of using headless mode for common automation tasks like reviewing code in git hooks or fixing errors in CI pipelines. These examples demonstrate the use of `--silent` and permission flags like `--allow Write`, `--allow Edit`, and `--allow Bash`. ```bash # Git hooks cn -p "Review staged changes for obvious bugs" --silent ``` ```bash # CI pipeline — allow file writes for auto-fix cn -p "Fix all ESLint errors in src/" --allow Write --allow Edit --allow Bash ```