Skip to main content

MorphClient

Unified client for all Morph tools.

Namespaces

Standalone Clients (Advanced)

Need custom configuration per tool? Use individual clients:
Use when: You need tool-specific configuration that differs from defaults (custom URLs, different timeouts, etc.).

Fast Apply

morph.fastApply.execute(input, overrides?)

Edit files with AI-powered merge.

Framework Adapters

Types


morph.codebaseSearch.search(input, overrides?)

Semantic code search with 2-stage retrieval.

Framework Adapters

Types

Requires git push: Code must be pushed with MorphGit to generate embeddings before searching.

Git Operations

morph.git.*

Access the MorphGit client via morph.git.

Repository Management

Basic Operations

Status & History

Branching

Auto-embedding on push: Every git.push() triggers automatic embedding generation for semantic search (~8 seconds in background).

Environment Variables

Get your API key: morphllm.com/dashboard/api-keys

Import Patterns

Framework Adapters


Error Handling

All tools return results with success: boolean and optional error: string.
Automatic retries: SDK automatically retries failed requests with exponential backoff for transient errors (rate limits, timeouts).

Next Steps

Examples

See real-world usage patterns

Dashboard

Monitor usage and manage API keys