summaryrefslogtreecommitdiff
path: root/internal/cmd/showcase.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-08-31 16:18:07 +0300
committerPaul Buetow <paul@buetow.org>2025-08-31 16:18:07 +0300
commit45e9f23077ee8270542370e0c2307aa9dbecf63a (patch)
tree45e45d5dea24445097b352dc418f0444cabb13d7 /internal/cmd/showcase.go
parente5cf30e8df255fe4d4d34db7fc076f26a2b84fee (diff)
some fixes
Diffstat (limited to 'internal/cmd/showcase.go')
-rw-r--r--internal/cmd/showcase.go62
1 files changed, 34 insertions, 28 deletions
diff --git a/internal/cmd/showcase.go b/internal/cmd/showcase.go
index 7785d6f..ea5128c 100644
--- a/internal/cmd/showcase.go
+++ b/internal/cmd/showcase.go
@@ -9,19 +9,21 @@ import (
)
var (
- forceRegenerate bool
- outputPath string
- outputFormat string
- excludePattern string
- showcaseAITool string
+ forceRegenerate bool
+ outputPath string
+ outputFormat string
+ excludePattern string
+ showcaseAITool string
+ showcaseRepo string
)
var showcaseCmd = &cobra.Command{
Use: "showcase",
Short: "Generate AI-powered project showcase",
- Long: `Generate a comprehensive showcase of all your projects using AI.
-This feature creates a formatted document with project summaries, statistics,
-and code snippets. By default uses Claude, but can also use aichat.`,
+ Long: `Generate a comprehensive showcase of all your projects using AI.
+This feature creates a formatted document with project summaries, statistics,
+and code snippets. By default uses Claude, but will try hexai first if available,
+then codex (if installed), and can also use aichat.`,
Example: ` # Generate showcase with cached summaries
gitsyncer showcase
@@ -37,27 +39,31 @@ and code snippets. By default uses Claude, but can also use aichat.`,
# Exclude certain repositories
gitsyncer showcase --exclude "test-.*"
- # Use aichat instead of claude for AI summaries
- gitsyncer showcase --ai-tool aichat`,
- Run: func(cmd *cobra.Command, args []string) {
- flags := buildFlags()
- flags.Showcase = true
- flags.Force = forceRegenerate
- flags.AITool = showcaseAITool
-
- fmt.Println("Running showcase generation for all repositories...")
- exitCode := cli.HandleShowcaseOnly(cfg, flags)
- os.Exit(exitCode)
- },
+ # Use a specific AI tool
+ gitsyncer showcase --ai-tool hexai`,
+ Run: func(cmd *cobra.Command, args []string) {
+ flags := buildFlags()
+ flags.Showcase = true
+ flags.Force = forceRegenerate
+ flags.AITool = showcaseAITool
+ if showcaseRepo != "" {
+ flags.SyncRepo = showcaseRepo
+ }
+
+ fmt.Println("Running showcase generation for all repositories...")
+ exitCode := cli.HandleShowcaseOnly(cfg, flags)
+ os.Exit(exitCode)
+ },
}
func init() {
- rootCmd.AddCommand(showcaseCmd)
-
- // Showcase flags
- showcaseCmd.Flags().BoolVarP(&forceRegenerate, "force", "f", false, "force regeneration of cached summaries")
- showcaseCmd.Flags().StringVarP(&outputPath, "output", "o", "", "custom output path (default: ~/git/foo.zone-content/gemtext/about/showcase.gmi.tpl)")
- showcaseCmd.Flags().StringVar(&outputFormat, "format", "gemtext", "output format: gemtext, markdown, html")
- showcaseCmd.Flags().StringVar(&excludePattern, "exclude", "", "exclude repos matching pattern")
- showcaseCmd.Flags().StringVar(&showcaseAITool, "ai-tool", "claude", "AI tool to use for project summaries (claude or aichat)")
+ rootCmd.AddCommand(showcaseCmd)
+
+ // Showcase flags
+ showcaseCmd.Flags().BoolVarP(&forceRegenerate, "force", "f", false, "force regeneration of cached summaries")
+ showcaseCmd.Flags().StringVarP(&outputPath, "output", "o", "", "custom output path (default: ~/git/foo.zone-content/gemtext/about/showcase.gmi.tpl)")
+ showcaseCmd.Flags().StringVar(&outputFormat, "format", "gemtext", "output format: gemtext, markdown, html")
+ showcaseCmd.Flags().StringVar(&excludePattern, "exclude", "", "exclude repos matching pattern")
+ showcaseCmd.Flags().StringVar(&showcaseAITool, "ai-tool", "claude", "AI tool for summaries: hexai, claude, claude-code, codex, or aichat (default tries hexai→claude→codex→aichat)")
+ showcaseCmd.Flags().StringVar(&showcaseRepo, "repo", "", "only generate showcase for a single repository")
}