Skip to main content

Profile

Struct Profile 

Source
pub struct Profile {
    pub name: String,
    pub path: PathBuf,
    /* private fields */
}
Expand description

A profile containing configuration files for Claude Code

Profile aggregates related metadata with lazy loading:

  • PluginManifest from .claude-plugin/plugin.json
  • ProfileMetadata from .dot-agent.toml
  • FilterConfig from .dot-agent.toml filter section

Fields§

§name: String§path: PathBuf

Implementations§

Source§

impl Profile

Source

pub fn new(name: String, path: PathBuf) -> Self

Source

pub fn manifest(&self) -> Result<Option<&PluginManifest>>

Get plugin manifest (lazy loaded from .claude-plugin/plugin.json)

Source

pub fn metadata(&self) -> Result<Option<&ProfileMetadata>>

Get profile metadata (lazy loaded from .dot-agent.toml)

Source

pub fn filter_config(&self) -> Result<Option<&FilterConfig>>

Get filter config (lazy loaded from .dot-agent.toml)

Source

pub fn source(&self) -> Result<ProfileSource>

Get profile source (Local, Git, or Marketplace)

Source

pub fn version(&self) -> Result<Option<String>>

Get profile version

Source

pub fn description(&self) -> Result<Option<String>>

Get profile description

Source

pub fn category_store(&self) -> Result<CategoryStore>

Get category store (builtin + profile overrides)

Returns a CategoryStore with builtin categories, optionally overridden by categories defined in .dot-agent.toml.

Source

pub fn has_plugin_features(&self) -> bool

Check if profile has plugin features (hooks, MCP, LSP)

Source

pub fn plugin_scope(&self) -> Result<PluginScope>

Get plugin scope (User, Project, or Local)

Source

pub fn plugin_enabled(&self) -> Result<bool>

Check if plugin is enabled

Source

pub fn list_files(&self) -> Result<Vec<PathBuf>>

List all files in the profile directory (relative paths) with default ignore config

Source

pub fn list_files_with_config( &self, config: &IgnoreConfig, ) -> Result<Vec<PathBuf>>

List all files in the profile directory (relative paths) with custom ignore config

File collection logic:

  1. Build allowed filter: (DEFAULT_DIRS or plugin paths) + CLAUDE.md + include - exclude
  2. Walk all files and collect only those matching the filter
Source

pub fn contents_summary(&self) -> String

Get contents summary (e.g., “skills (5), commands (3)”)

Source

pub fn contents_summary_with_config(&self, config: &IgnoreConfig) -> String

Get contents summary with custom ignore config

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.