#[non_exhaustive]pub struct Source {Show 17 fields
pub source: Option<SourceKind>,
pub url: Option<String>,
pub repo: Option<String>,
pub git_ref: Option<String>,
pub sha: Option<String>,
pub path: Option<String>,
pub skip_lfs: Option<bool>,
pub package: Option<String>,
pub version: Option<String>,
pub registry: Option<String>,
pub headers: Option<BTreeMap<String, String>>,
pub headers_helper: Option<String>,
pub host_pattern: Option<String>,
pub path_pattern: Option<String>,
pub name: Option<String>,
pub plugins: Option<Vec<InlinePlugin>>,
pub extra: Extra,
}Expand description
A marketplace or plugin source: source names the kind, and the
other fields are the ones that kind takes (github: repo, ref,
path; npm: package; and so on). One struct for every kind, so a
kind this crate doesn’t know still parses.
Used by extraKnownMarketplaces, strictKnownMarketplaces,
blockedMarketplaces and an inline marketplace’s plugins.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.source: Option<SourceKind>§url: Option<String>§repo: Option<String>§git_ref: Option<String>Git branch or tag to use (e.g., “main”, “v1.0.0”). Defaults to repository default branch.
- Values: string
- Default: unset
Docs: ref.
sha: Option<String>A plugin source’s exact commit SHA, which pins the plugin.
- Values: string, a full commit SHA
- Default: unset
Docs: sha.
path: Option<String>Path to marketplace.json within repo (defaults to .claude-plugin/marketplace.json).
- Values: string
- Default: unset
Docs: path.
skip_lfs: Option<bool>Skip Git LFS downloads when Claude Code clones or updates the marketplace repository. LFS pointer files remain as pointers instead of downloading their content. Use this when the repository contains large LFS objects unrelated to plugin content.
- Values: Boolean
- Default: unset
Docs: skipLfs.
package: Option<String>§version: Option<String>§registry: Option<String>§headers: Option<BTreeMap<String, String>>A url source’s extra request headers, for authenticated access.
- Values: object mapping header names to values
- Default: unset
Docs: headers.
headers_helper: Option<String>A url source’s command that prints headers whose values are too short-lived to list in
headers. Claude Code runs it before each fetch of the marketplace and each plugin
download from its origin, reusing its output for up to 60 seconds. Requires Claude Code
v2.1.238 or later.
- Values: string, a command
- Default: unset
Docs: headersHelper.
host_pattern: Option<String>Git host pattern to trust for repositories in source specifications.
- Values: string
- Default: unset
Docs: hostPattern.
path_pattern: Option<String>A pathPattern source (in strictKnownMarketplaces and blockedMarketplaces): a
regular expression matched against local marketplace paths.
- Values: string, a regular expression
- Default: unset
Docs: pathPattern.
name: Option<String>§plugins: Option<Vec<InlinePlugin>>Plugins declared inline. Each must reference an external source such as GitHub or npm. You still need to enable each plugin separately in enabledPlugins.
- Values: array of object
- Default: unset
Docs: plugins.
extra: ExtraKeys Claude Code accepts here that this crate doesn’t model (newer or undocumented ones), kept as written so the document round-trips.