diff --git a/commands/dotfiles_pull.go b/commands/dotfiles_pull.go index 7af264d..7c78c2e 100644 --- a/commands/dotfiles_pull.go +++ b/commands/dotfiles_pull.go @@ -64,6 +64,7 @@ func pullDotfiles(c *cli.Context) error { "zsh": model.NewZshApp(), "bash": model.NewBashApp(), "ghostty": model.NewGhosttyApp(), + "claude": model.NewClaudeApp(), } // Process fetched dotfiles @@ -138,7 +139,7 @@ func pullDotfiles(c *cli.Context) error { // Filter out files that are already equal filesToUpdate := make(map[string]string) var pathsToActuallyBackup []string - + for path, content := range filesToProcess { if isEqual, exists := equalityMap[path]; exists && isEqual { logrus.Debugf("Skipping %s - content is identical", path) diff --git a/commands/dotfiles_push.go b/commands/dotfiles_push.go index 6bbb152..e23ba1b 100644 --- a/commands/dotfiles_push.go +++ b/commands/dotfiles_push.go @@ -42,6 +42,7 @@ func pushDotfiles(c *cli.Context) error { model.NewZshApp(), model.NewBashApp(), model.NewGhosttyApp(), + model.NewClaudeApp(), } // Filter apps based on user input @@ -97,4 +98,4 @@ func pushDotfiles(c *cli.Context) error { fmt.Printf("📁 Manage your dotfiles at: %s\n", webLink) return nil -} \ No newline at end of file +} diff --git a/model/dotfile_claude.go b/model/dotfile_claude.go new file mode 100644 index 0000000..4aa0850 --- /dev/null +++ b/model/dotfile_claude.go @@ -0,0 +1,27 @@ +package model + +import "context" + +// ClaudeApp handles Claude Code configuration files +type ClaudeApp struct { + BaseApp +} + +func NewClaudeApp() DotfileApp { + return &ClaudeApp{} +} + +func (c *ClaudeApp) Name() string { + return "claude" +} + +func (c *ClaudeApp) GetConfigPaths() []string { + return []string{ + "~/.claude/settings.json", + "~/.claude/CLAUDE.md", + } +} + +func (c *ClaudeApp) CollectDotfiles(ctx context.Context) ([]DotfileItem, error) { + return c.CollectFromPaths(ctx, c.Name(), c.GetConfigPaths()) +}