summaryrefslogtreecommitdiff
path: root/internal/cli/flags.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-10-31 20:13:32 +0200
committerPaul Buetow <paul@buetow.org>2025-10-31 20:13:32 +0200
commit11eea6a82cbfdde40ec1457c6ea080da4da6b7dc (patch)
tree8026068f6a3beb3ee02c45f06f4487f4b89caaf1 /internal/cli/flags.go
parent5c3e0b5cf99d028c4f06be7a825388b296e37a22 (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/cli/flags.go')
-rw-r--r--internal/cli/flags.go72
1 files changed, 36 insertions, 36 deletions
diff --git a/internal/cli/flags.go b/internal/cli/flags.go
index 43d9fa3..5c6914c 100644
--- a/internal/cli/flags.go
+++ b/internal/cli/flags.go
@@ -4,39 +4,39 @@ import (
"flag"
"os"
"path/filepath"
-
+
"codeberg.org/snonux/gitsyncer/internal/state"
)
// Flags holds all command-line flag values
type Flags struct {
- VersionFlag bool
- ConfigPath string
- ListOrgs bool
- ListRepos bool
- SyncRepo string
- SyncAll bool
- SyncCodebergPublic bool
- SyncGitHubPublic bool
- FullSync bool
- CreateGitHubRepos bool
+ VersionFlag bool
+ ConfigPath string
+ ListOrgs bool
+ ListRepos bool
+ SyncRepo string
+ SyncAll bool
+ SyncCodebergPublic bool
+ SyncGitHubPublic bool
+ FullSync bool
+ CreateGitHubRepos bool
CreateCodebergRepos bool
- DryRun bool
- WorkDir string
- TestGitHubToken bool
- Clean bool
- DeleteRepo string
- Backup bool
- Showcase bool
- Force bool
- BatchRun bool
- CheckReleases bool
- NoCheckReleases bool
- AutoCreateReleases bool
- AIReleaseNotes bool
- UpdateReleases bool
- AITool string
-
+ DryRun bool
+ WorkDir string
+ TestGitHubToken bool
+ Clean bool
+ DeleteRepo string
+ Backup bool
+ Showcase bool
+ Force bool
+ BatchRun bool
+ CheckReleases bool
+ NoCheckReleases bool
+ AutoCreateReleases bool
+ AIReleaseNotes bool
+ UpdateReleases bool
+ AITool string
+
// Internal fields for batch run state management (not set by flags)
BatchRunStateManager *state.Manager
BatchRunState *state.State
@@ -45,7 +45,7 @@ type Flags struct {
// ParseFlags parses command-line flags and returns the flags struct
func ParseFlags() *Flags {
f := &Flags{}
-
+
flag.BoolVar(&f.VersionFlag, "version", false, "print version information")
flag.BoolVar(&f.VersionFlag, "v", false, "print version information (short)")
flag.StringVar(&f.ConfigPath, "config", "", "path to configuration file")
@@ -65,17 +65,17 @@ func ParseFlags() *Flags {
flag.BoolVar(&f.Clean, "clean", false, "delete all repositories in work directory (with confirmation)")
flag.StringVar(&f.DeleteRepo, "delete-repo", "", "delete specified repository from all configured organizations (with confirmation)")
flag.BoolVar(&f.Backup, "backup", false, "enable syncing to backup locations")
- flag.BoolVar(&f.Showcase, "showcase", false, "generate project showcase using Claude after syncing")
+ flag.BoolVar(&f.Showcase, "showcase", false, "generate project showcase using AI (amp by default) after syncing")
flag.BoolVar(&f.Force, "force", false, "force regeneration of cached data")
flag.BoolVar(&f.BatchRun, "batch-run", false, "enable --full and --showcase (runs only once per week)")
flag.BoolVar(&f.CheckReleases, "check-releases", false, "manually check for version tags without releases and create them (with confirmation)")
flag.BoolVar(&f.NoCheckReleases, "no-check-releases", false, "disable automatic release checking after sync operations")
flag.BoolVar(&f.AutoCreateReleases, "auto-create-releases", false, "automatically create releases without confirmation prompts")
- flag.BoolVar(&f.AIReleaseNotes, "ai-release-notes", false, "generate release notes using Claude AI based on git diff")
+ flag.BoolVar(&f.AIReleaseNotes, "ai-release-notes", false, "generate release notes using AI (amp by default) based on git diff")
flag.BoolVar(&f.UpdateReleases, "update-releases", false, "update existing releases with new AI-generated notes")
-
+
flag.Parse()
-
+
// Set default WorkDir if not provided
if f.WorkDir == "" {
home, err := os.UserHomeDir()
@@ -86,7 +86,7 @@ func ParseFlags() *Flags {
f.WorkDir = ".gitsyncer-work"
}
}
-
+
// Handle --full flag by enabling all sync operations
if f.FullSync {
f.SyncCodebergPublic = true
@@ -94,7 +94,7 @@ func ParseFlags() *Flags {
f.CreateGitHubRepos = true
f.CreateCodebergRepos = true
}
-
+
// Handle --batch-run flag by enabling --full and --showcase
if f.BatchRun {
f.FullSync = true
@@ -105,6 +105,6 @@ func ParseFlags() *Flags {
f.CreateGitHubRepos = true
f.CreateCodebergRepos = true
}
-
+
return f
-} \ No newline at end of file
+}