diff options
| author | Paul Buetow <paul@buetow.org> | 2025-10-31 20:13:32 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-10-31 20:13:32 +0200 |
| commit | 11eea6a82cbfdde40ec1457c6ea080da4da6b7dc (patch) | |
| tree | 8026068f6a3beb3ee02c45f06f4487f4b89caaf1 /internal/cmd/showcase.go | |
| parent | 5c3e0b5cf99d028c4f06be7a825388b296e37a22 (diff) | |
feat: implement amp AI tool support and replace Taskfile with Magev0.10.0
- Add amp as default AI tool for release notes and showcase generation
- Fallback chain: amp → hexai → claude → aichat
- Replace Taskfile.yaml with magefile.go for build automation
- Update all documentation (README.md, AGENTS.md, doc/development.md)
- Update version to 0.10.0
Amp-Thread-ID: https://ampcode.com/threads/T-735ba1e2-0255-4b43-8ed1-6c0d2f78301b
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'internal/cmd/showcase.go')
| -rw-r--r-- | internal/cmd/showcase.go | 65 |
1 files changed, 32 insertions, 33 deletions
diff --git a/internal/cmd/showcase.go b/internal/cmd/showcase.go index 6f9f984..a590756 100644 --- a/internal/cmd/showcase.go +++ b/internal/cmd/showcase.go @@ -4,26 +4,25 @@ import ( "fmt" "os" - "github.com/spf13/cobra" "codeberg.org/snonux/gitsyncer/internal/cli" + "github.com/spf13/cobra" ) var ( - forceRegenerate bool - outputPath string - outputFormat string - excludePattern string - showcaseAITool string - showcaseRepo 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. + 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, -and can also use aichat.`, +and code snippets. By default uses amp, with fallback to hexai, claude, and aichat.`, Example: ` # Generate showcase with cached summaries gitsyncer showcase @@ -40,30 +39,30 @@ and can also use aichat.`, gitsyncer showcase --exclude "test-.*" # 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) - }, + gitsyncer showcase --ai-tool amp`, + 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 for summaries: hexai, claude, claude-code, or aichat (default tries hexai→claude→aichat)") - showcaseCmd.Flags().StringVar(&showcaseRepo, "repo", "", "only generate showcase for a single repository") + 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", "amp", "AI tool for summaries: amp, hexai, claude, claude-code, or aichat (default tries amp→hexai→claude→aichat)") + showcaseCmd.Flags().StringVar(&showcaseRepo, "repo", "", "only generate showcase for a single repository") } |
