docs/sdk/plugin-install.mdx
The Cline CLI provides a plugin install command to install plugins from various sources. You can also load plugins programmatically via session config.
Use the cline plugin install command to install plugins from npm, git repositories, or local paths.
cline plugin install <source> [options]
The shorthand cline plugin i works as well.
cline plugin install --npm @scope/plugin-name
Installs the package from the npm registry into the Cline plugin directory.
cline plugin install --git https://github.com/owner/repo.git
cline plugin install --git github.com/owner/repo
Clones the repository (shallow, with blobless filter for speed) and installs its dependencies. The .git directory is excluded from the final install.
cline plugin install ./path/to/plugin.ts # Single file
cline plugin install /absolute/path/to/dir # Directory with package.json
Supports both files and directories. Local installs copy the source, filter out .git and node_modules, and run npm install to resolve dependencies.
| Option | Description |
|---|---|
--npm | Treat the source as an npm package name |
--git | Treat the source as a git repository URL |
--force | Overwrite an existing plugin at the same path |
--json | Output results as JSON (useful for scripting) |
--cwd | Working directory for relative paths |
# Install a local plugin directory
cline plugin install ./my-custom-plugin
# Install an npm package as a plugin
cline plugin install --npm @cline/plugin-sql
# Install from a GitHub repo
cline plugin install --git https://github.com/my-org/my-plugin.git
# Force reinstall an existing plugin
cline plugin install --force --npm @scope/plugin-name
# Use shorthand
cline plugin i --git github.com/owner/repo
Installed plugins appear in the plugins section of your CLI config:
cline config
pluginPaths (ClineCore)In SDK code, load plugins from file paths using the pluginPaths session config option:
import { ClineCore } from "@cline/sdk"
const cline = await ClineCore.create({ clientName: "my-app" })
await cline.start({
config: {
systemPrompt: "Analyze this project",
// ...model/runtime config
pluginPaths: ["/absolute/path/to/plugin.ts"],
},
})
Plugin files must export an AgentPlugin as the default export.
plugins (Agent Runtime)When using the Agent or AgentRuntime directly, pass plugin instances in the plugins array:
import { Agent } from "@cline/sdk"
import { myPlugin } from "./my-plugin"
const agent = new Agent({
providerId: "anthropic",
modelId: "claude-sonnet-4-6",
plugins: [myPlugin],
})
extensions (ClineCore)With ClineCore, use the extensions config array instead:
import { ClineCore } from "@cline/sdk"
const cline = await ClineCore.create({ clientName: "my-app" })
await cline.start({
config: {
systemPrompt: "Analyze customer records",
extensions: [myPlugin],
},
})