Documentation
¶
Overview ¶
Package constants defines all shared constant values for gitmap. No magic strings — all literals used for comparison, defaults, formats, and file extensions live here.
Split into focused files:
constants.go — core defaults, modes, formats, permissions constants_git.go — git command and argument strings constants_cli.go — CLI command names, help text, flag descriptions constants_terminal.go — ANSI colors, terminal sections, table headers constants_messages.go — user-facing messages and error strings constants_release.go — release workflow messages and setup sections
Package constants — constants_v331.go centralizes the new strings introduced in v3.31.0 for: cross-dir release (`r <repo> <ver>`), cross-dir clone-next (`cn <repo> <ver>`), `has-change` (`hc`), and the SSH existing-key-on-disk fix. Kept in a single file (rather than scattered across domain files) to keep the v3.31.0 surface area easy to audit and unwind.
Index ¶
Constants ¶
const ( ModeHTTPS = "https" ModeSSH = "ssh" )
Clone modes.
const ( OutputTerminal = "terminal" OutputCSV = "csv" OutputJSON = "json" )
Output formats.
const ( PrefixHTTPS = "https://" PrefixSSH = "git@" )
URL prefixes.
const ( ExtCSV = ".csv" ExtJSON = ".json" ExtTXT = ".txt" ExtGit = ".git" )
File extensions.
const ( ReleaseDirName = "release" OutputDirName = "output" DeployedDirName = "deployed" )
Subdirectory names within .gitmap/.
const ( LegacyOutputDir = "gitmap-output" LegacyReleaseDir = ".release" LegacyDeployedDir = ".deployed" )
Legacy directory names (pre-.gitmap migration).
const ( DefaultCSVFile = "gitmap.csv" DefaultJSONFile = "gitmap.json" DefaultTextFile = "gitmap.txt" DefaultVerboseLogDir = GitMapDir + "/output" DefaultStructureFile = "folder-structure.md" DefaultCloneScript = "clone.ps1" DefaultDirectCloneScript = "direct-clone.ps1" DefaultDirectCloneSSHScript = "direct-clone-ssh.ps1" DefaultDesktopScript = "register-desktop.ps1" DefaultScanCacheFile = "last-scan.json" DefaultConfigPath = "./data/config.json" DefaultSetupConfigPath = "./data/git-setup.json" DefaultBuildOutput = "./bin" DefaultOutputDir = ".gitmap/output" DefaultOutputFolder = "output" DefaultBranch = "main" DefaultDir = "." DefaultVersionFile = "version.json" )
Default file names.
const ( DateDisplayLayout = "02-Jan-2006 03:04 PM" DateUTCSuffix = " (UTC)" )
Date display formatting.
const ( SortByDate = "date" SortByName = "name" )
Sort orders.
const ( BumpMajor = "major" BumpMinor = "minor" BumpPatch = "patch" )
Bump levels.
const ( SafePullRetryAttempts = 4 SafePullRetryDelayMS = 600 WindowsPathWarnThreshold = 240 )
Safe-pull defaults.
const ( CmdAlias = "alias" CmdAliasShort = "a" SubCmdAliasSet = "set" SubCmdAliasRm = "remove" SubCmdAliasList = "list" SubCmdAliasShow = "show" SubCmdAliasSug = "suggest" )
gitmap:cmd top-level Alias command names.
const ( SQLInsertAlias = `INSERT INTO Alias (Alias, RepoId) VALUES (?, ?)` SQLUpdateAlias = `UPDATE Alias SET RepoId = ? WHERE Alias = ?` SQLSelectAllAliases = `SELECT a.AliasId, a.Alias, a.RepoId, a.CreatedAt FROM Alias a ORDER BY a.Alias` SQLSelectAliasByName = `SELECT a.AliasId, a.Alias, a.RepoId, a.CreatedAt FROM Alias a WHERE a.Alias = ?` SQLSelectAliasByRepoID = `SELECT a.AliasId, a.Alias, a.RepoId, a.CreatedAt FROM Alias a WHERE a.RepoId = ?` SQLDeleteAlias = `DELETE FROM Alias WHERE Alias = ?` SQLSelectAliasWithRepo = `` /* 144-byte string literal not displayed */ SQLSelectAllAliasesWithRepo = `` /* 143-byte string literal not displayed */ SQLSelectUnaliasedRepos = `` /* 132-byte string literal not displayed */ )
SQL: alias operations (v15: Alias singular, AliasId PK).
const ( SQLDropAlias = "DROP TABLE IF EXISTS Alias" SQLDropAliases = "DROP TABLE IF EXISTS Aliases" // legacy )
SQL: drop Alias table (and legacy plural for safety on Reset).
const ( FlagDescAliasApply = "Auto-accept all alias suggestions" FlagDescAliasFlag = "Target a repository by its alias" )
Alias flag descriptions.
const ( MsgAliasCreated = " ✓ Alias %q → %s\n" MsgAliasUpdated = " ✓ Updated alias %q → %s\n" MsgAliasRemoved = " ✓ Removed alias %q\n" MsgAliasResolved = " → Resolved alias %q → %s (slug: %s)\n" MsgAliasSuggest = " %-20s → %-10s Accept? (y/N): " MsgAliasSuggestDone = " ✓ Created %d alias(es).\n" MsgAliasSuggestNone = " All repos already have aliases." MsgAliasListHeader = "\n Aliases (%d):\n\n" MsgAliasListRow = " %-15s → %s\n" MsgAliasConflict = " ⚠ Alias %q already points to %s.\n" MsgAliasReassign = " → Reassign to %s? (y/N): " MsgAliasBothWarn = " ⚠ Both alias and slug provided — using alias %q.\n" )
Alias messages.
const ( ErrAliasNotFound = "no alias found: %s" ErrAliasEmpty = "alias name cannot be empty" ErrAliasInvalid = "alias must be alphanumeric with hyphens: %s" ErrAliasShadow = "alias cannot shadow command: %s" ErrAliasCreate = "failed to create alias: %v" ErrAliasQuery = "failed to query aliases: %v" ErrAliasDelete = "failed to delete alias: %v" ErrAliasRepoMissing = "repo not found for alias target: %s" )
Alias error messages.
const ( CmdAmend = "amend" CmdAmendAlias = "am" CmdAmendList = "amend-list" CmdAmendListAlias = "al" )
gitmap:cmd top-level Amend command.
const ( FlagAmendName = "name" FlagAmendEmail = "email" FlagAmendBranch = "branch" FlagAmendDryRun = "dry-run" FlagAmendForcePush = "force-push" )
Amend flag names.
const ( FlagDescAmendName = "New author name for commits" FlagDescAmendEmail = "New author email for commits" FlagDescAmendBranch = "Target branch (default: current branch)" FlagDescAmendDryRun = "Preview which commits would be amended" FlagDescAmendForcePush = "Auto-run git push --force-with-lease after amend" )
Amend flag descriptions.
const ( AmendModeAll = "all" AmendModeRange = "range" AmendModeHead = "head" )
Amend modes.
const ( AmendAuditDir = ".gitmap/amendments" AmendAuditFilePrefix = "amend-" )
Amend audit directory.
const ( MsgAmendHeader = "amend: rewriting %d commits from %s..%s (branch: %s)\n" MsgAmendHeaderAll = "amend: rewriting %d commits on branch: %s\n" MsgAmendAuthor = " author: %q -> %q\n" MsgAmendProgress = " [%d/%d] %s - %s\n" MsgAmendDone = "\nDone: %d commits amended\n" MsgAmendAuditFile = " Audit log: %s\n" MsgAmendAuditDB = " Database: 1 record saved to Amendments table\n" MsgAmendForcePush = " Force push: completed\n" MsgAmendWarnPush = "Warning: Run 'git push --force-with-lease' to update the remote\n" MsgAmendDryHeader = "amend (dry-run): %d commits would be rewritten\n" MsgAmendDryLine = " [%d] %s - %s (author: %s <%s>)\n" MsgAmendDrySkip = " No changes applied (dry-run mode)\n" MsgAmendCheckout = " Switching to branch: %s\n" MsgAmendReturn = " Returning to branch: %s\n" MsgAmendWarnRewrite = "Warning: This rewrites Git history and requires force-push.\n" )
Amend terminal messages.
const ( ErrAmendNoFlags = "error: at least one of --name or --email is required\n" ErrAmendCheckout = "error: failed to checkout branch %s: %v\n" ErrAmendListCommits = "error: failed to list commits: %v\n" ErrAmendFilter = "error: git filter-branch failed: %v\n" ErrAmendForcePush = "error: force push failed: %v\n" ErrAmendAuditWrite = "error: failed to write audit file: %v\n" ErrAmendCommitAmend = "error: git commit --amend failed: %v\n" ErrAmendNoCommits = "error: no commits found in the specified range\n" )
Amend error messages.
const ( HelpAmend = " amend (am) [hash] Rewrite author name/email on commits" HelpAmendList = " amend-list (al) Show stored amendments from database (--limit N, --json, --branch)" HelpAmendFlags = "Amend flags:" HelpAmendName = " --name <name> New author name" HelpAmendEmail = " --email <email> New author email" HelpAmendBr = " --branch <branch> Target branch (default: current)" HelpAmendDry = " --dry-run Preview which commits would be amended" HelpAmendForce = " --force-push Auto force-push after amend" )
Amend help text.
const ( MsgAmendListEmpty = "No amendments found." MsgAmendListHeader = "Amendments: %d record(s)\n" MsgAmendListSeparator = "" /* 246-byte string literal not displayed */ MsgAmendListColumns = "BRANCH MODE COMMITS PREV AUTHOR NEW AUTHOR PUSHED DATE" MsgAmendListRowFmt = "%-15s %-7s %7d %-12s %-12s %-12s %-12s %-6s %s\n" )
Amend-list terminal messages.
const ( SQLInsertAmendment = `` /* 173-byte string literal not displayed */ SQLSelectAllAmendments = `` /* 181-byte string literal not displayed */ SQLSelectAmendmentsByBranch = `` /* 198-byte string literal not displayed */ SQLDropAmendment = "DROP TABLE IF EXISTS Amendment" SQLDropAmendments = "DROP TABLE IF EXISTS Amendments" // legacy )
SQL: amendment operations (v15).
const ( CmdAs = "as" CmdAsAlias = "s-alias" LogPrefixAs = "[as]" FlagAsForce = "force" FlagAsForceS = "f" )
gitmap:cmd top-level `gitmap as` — register a short name (alias) for the current Git repo.
Spec: docs in helptext/as.md and README.
const ( MsgAsRegisteredFmt = " ✓ Registered repo '%s' as alias '%s' (path: %s)\n" MsgAsUpdatedFmt = " ✓ Updated alias '%s' -> repo '%s' (path: %s)\n" MsgAsDBSyncedFmt = " ✓ Database now tracks repo '%s' (slug: %s)\n" MsgAsHintNext = " Tip: run `gitmap release-alias %s <version>` from anywhere to release this repo.\n" ErrAsNotInRepoFmt = "error: not inside a Git repository (cwd: %s). Run this from inside the repo's working tree." ErrAsResolveFmt = "error: could not resolve repo metadata for %s: %v" ErrAsAliasInUseFmt = "error: alias '%s' is already mapped to a different repo (slug '%s'). Pass --force to overwrite." ErrAsUsage = "Usage: gitmap as [alias-name] [--force]\n (omit alias-name to use the repo folder's basename)" )
User-facing messages for the `as` command.
const ( AssetsStagingDir = ".gitmap/release-assets" GitHubTokenEnv = "GITHUB_TOKEN" )
Go release asset constants.
const ( FlagDescBin = "Cross-compile Go binaries and include in release assets" FlagDescTargets = "Comma-separated cross-compile targets (e.g. windows/amd64,linux/arm64)" FlagDescListTargets = "Print resolved target matrix and exit" )
Asset flag descriptions.
const ( HelpBin = " --bin, -b Cross-compile Go binaries and include in release assets" HelpTargets = " --targets <list> Cross-compile targets: windows/amd64,linux/arm64" HelpListTargets = " --list-targets Print resolved target matrix and exit" )
Asset help text.
const ( MsgListTargetsHeader = "Release targets (%d):\n" MsgListTargetsSource = "Source: %s\n\n" MsgListTargetsRow = " %s/%s\n" )
List-targets messages.
const ( MsgAssetDetected = " → Detected Go project: %s\n" MsgAssetCrossCompile = "\n Cross-compiling %d target(s)...\n" MsgAssetBuilt = " ✓ Built %s (%s/%s)\n" MsgAssetBuildSummary = " → Built %d/%d binaries successfully\n" MsgAssetUploaded = " ✓ Uploaded %s\n" MsgAssetUploadStart = "\n Uploading %d asset(s) to GitHub...\n" MsgAssetSkipped = "" MsgAssetNoMain = " → No buildable main package found, skipping binaries\n" MsgAssetNoGoProject = "" MsgAssetStagingClean = " ✓ Cleaned up staging directory\n" )
Asset messages.
const ( ScriptReleaseVersionPS1 = "release-version.ps1" ScriptReleaseVersionSh = "release-version.sh" ReleaseVersionSnapshotPS1Fmt = "release-version-%s.ps1" ReleaseVersionSnapshotShFmt = "release-version-%s.sh" MsgReleaseScriptSnapshot = " ✓ Generated release-script snapshot: %s\n" ErrReleaseScriptSnapshot = "Error: snapshot generation failed for %s: %v (operation: bake-version)\n" )
Release-version snapshot install scripts (spec 105).
The same `release-version.ps1` / `release-version.sh` source ships in two forms: the always-current generic script under gitmap/scripts/, and per-release snapshots uploaded as release assets with the version baked in. The naming convention is `release-version-<tag>.<ext>` so each release page can deep-link to a frozen, drift-proof installer.
const ( MsgAssetDryRunHeader = " [dry-run] Would cross-compile %d binaries:\n" MsgAssetDryRunBinary = " → %s\n" MsgAssetDryRunUpload = " [dry-run] Would upload %d assets\n" )
Asset dry-run messages.
const ( ErrAssetBuildFailed = "Error: build failed for %s/%s: %s (operation: compile)\n" ErrAssetUploadFinal = "Error: upload failed for asset %s: %v (operation: upload)\n" ErrAssetNoToken = "Error: GITHUB_TOKEN not set — skipping asset upload (reason: environment variable not set)\n" ErrAssetRemoteParse = "Error: could not parse remote origin: %v (operation: resolve)\n" )
Asset error messages — Code Red: all file errors include exact path and reason.
const ( RetryMaxAttempts = 3 RetryBaseDelayMs = 1000 RetryBackoffFactor = 2 )
Retry constants.
const ( HTTPTooManyRequests = 429 HTTPServerErrorMin = 500 )
Retry HTTP status codes.
const ( MsgRetryAttempt = " ⟳ Retry %d/%d for %s (waiting %s)...\n" MsgRetrySuccess = " ✓ Uploaded %s (attempt %d)\n" )
Retry messages.
const ( MsgAutoCommitScanning = "\n ■ Checking for uncommitted changes...\n" MsgAutoCommitReleaseOnly = " ✓ Release metadata committed: %s\n" MsgAutoCommitPushed = " ✓ Pushed to %s\n" MsgAutoCommitNone = " ✓ No uncommitted changes found\n" MsgAutoCommitPrompt = " → Changes found outside .gitmap/release/:\n" MsgAutoCommitFile = " %s\n" MsgAutoCommitAsk = " → Auto-commit all changes with release info? (y/N): " MsgAutoCommitAll = " ✓ All changes committed: %s\n" MsgAutoCommitPartial = " ✓ Committed .gitmap/release/ changes only: %s\n" MsgAutoCommitSkipped = " → Skipped auto-commit (--no-commit)\n" MsgAutoCommitDryRun = " [dry-run] Would auto-commit release changes\n" MsgAutoCommitSyncRetry = " → Remote %s moved; rebasing and retrying push...\n" ErrAutoCommitFailed = " ✗ Auto-commit failed: %v\n" ErrAutoCommitPush = " ✗ Push failed: %v\n" AutoCommitMsgFmt = "Release %s" FlagDescNoCommit = "Skip post-release auto-commit and push" FlagDescYes = "Auto-confirm all prompts (e.g. commit)" MsgAutoCommitAutoYes = " → Auto-confirmed via -y flag\n" // Git diff arguments for detecting changes. GitDiff = "diff" GitDiffNameOnly = "--name-only" GitDiffCached = "--cached" )
Auto-commit messages for post-release commit behavior.
const ( SQLInsertBookmark = `INSERT INTO Bookmark (Name, Command, Args, Flags) VALUES (?, ?, ?, ?)` SQLSelectAllBookmarks = `SELECT BookmarkId, Name, Command, Args, Flags, CreatedAt FROM Bookmark ORDER BY Name` SQLSelectBookmarkByName = `SELECT BookmarkId, Name, Command, Args, Flags, CreatedAt FROM Bookmark WHERE Name = ?` SQLDeleteBookmark = "DELETE FROM Bookmark WHERE Name = ?" SQLDropBookmark = "DROP TABLE IF EXISTS Bookmark" SQLDropBookmarks = "DROP TABLE IF EXISTS Bookmarks" // legacy )
SQL: bookmark operations (v15).
const ( CmdBookmark = "bookmark" CmdBookmarkAlias = "bk" )
gitmap:cmd top-level Bookmark CLI commands.
const ( CmdBookmarkSave = "save" // gitmap:cmd skip CmdBookmarkList = "list" // gitmap:cmd skip CmdBookmarkRun = "run" // gitmap:cmd skip CmdBookmarkDelete = "delete" // gitmap:cmd skip )
gitmap:cmd top-level Bookmark subcommands.
const ( MsgBookmarkSaved = "Bookmark saved: %s → gitmap %s %s %s\n" MsgBookmarkDeleted = "Bookmark deleted: %s\n" MsgBookmarkEmpty = "No bookmarks saved.\n" MsgBookmarkRunning = "Running bookmark: %s → gitmap %s %s %s\n" MsgBookmarkColumns = "NAME COMMAND ARGS FLAGS" MsgBookmarkRowFmt = "%-20s %-15s %-16s %s\n" ErrBookmarkUsage = "usage: gitmap bookmark <save|list|run|delete> [args]\n" ErrBookmarkSaveUsage = "usage: gitmap bookmark save <name> <command> [args...] [--flags...]\n" ErrBookmarkRunUsage = "usage: gitmap bookmark run <name>\n" ErrBookmarkDelUsage = "usage: gitmap bookmark delete <name>\n" ErrBookmarkNotFound = "bookmark not found: %s\n" ErrBookmarkExists = "bookmark already exists: %s (delete it first)\n" ErrBookmarkQuery = "failed to query bookmarks: %v" ErrBookmarkSave = "failed to save bookmark: %v\n" ErrBookmarkDelete = "failed to delete bookmark: %v\n" )
Bookmark messages.
const ( CmdCD = "cd" CmdCDAlias = "go" )
gitmap:cmd top-level CD CLI commands.
const ( CmdCDRepos = "repos" // gitmap:cmd skip CmdCDSetDefault = "set-default" // gitmap:cmd skip CmdCDClearDefault = "clear-default" // gitmap:cmd skip )
gitmap:cmd top-level CD subcommands.
const ( MsgCDMultipleHeader = "Multiple locations found for \"%s\":\n" MsgCDMultipleRowFmt = " %d %s\n" MsgCDPickPrompt = "\nPick [1-%d]: " MsgCDReposHeader = "TRACKED REPOS\n" MsgCDReposRowFmt = " %d %s\n" MsgCDDefaultSet = "Default set for %s: %s\n" MsgCDDefaultCleared = "Default cleared for %s\n" ErrCDUsage = "usage: gitmap cd <repo-name|repos> [--group <name>] [--pick]\n" ErrCDNotFound = "no repo found matching '%s'\n" ErrCDInvalidPick = "invalid selection\n" ErrCDSetDefaultUsage = "usage: gitmap cd set-default <name> <path>\n" ErrCDClearDefaultUsage = "usage: gitmap cd clear-default <name>\n" ErrCDDefaultNotFound = "no default set for '%s'\n" )
CD messages.
const ( FlagDescCDGroup = "Filter repos list by group" FlagDescCDPick = "Force interactive picker even if a default is set" )
CD flag descriptions.
const ( EnvGitmapWrapper = "GITMAP_WRAPPER" EnvGitmapWrapperVal = "1" )
CD shell wrapper env var — set by wrappers so the binary can detect them.
const ( MsgWrapperNotLoaded = "" /* 198-byte string literal not displayed */ MsgWrapperVerifyOK = " %s✓%s Shell wrapper is active (gitmap resolves as a function)\n" MsgWrapperVerifyTip = "" /* 159-byte string literal not displayed */ )
CD wrapper verification messages.
const ( MsgCDFuncInstalled = "Installed 'gitmap'/'gcd' shell wrappers — restart your terminal or source your profile\n" MsgCDFuncAlready = "Shell wrappers for 'gitmap'/'gcd' already installed\n" )
CD function messages.
const ( CmdChangelogGen = "changelog-generate" CmdChangelogGenAlias = "cg" )
gitmap:cmd top-level Changelog generate command.
const ( FlagDescFrom = "Start tag (older). Defaults to second-latest tag" FlagDescTo = "End tag or HEAD. Defaults to latest tag" FlagDescWrite = "Prepend output to CHANGELOG.md instead of printing" )
Changelog generate flag descriptions.
const ( ChangelogGenFormat = "--format=%s" ChangelogGenNoMerges = "--no-merges" ChangelogGenSortFlag = "--sort" ChangelogGenSortVersion = "-version:refname" )
Changelog generate git arguments.
const ( MsgChangelogGenHeader = "\n Changelog: %s → %s\n\n" MsgChangelogGenEmpty = " No commits found between %s and %s.\n" MsgChangelogGenWritten = " ✓ Prepended changelog to %s\n" MsgChangelogGenPreview = " Preview (use --write to save):\n\n" )
Changelog generate messages.
const ( ErrChangelogGenCommits = "failed to list commits between %s and %s: %v" ErrChangelogGenTags = "failed to list tags: %v" ErrChangelogGenTagNotFound = "tag %s not found locally" ErrChangelogGenNoTags = "no version tags found — create a release first" ErrChangelogGenWrite = "failed to write changelog at %s: %v (operation: write)" ErrChangelogGenRead = "failed to read existing changelog at %s: %v (operation: read)" )
Changelog generate errors.
const ( MsgCleanCodeRunning = " Installing coding guidelines from %s\n" MsgCleanCodeDone = " OK Coding guidelines installed.\n" MsgCleanCodeNoPwsh = " ✗ PowerShell not found on PATH. Install PowerShell 7+ or run the one-liner manually:\n irm %s | iex\n" ErrCleanCodeFailed = " ✗ Coding guidelines install failed: %v\n" MsgCleanCodeNonWin = " Note: this installer is PowerShell-based; on non-Windows it requires PowerShell 7+ (pwsh).\n" )
Clean-code installer messages.
const ( CmdInstallCleanCode = "clean-code" CmdInstallCleanCodeGuide = "code-guide" CmdInstallCleanCodeCC = "cc" )
gitmap:cmd top-level Clean-code installer alias tokens exposed to shell tab-completion. These are not standalone top-level commands — they are argument values to `gitmap install` (e.g. `gitmap install clean-code`, `gitmap i cc`). We expose them through the completion marker block so users get tab-complete hints when typing `gitmap install <TAB>`.
NOTE: `cg` is intentionally OMITTED here because it is already owned by `CmdChangelogGenAlias` as a top-level command. Adding it twice would silently win the dedupe in the generator but mask the conflict at the dispatch layer. Users can still run `gitmap install cg` — the install command parses its own positional argument and routes it to the clean-code installer via cleanCodeAliases (see installcleancode.go).
const ( CmdScan = "scan" CmdScanAlias = "s" CmdClone = "clone" CmdCloneAlias = "c" CmdUpdate = "update" CmdUpdateRunner = "update-runner" // gitmap:cmd skip CmdUpdateCleanup = "update-cleanup" // gitmap:cmd skip CmdInstalledDir = "installed-dir" // gitmap:cmd skip CmdInstalledDirAlias = "id" CmdVersion = "version" CmdVersionAlias = "v" CmdHelp = "help" CmdDesktopSync = "desktop-sync" CmdDesktopSyncAlias = "ds" CmdGitHubDesktop = "github-desktop" CmdGitHubDesktopAlias = "gd" CmdPull = "pull" CmdPullAlias = "p" CmdRescan = "rescan" CmdRescanAlias = "rsc" CmdSetup = "setup" CmdStatus = "status" CmdStatusAlias = "st" CmdExec = "exec" CmdExecAlias = "x" CmdRelease = "release" CmdReleaseShort = "r" CmdReleaseBranch = "release-branch" CmdReleaseBranchAlias = "rb" CmdReleasePending = "release-pending" CmdReleasePendingAlias = "rp" CmdChangelog = "changelog" CmdChangelogAlias = "cl" CmdChangelogMD = "changelog.md" // gitmap:cmd skip CmdDoctor = "doctor" CmdLatestBranch = "latest-branch" CmdLatestBranchAlias = "lb" CmdList = "list" CmdListAlias = "ls" CmdGroup = "group" CmdGroupAlias = "g" CmdGroupCreate = "create" // gitmap:cmd skip CmdGroupAdd = "add" // gitmap:cmd skip CmdGroupRemove = "remove" // gitmap:cmd skip CmdGroupList = "list" // gitmap:cmd skip CmdGroupShow = "show" // gitmap:cmd skip CmdGroupDelete = "delete" // gitmap:cmd skip CmdDBReset = "db-reset" CmdReset = "reset" CmdListVersions = "list-versions" CmdListVersionsAlias = "lv" CmdRevert = "revert" CmdRevertRunner = "revert-runner" // gitmap:cmd skip CmdListReleases = "list-releases" CmdListReleasesAlias = "lr" CmdReleases = "releases" // v3.20.0: alias of list-releases, intended for --all-repos batch view CmdCompletion = "completion" CmdCompletionAlias = "cmp" CmdClearReleaseJSON = "clear-release-json" CmdClearReleaseJSONAlias = "crj" CmdDocs = "docs" CmdDocsAlias = "d" CmdCloneNext = "clone-next" CmdCloneNextAlias = "cn" CmdReleaseSelf = "release-self" CmdReleaseSelfAlias = "rself" CmdReleaseSelfAlias2 = "rs" CmdHelpDashboard = "help-dashboard" CmdHelpDashboardAlias = "hd" CmdPending = "pending" // gitmap:cmd skip CmdDoPending = "do-pending" // gitmap:cmd skip CmdDoPendingAlias = "dp" // gitmap:cmd skip CmdLLMDocs = "llm-docs" CmdLLMDocsAlias = "ld" CmdSetSourceRepo = "set-source-repo" // gitmap:cmd skip CmdSelfInstall = "self-install" CmdSelfUninstall = "self-uninstall" CmdSf = "sf" CmdProbe = "probe" CmdCode = "code" CmdVSCodePMPath = "vscode-pm-path" CmdVSCodePMPathAlias = "vpath" )
gitmap:cmd top-level CLI commands.
const ( HelpUsage = "Usage: gitmap <command> [flags]" HelpCommands = "Commands:" HelpScan = " scan (s) [dir] Scan directory for Git repos" HelpClone = " clone (c) <source|json|csv|text> Re-clone from file (shorthands auto-resolve)" HelpUpdate = " update Self-update from source repo" HelpUpdateCleanup = " update-cleanup Remove leftover update temp files and .old backups" HelpInstalledDir = " installed-dir (id) Show the active installed binary path" HelpVersion = " version (v) Show version number" HelpDesktopSync = " desktop-sync (ds) Sync repos to GitHub Desktop from output" HelpGitHubDesktop = " github-desktop (gd) Register current repo with GitHub Desktop (no scan needed)" HelpPull = " pull (p) <name> Pull a specific repo by its name" HelpRescan = " rescan (rsc) Re-run last scan with cached flags" HelpSetup = " setup Configure Git diff/merge tool, aliases & core settings" HelpStatus = " status (st) Show dirty/clean, ahead/behind, stash for all repos" HelpExec = " exec (x) <args...> Run any git command across all repos" HelpRelease = " release (r) [ver] Create release branch, tag, and push" HelpReleaseBr = " release-branch (rb) Complete release from existing release branch" HelpReleasePend = " release-pending (rp) Release all pending branches without tags" HelpChangelog = " changelog (cl) [ver] Show concise release notes (use --open, --source)" HelpDoctor = " doctor [--fix-path] Diagnose PATH, deploy, and version issues" HelpLatestBr = " latest-branch (lb) Find most recently updated remote branch" HelpList = " list (ls) Show all tracked repos with slugs" HelpGroup = " group (g) <sub> Manage repo groups / activate group for batch ops" HelpMultiGroup = " multi-group (mg) Select multiple groups for batch operations" HelpSf = " sf <add|list|rm> Manage scan folders (roots that gitmap scan tracks)" HelpDBReset = " db-reset --confirm Clear all tracked repos and groups from the database" HelpCompletion = " completion (cmp) Generate shell tab-completion scripts" HelpClearReleaseJSON = " clear-release-json (crj) Remove a .gitmap/release/vX.Y.Z.json file" HelpDocs = " docs (d) Open documentation website in browser" HelpHelpDash = " help-dashboard (hd) Serve the docs site locally in your browser" HelpCloneNext = " clone-next (cn) Clone next versioned iteration of current repo" HelpReleaseSelf = " release-self (rs) Release gitmap itself from any directory" HelpHelp = " help Show this help message" HelpListVersions = " list-versions (lv) Show all release tags, highest first (--limit N, --json, --source)" HelpListReleases = " list-releases (lr) Show releases from .gitmap/release/ files or database (--limit N, --json, --source)" HelpRevert = " revert <version> Revert to a specific release version" )
const ( FlagDescConfig = "Path to config file" FlagDescMode = "Clone URL style: https or ssh" FlagDescOutput = "Output format: terminal, csv, json" FlagDescOutFile = "Exact output file path" FlagDescOutputPath = "Output directory for CSV/JSON" FlagDescTargetDir = "Base directory for cloned repos" FlagDescSafePull = "If repo exists, run safe git pull with retries and unlock diagnostics" FlagDescGHDesktop = "Add discovered repos to GitHub Desktop" FlagDescOpen = "Open output folder after scan completes" FlagDescQuiet = "Suppress terminal clone help section" FlagDescVerbose = "Write detailed stdout/stderr debug log to a timestamped file" FlagDescSetupConfig = "Path to git-setup.json config file" FlagDescDryRun = "Preview changes without applying them" FlagDescAssets = "Directory or file to attach to the release" FlagDescCommit = "Create release from a specific commit" FlagDescRelBranch = "Create release from latest commit of a branch" FlagDescBump = "Auto-increment version: major, minor, or patch" FlagDescDraft = "Create an unpublished draft release" FlagDescLatest = "Show only the latest changelog entry" FlagDescLimit = "Number of changelog versions to show" FlagDescOpenChangelog = "Open CHANGELOG.md with the default system app" FlagDescLBRemote = "Remote to filter branches against (default: origin)" FlagDescLBAllRemotes = "Include branches from all remotes" FlagDescLBContains = "Fall back to --contains if --points-at returns empty" FlagDescLBTop = "Show top N most recently updated branches" FlagDescLBJSON = "Output structured JSON instead of plain text (shorthand for --format json)" FlagDescLBFormat = "Output format: terminal, json, csv (default: terminal)" FlagDescLBNoFetch = "Skip git fetch (use existing remote refs)" FlagDescLBSort = "Sort order: date (default, descending) or name (alphabetical)" FlagDescLBFilter = "Filter branches by glob or substring pattern" FlagDescGroup = "Filter by group name" FlagDescAll = "Run against all tracked repos from database" FlagDescListVerbose = "Show full paths and URLs" FlagDescGroupDesc = "Optional group description" FlagDescGroupColor = "Terminal color for group display" FlagDescConfirm = "Confirm destructive operation" FlagDescSource = "Filter by source: release or import" )
Flag descriptions.
const ( ProgressBeginFmt = "[%3d/%d] Cloning %s ..." ProgressDoneFmt = " done (%s)\n" ProgressFailFmt = " FAILED\n" ProgressSummaryFmt = "\nClone complete: %d/%d repos in %s\n" ProgressDetailFmt = " Cloned: %d | Pulled: %d | Failed: %d\n" )
Clone progress format strings.
const ( BatchProgressBeginFmt = "[%3d/%d] %s ..." BatchProgressDoneFmt = " done (%s)\n" BatchProgressFailFmt = " FAILED\n" BatchProgressSkipFmt = " skipped\n" BatchProgressSummaryFmt = "\n%s complete: %d/%d in %s\n" BatchProgressDetailFmt = " Succeeded: %d | Failed: %d | Skipped: %d\n" BatchStoppedMsg = " ⚠ Halted early (--stop-on-fail)\n" )
Batch progress format strings (generic operations).
const ( BatchFailureHeader = " ── Failed Items ──" BatchFailureEntryFmt = " %d. %s: %s\n" ExitPartialFailure = 3 )
Batch failure report format strings.
const ( FlagStopOnFail = "stop-on-fail" FlagDescStopOnFail = "Stop batch operation after first failure" )
Batch flag constants.
const ( ShorthandJSON = "json" ShorthandCSV = "csv" ShorthandText = "text" )
Clone shorthands — short aliases for `gitmap clone <source>` that expand to the default scan output files (json/csv/text).
const ( MsgCloneNextCloning = "Cloning %s into %s...\n" MsgCloneNextCreating = "Creating GitHub repo %s...\n" MsgCloneNextCreated = "✓ Created GitHub repo %s\n" MsgCloneNextDone = "✓ Cloned %s\n" MsgCloneNextDesktop = "✓ Registered %s with GitHub Desktop\n" MsgCloneNextRemovePrompt = "Remove current folder %s? [y/N] " MsgCloneNextRemoved = "✓ Removed %s\n" MsgCloneNextMovedTo = "→ Now in %s\n" MsgFlattenFallback = "→ Falling back to versioned folder %s (current folder is locked by this shell)\n" MsgFlattenLockedHint = " Tip: 'cd ..' out of %s in your shell, then re-run to flatten.\n" )
Clone-next command messages.
const ( ErrCloneNextUsage = "Usage: gitmap clone-next <v++|vN> [flags]" ErrCloneNextCwd = "Error: cannot determine current directory: %v\n" ErrCloneNextNoRemote = "Error: not a git repo or no remote origin: %v\n" ErrCloneNextBadVersion = "Error: %v\n" ErrCloneNextExists = "Error: target directory already exists: %s\nUse 'cd' to switch to it.\n" ErrCloneNextFailed = "Error: clone failed for %s\n" ErrCloneNextRemoteParse = "Error: cannot parse remote URL: %v\n" ErrCloneNextRepoCheck = "Error: cannot check target repo: %v\n" ErrCloneNextRepoCreate = "Error: cannot create GitHub repo %s: %v\n" WarnCloneNextRemoveFailed = "Warning: could not remove %s: %v\n" )
Clone-next error and warning messages.
const ( FlagDescCloneNextDelete = "Auto-remove current folder after clone" FlagDescCloneNextKeep = "Keep current folder without prompting" FlagDescCloneNextNoDesktop = "Skip GitHub Desktop registration" FlagDescCloneNextCreateRemote = "Create target GitHub repo if it does not exist (requires GITHUB_TOKEN)" FlagDescCloneNextCSV = "Read repo paths from CSV file (one path per row, header optional)" FlagDescCloneNextAll = "Walk current folder and run cn on every git repo found one level deep" )
Clone-next flag descriptions.
const ( HelpCloneNextFlags = "Clone-Next Flags:" HelpCNDelete = " --delete Auto-remove current version folder after clone" HelpCNKeep = " --keep Keep current folder without prompting for removal" HelpCNNoDesktop = " --no-desktop Skip GitHub Desktop registration" HelpCNSSHKey = " --ssh-key, -K SSH key name to use for clone" HelpCNVerbose = " --verbose Show detailed clone-next output" HelpCNCreateRemote = " --create-remote Create target GitHub repo if missing (needs GITHUB_TOKEN)" HelpCNCSV = " --csv <path> Batch mode: read repo list from CSV (one path per row)" HelpCNAll = " --all Batch mode: cn every git repo one level under cwd" )
Clone-next help strings for usage output.
const ( MsgCloneNextBatchStart = "→ Batch cn over %d repo(s)\n" MsgCloneNextBatchRepo = " • %s: %s -> %s\n" MsgCloneNextBatchSummary = "✓ Batch complete: %d ok, %d failed, %d skipped\n" MsgCloneNextBatchReport = " Report: %s\n" WarnCloneNextBatchReport = "Warning: could not write batch report: %v\n" ErrCloneNextBatchLoad = "Error: could not load batch input: %v\n" BatchStatusOK = "ok" BatchStatusFailed = "failed" BatchStatusSkipped = "skipped" )
Clone-next batch mode messages and statuses (v3.42.0+).
const ( ShellPowerShell = "powershell" ShellBash = "bash" ShellZsh = "zsh" )
Completion shells.
const ( CompListRepos = "--list-repos" CompListGroups = "--list-groups" CompListCommands = "--list-commands" CompListAliases = "--list-aliases" CompListZipGroups = "--list-zip-groups" CompListHelpGroups = "--list-help-groups" )
Completion list flags.
const ( CompFilePS = "completions.ps1" CompFileBash = "completions.bash" CompFileZsh = "completions.zsh" CompDirName = "gitmap" )
Completion file names.
const ( MsgCompInstalled = "Shell completion installed for %s\n" MsgCompAlreadyDone = "Shell completion already configured for %s\n" MsgCompProfileWrite = "Added source line to %s\n" ErrCompUsage = "" /* 145-byte string literal not displayed */ ErrCompUnknownShell = "unknown shell: %s (use powershell, bash, or zsh)\n" ErrCompProfileWrite = "failed to update profile at %s: %v (operation: write)\n" )
Completion messages.
const ( FlagDescCompListRepos = "Print repo slugs one per line" FlagDescCompListGroups = "Print group names one per line" FlagDescCompListCommands = "Print all command names one per line" FlagDescCompListAliases = "Print alias names one per line" FlagDescCompListZipGroups = "Print zip group names one per line" FlagDescCompListHelpGroups = "Print help group names one per line" )
Completion flag descriptions.
const ( MsgCompressArchive = " ✓ Compressed %s → %s\n" ErrCompressFailed = " ✗ Failed to compress %s: %v\n" FlagDescCompress = "Wrap release assets in .zip (Windows) or .tar.gz (Linux/macOS)" MsgChecksumGenerated = " ✓ Generated %s (SHA256)\n" ErrChecksumFailed = " ✗ Failed to hash %s: %v\n" FlagDescChecksums = "Generate SHA256 checksums.txt for release assets" ChecksumsFile = "checksums.txt" )
Compress and checksum messages.
const ( CmdDashboard = "dashboard" CmdDashboardAlias = "db" )
gitmap:cmd top-level Dashboard CLI commands.
const ( FlagDescDashLimit = "Maximum number of commits to include" FlagDescDashSince = "Only include commits after this date (YYYY-MM-DD)" FlagDescDashOpen = "Open the generated dashboard in the default browser" FlagDescNoMerges = "Exclude merge commits from the output" FlagDescDashOutDir = "Output directory for dashboard files" )
Dashboard flag descriptions.
const ( DashboardJSONFile = "dashboard.json" DashboardHTMLFile = "dashboard.html" DashboardOutDir = ".gitmap/output" )
Dashboard output filenames.
const ( MsgDashCollecting = "Collecting repository data..." MsgDashWriteJSON = "Wrote %s (%d commits, %d authors)\n" MsgDashWriteHTML = "Wrote %s\n" MsgDashGenerated = "Dashboard generated in %s\n" MsgDashOpening = "Opening dashboard in browser..." )
Dashboard terminal messages.
const ( ErrDashNotRepo = "Current directory is not a Git repository." ErrDashWriteJSON = "Failed to write dashboard JSON at %s: %v (operation: write)\n" ErrDashWriteHTML = "Failed to write dashboard HTML at %s: %v (operation: write)\n" ErrDashCollect = "Failed to collect repository data: %v\n" )
Dashboard error messages.
const ( CmdDBMigrate = "db-migrate" CmdDBMigrateAlias = "dbm" HelpDBMigrate = " db-migrate (dbm) Run pending database schema migrations (safe, idempotent)" FlagDBMigrateVerbose = "verbose" FlagDescDBMigrateV = "Print every migration step (otherwise summary only)" MsgDBMigrateRunning = "▸ Running gitmap database migrations...\n" MsgDBMigrateDoneFmt = " ✓ Migrations complete (%d tables ensured, %d steps applied, %d warnings).\n" MsgDBMigrateStepFmt = " • %s\n" MsgDBMigrateNoWork = " ✓ Database schema is already up to date — nothing to migrate.\n" ErrDBMigrateFailFmt = "Error: gitmap db-migrate failed: %v\n" // Auto-run hook for the post-update flow. MsgDBMigratePostUpdate = "▸ Running database migrations after update...\n" WarnDBMigratePostFail = " ⚠ Post-update migration failed: %v\n Run `gitmap db-migrate --verbose` to retry.\n" )
gitmap:cmd top-level `gitmap db-migrate` (alias `dbm`) — explicitly run database schema migrations. Safe to invoke at any time; designed to be run automatically after `gitmap update` and on first launch after a fresh install.
const ( CmdDiff = "diff" CmdDiffAlias = "df" )
gitmap:cmd top-level Diff command identifiers and flag names.
Spec: companion to spec/01-app/97-move-and-merge.md
const ( FlagDiffJSON = "json" FlagDiffOnlyConflicts = "only-conflicts" FlagDiffOnlyMissing = "only-missing" FlagDiffIncludeIdentical = "include-identical" FlagDiffIncludeVCS = "include-vcs" FlagDiffIncludeNodeMods = "include-node-modules" FlagDiffNoColor = "no-color" )
Diff flag names.
const ( LogPrefixDiff = "[diff]" DiffSectionMissingRight = "Missing on RIGHT (would be added by merge-right / merge-both):" DiffSectionMissingLeft = "Missing on LEFT (would be added by merge-left / merge-both):" DiffSectionConflicts = "Conflicts (different content on both sides):" DiffSectionIdentical = "Identical files (skipped by merge-*):" DiffSummaryFmt = "%s summary: %d missing-on-left, %d missing-on-right, %d conflicts, %d identical\n" DiffNothingFmt = "%s no differences detected.\n" )
Diff log prefix and section headers.
const ( ErrDiffUsageFmt = "Usage: gitmap diff LEFT RIGHT [flags]\n" ErrDiffSameFolder = "error: LEFT and RIGHT resolve to the same folder: %s" ErrDiffNotFolderFmt = "error: %q is not a directory (gitmap diff requires local folder endpoints; clone URLs first via `gitmap clone`)" ErrDiffMissingFmt = "error: %q does not exist" )
Diff error messages.
const ( CmdDiffProfiles = "diff-profiles" CmdDiffProfilesAlias = "dp" )
gitmap:cmd top-level Diff-profiles CLI commands.
const ( MsgDPHeader = "Comparing profiles: %s ↔ %s\n" MsgDPOnlyInHeader = "\nONLY IN %s:" MsgDPOnlyInRowFmt = " %-20s %s\n" MsgDPDiffHeader = "\nDIFFERENT:" MsgDPDiffNameFmt = " %s\n" MsgDPDiffDetailFmt = " %-10s %s\n" MsgDPSameFmt = "\nSAME: %d repos (use --all to show)\n" MsgDPSameAllHeader = "\nSAME:" MsgDPSameRowFmt = " %-20s %s\n" MsgDPSummaryFmt = "\nSummary: %d only-left | %d only-right | %d different | %d same\n" MsgDPEmpty = "Both profiles have no repos." ErrDPUsage = "usage: gitmap diff-profiles <profileA> <profileB> [--all] [--json]\n" ErrDPProfileMissing = "profile not found: %s\n" ErrDPOpenFailed = "failed to open profile database '%s': %v\n" )
Diff-profiles messages.
const ( DoctorBannerFmt = "\n gitmap doctor (v%s)\n" DoctorBannerRule = "" /* 128-byte string literal not displayed */ DoctorIssuesFmt = " Found %d issue(s). See recommendations above.\n" DoctorFixPathTip = " Tip: run 'gitmap doctor --fix-path' to auto-sync the PATH binary.\n\n" DoctorAllPassed = " All checks passed." DoctorFixBannerFmt = "\n gitmap doctor --fix-path (v%s)\n" DoctorActivePathFmt = " Active PATH: %s (%s)\n" DoctorDeployedFmt = " Deployed: %s (%s)\n" DoctorSyncingFmt = " Syncing %s -> %s...\n" DoctorRetryFmt = " [%d/%d] File in use, retrying...\n" DoctorRenamedMsg = " Renamed locked binary to .old, copying fresh..." DoctorKillingMsg = " Attempting to stop stale gitmap processes..." DoctorKilledFmt = " Stopped process(es): %s\n" DoctorSyncFailTitle = "Could not sync PATH binary after all fallback attempts" DoctorSyncFailDetail = "The file is still locked by another process." DoctorSyncFailFix1 = "Close all terminals and apps using gitmap, then run:" DoctorSyncFailFix2Fmt = " Copy-Item \"%s\" \"%s\" -Force" DoctorFixFlagDesc = "Sync the active PATH binary from the deployed binary" DoctorOKPathFmt = "PATH binary synced successfully: %s" DoctorWarnSyncFmt = "Synced but version mismatch: got %s, expected %s" DoctorNotOnPath = "gitmap not found on PATH" DoctorNoSync = "Cannot sync — no active binary to replace." DoctorAddPathFix = "Add your deploy directory to PATH first." DoctorCannotResolve = "Cannot resolve deployed binary" DoctorAlreadySynced = "PATH already points to the deployed binary. Nothing to sync." DoctorVersionsMatch = "Versions already match (%s). No sync needed." DoctorRepoPathMissing = "RepoPath not embedded" DoctorRepoPathDetail = "Binary was not built with run.ps1. Self-update will not work." DoctorRepoPathFix = "Rebuild with: .\\run.ps1" DoctorRepoPathOKFmt = "RepoPath: %s" DoctorPathBinaryFmt = "PATH binary: %s (%s)" DoctorPathMissTitle = "gitmap not found on PATH" DoctorPathMissDetail = "The gitmap binary is not accessible from your terminal." DoctorPathMissFix = "Add your deploy directory to PATH (check deployPath in powershell.json or run 'gitmap installed-dir')" DoctorDeployReadFail = "Cannot read powershell.json" DoctorDeployReadDet = "Deploy path detection unavailable." DoctorNoDeployPath = "No deployPath in powershell.json" DoctorNoDeployDet = "Deploy target not configured." DoctorDeployNotFound = "Deployed binary not found" DoctorDeployRunFix = "Run: .\\run.ps1" DoctorDeployOKFmt = "Deployed binary: %s (%s)" DoctorGitMissTitle = "git not found on PATH" DoctorGitMissDetail = "Git is required for most gitmap commands." DoctorGitOKFmt = "Git: %s (%s)" DoctorGitOKPathFmt = "Git: %s (version unknown)" DoctorGoWarn = "Go not found on PATH (needed only for building from source)" DoctorGoOKFmt = "Go: %s" DoctorGoOKPathFmt = "Go: %s (version unknown)" DoctorChangelogWarn = "CHANGELOG.md not found (changelog command will not work)" DoctorChangelogOK = "CHANGELOG.md present" DoctorVersionMismatch = "PATH binary version mismatch" DoctorVMismatchFmt = "PATH: %s, Source: %s" DoctorVMismatchFix = "Run: gitmap update or gitmap doctor --fix-path" DoctorDeployMismatch = "Deployed binary version mismatch" DoctorDMismatchFmt = "Deployed: %s, Source: %s" DoctorDMismatchFix = "Run: .\\run.ps1 -NoPull" DoctorBinariesDiffer = "PATH and deployed binaries differ" DoctorBDifferFmt = "PATH: %s (%s), Deployed: %s (%s)" DoctorBDifferFix = "Run: gitmap doctor --fix-path" DoctorSourceOKFmt = "Source version: %s (all binaries match)" DoctorResolveNoRepo = "RepoPath not embedded — rebuild with run.ps1" DoctorResolveNoRead = "cannot read powershell.json: %v" DoctorResolveNoDeploy = "no deployPath in powershell.json" DoctorResolveNotFound = "deployed binary not found: %s" DoctorDefaultBinary = "gitmap.exe" )
Doctor command messages.
const ( GitMapBin = "gitmap" GoBin = "go" GoVersionArg = "version" PowershellConfigFile = "powershell.json" JSONKeyDeployPath = "deployPath" JSONKeyBuildOutput = "buildOutput" JSONKeyBinaryName = "binaryName" BackupSuffix = ".old" )
Doctor binary and tool lookup names.
const ( FlagNoBanner = "--no-banner" EnvGitMapQuiet = "GITMAP_QUIET" EnvGitMapQuietTrue = "1" )
Bare-invocation banner suppression (v3.6.0+).
const ( BinaryReadoutActive = " Active binary: %s\n" BinaryReadoutDeployed = " Deployed binary: %s\n" BinaryReadoutConfig = " Config binary: %s\n" BinaryReadoutMissing = "(not found)" )
Bare-invocation binary readout labels (v3.6.0+).
const ( DoctorOKFmt = " %s[OK]%s %s\n" DoctorIssueFmt = " %s[!!]%s %s\n" DoctorFixFmt = " %sFix:%s %s\n" DoctorWarnFmt = " %s[--]%s %s\n" DoctorDetail = " %s\n" )
Doctor format markers.
const ( DoctorConfigMissing = "config.json not found (using defaults)" DoctorConfigInvalid = "config.json is not valid JSON" DoctorConfigOKFmt = "Config: %s" )
Doctor config validation messages.
const ( DoctorDBOpenFail = "Database cannot be opened" DoctorDBMigrateFail = "Database migration failed" DoctorDBOK = "Database: %s" )
Doctor database validation messages.
const ( DoctorLockNone = "No stale lock file" DoctorLockExists = "Lock file exists — another gitmap may be running (or stale)" )
Doctor lock file messages.
const ( DoctorNetworkOK = "Network: github.com reachable" DoctorNetworkOffline = "Network: github.com unreachable (offline mode)" )
Doctor network messages.
const ( DoctorSignTitle = "Digital signature" DoctorSignOKFmt = "Signed: %s (%s)" DoctorSignUnsigned = "Binary is not digitally signed" DoctorSignUnsignDet = "Users will see SmartScreen warnings on Windows." DoctorSignUnsignFix = "See spec/03-general/05-code-signing.md for SignPath.io setup" DoctorSignSkipUnix = "Signature check: skipped (not Windows)" DoctorSignNoPath = "Signature check: skipped (binary not on PATH)" DoctorSignCheckFail = "Signature check: could not verify (PowerShell unavailable)" DoctorSignInvalidFmt = "Signature invalid: %s" DoctorSignInvalidDet = "The binary's signature is present but not valid." )
Doctor digital signature messages.
const ( DoctorDupBinOK = "Single gitmap binary on PATH" DoctorDupBinTitle = "Multiple gitmap binaries on PATH" )
Doctor duplicate binary messages.
const ( DoctorNoOrphans = "Release↔Repo integrity: no orphaned rows" DoctorOrphanedReleases = "%d orphaned Release row(s) with invalid RepoId" DoctorOrphanedDetail = "These releases reference a Repo that no longer exists in the database." DoctorOrphanedFix = "Run: gitmap list-releases (re-imports from .gitmap/release/v*.json with valid RepoId)" DoctorReposNoReleases = "%d repo(s) have no releases (run 'gitmap list-releases' in each repo to populate)" DoctorIntegrityFail = "Release↔Repo integrity check failed: %v" )
Doctor Release↔Repo integrity messages.
const ( DoctorSetupConfigMissing = "git-setup.json not found (setup will fail without --config)" DoctorSetupConfigOKFmt = "Setup config: %s" )
Doctor setup config messages.
const ( DoctorWrapperOK = "Shell wrapper active (gitmap cd will change directory)" DoctorWrapperNotLoaded = "Shell wrapper not loaded — gitmap cd prints path but cannot change directory" DoctorWrapperFix = "Run: gitmap setup, then restart terminal or reload profile (. $PROFILE / source ~/.bashrc / source ~/.zshrc)" )
Doctor shell wrapper messages.
const ( DoctorVSCodePMOKFmt = "VS Code Project Manager: %s" DoctorVSCodePMNoVSCode = "" /* 128-byte string literal not displayed */ DoctorVSCodePMNoExtension = "alefragnani.project-manager extension not installed — projects.json sync will be skipped (install the extension and re-run)" DoctorVSCodePMUnknownTitle = "VS Code Project Manager check failed" )
Doctor VS Code Project Manager check messages (v3.41.0+).
const ( CmdEnv = "env" CmdEnvAlias = "ev" )
gitmap:cmd top-level Env CLI commands.
const ( CmdEnvSet = "set" // gitmap:cmd skip CmdEnvGet = "get" // gitmap:cmd skip CmdEnvDelete = "delete" // gitmap:cmd skip CmdEnvList = "list" // gitmap:cmd skip CmdEnvPathAdd = "path" // gitmap:cmd skip CmdEnvPathSub = "add" // gitmap:cmd skip CmdEnvPathRemove = "remove" // gitmap:cmd skip CmdEnvPathList = "list" // gitmap:cmd skip )
gitmap:cmd top-level Env subcommands.
const ( EnvRegistryFileName = "env-registry.json" EnvRegistryFilePath = GitMapDir + "/" + EnvRegistryFileName )
Env registry file.
const ( FlagEnvSystem = "system" FlagEnvShell = "shell" FlagEnvVerbose = "verbose" FlagEnvDryRun = "dry-run" )
Env flag names.
const ( FlagDescEnvSystem = "Target system-level variables (Windows, requires admin)" FlagDescEnvShell = "Target shell profile: bash, zsh (Unix only)" FlagDescEnvVerbose = "Show detailed operation output" FlagDescEnvDryRun = "Preview changes without applying" )
Env flag descriptions.
const ( EnvProfileBashRC = ".bashrc" EnvProfileZshRC = ".zshrc" EnvProfileBash = ".bash_profile" EnvExportPrefix = "export " EnvExportFmt = "export %s=\"%s\"" EnvPathExportFmt = "export PATH=\"$PATH:%s\"" EnvManagedComment = "# managed by gitmap" )
Env shell profile paths.
const ( MsgEnvSet = "Set %s=%s\n" MsgEnvDeleted = "Removed %s\n" MsgEnvPathAdded = "Added to PATH: %s\n" MsgEnvPathRemoved = "Removed from PATH: %s\n" MsgEnvListHeader = "Managed variables:\n" MsgEnvListRow = " %s = %s\n" MsgEnvListEmpty = "No managed variables. Use 'gitmap env set' to add one.\n" MsgEnvPathHeader = "Managed PATH entries:\n" MsgEnvPathRow = " %s\n" MsgEnvPathEmpty = "No managed PATH entries.\n" MsgEnvDrySet = "[dry-run] Would set %s=%s\n" MsgEnvDryPath = "[dry-run] Would add to PATH: %s\n" MsgEnvDryDelete = "[dry-run] Would remove %s\n" MsgEnvGetFmt = "%s=%s\n" )
Env terminal messages.
const ( ErrEnvNameRequired = "Variable name is required." ErrEnvValueRequired = "Variable value is required." ErrEnvPathRequired = "PATH entry is required." ErrEnvNotFound = "Variable '%s' is not managed by gitmap.\n" ErrEnvPathNotExist = "Error: directory does not exist at %s (operation: resolve, reason: file does not exist)\n" ErrEnvInvalidName = "Invalid variable name: %s (must be alphanumeric and underscore only)\n" ErrEnvProfileWrite = "Error: failed to write shell profile at %s: %v (operation: write)\n" ErrEnvRegistryLoad = "Error: failed to load env registry at %s: %v (operation: read)\n" ErrEnvRegistrySave = "Error: failed to save env registry at %s: %v (operation: write)\n" ErrEnvSubcommand = "Unknown env subcommand: %s\n" ErrEnvSystemWindows = "System-level variables require administrator privileges." ErrEnvPathDuplicate = "PATH entry already exists: %s\n" )
Env error messages.
const ( CmdExport = "export" CmdExportAlias = "ex" )
gitmap:cmd top-level Export CLI commands.
const ( MsgExportDone = "Database exported to %s (%d repos, %d groups, %d releases, %d history, %d bookmarks)\n" MsgExportFailed = "export failed: %v\n" )
Export messages.
const ( MsgFindNextEmpty = "No repos with available updates. Run `gitmap probe --all` first.\n" MsgFindNextHeaderFmt = "Available updates (%d):\n" MsgFindNextRowFmt = " %s → %s [method=%s, probed=%s]\n %s\n" MsgFindNextDoneFmt = "Hint: run `gitmap pull` or `gitmap cn next all` to apply.\n" ErrFindNextQuery = "find-next: failed to query: %v" ErrFindNextScanRow = "find-next: failed to scan row: %v" MsgFindNextUsageHeader = "Usage: gitmap find-next [--scan-folder <id>] [--json]" )
find-next user-facing strings.
const ( FindNextFlagScanFolder = "--scan-folder" FindNextFlagJSON = "--json" )
find-next CLI flag tokens.
const ( CmdFindNext = "find-next" CmdFindNextAlias = "fn" )
gitmap:cmd top-level find-next CLI commands.
const ( GitBin = "git" GitClone = "clone" GitPull = "pull" GitRebase = "rebase" GitBranchFlag = "-b" GitDirFlag = "-C" GitFFOnlyFlag = "--ff-only" GitPullRebaseFlag = "--rebase" GitRebaseAbortFlag = "--abort" GitConfigCmd = "config" GitGetFlag = "--get" GitRemoteOrigin = "remote.origin.url" GitRevParse = "rev-parse" GitAbbrevRef = "--abbrev-ref" GitHEAD = "HEAD" GitTag = "tag" GitCheckout = "checkout" GitPush = "push" GitLsRemote = "ls-remote" GitLsRemoteTags = "--tags" GitOrigin = "origin" GitOriginPrefix = "origin/" GitCommitPrefix = "commit:" GitTagAnnotateFlag = "-a" GitTagMessageFlag = "-m" GitTagListFlag = "--list" GitBranchListFlag = "--list" GitCatFile = "cat-file" GitCatFileTypeFlag = "-t" GitCommitType = "commit" GitTagGlob = "v*" )
Git commands and arguments.
const ( GitFetch = "fetch" GitBranch = "branch" GitLog = "log" GitForEachRef = "for-each-ref" GitArgAll = "--all" GitArgPrune = "--prune" GitArgRemote = "-r" GitArgContains = "--contains" GitArgInsideWorkTree = "--is-inside-work-tree" GitLogTipFormat = "--format=%cI|%H|%s" GitLogDelimiter = "|" GitLogFieldCount = 3 GitPointsAtFmt = "--points-at=%s" GitRefsRemotesFmt = "refs/remotes/%s" GitFormatRefnameShort = "--format=%(refname:short)" GitForEachRefTagFmt = "--format=%(refname:short)|%(creatordate:iso-strict)" GitRefsTagsPrefix = "refs/tags/" HeadPointer = " -> " ShaDisplayLength = 7 )
Git arguments for latest-branch operations.
const ( CloneInstructionFmt = "git clone -b %s %s %s" HTTPSFromSSHFmt = "https://%s/%s" SSHFromHTTPSFmt = "git@%s:%s" )
Clone instruction format.
const ( FlagOpenValue = "--open" FlagJSON = "--json" FlagLimit = "--limit" FlagSource = "--source" FlagAllRepos = "--all-repos" // v3.20.0: list-releases multi-repo batch view FlagCompact = "--compact" FlagGroups = "--groups" )
Cross-command CLI flag values.
Each command parses its own `flag.NewFlagSet`, so these strings are reused safely (e.g. --json appears for `list-versions`, `list-releases`, `amend-list`, etc.). Centralized here so renames stay consistent.
const ( CmdGoMod = "gomod" CmdGoModAlias = "gm" )
gitmap:cmd top-level GoMod CLI commands.
const ( HelpGoMod = " gomod (gm) <path> Rename Go module path across repo with branch safety" HelpGoModFlags = "GoMod flags:" HelpGoModDry = " --dry-run Preview changes without modifying files or branches" HelpGoModNoMrg = " --no-merge Commit on feature branch but do not merge back" HelpGoModNoTdy = " --no-tidy Skip go mod tidy after replacement" HelpGoModVerb = " --verbose Print each file path as it is modified" HelpGoModExt = " --ext <exts> Comma-separated extensions to filter (e.g. *.go,*.md); default: all files" )
GoMod help text.
const ( FlagGoModDryRun = "dry-run" FlagGoModNoMerge = "no-merge" FlagGoModNoTidy = "no-tidy" FlagGoModExt = "ext" )
GoMod flag names.
const ( FlagDescGoModDryRun = "Preview changes without modifying files or branches" FlagDescGoModNoMerge = "Commit on feature branch but do not merge back" FlagDescGoModNoTidy = "Skip go mod tidy after replacement" FlagDescGoModExt = "Comma-separated file extensions to filter (e.g. *.go,*.md); default: all files" )
GoMod flag descriptions.
const ( GoModFile = "go.mod" GoModModuleLine = "module " GoFileExt = ".go" )
GoMod file and directory constants.
const ( GoModFeaturePrefix = "feature/replace-" GoModBackupPrefix = "backup/before-replace-" )
GoMod branch prefixes.
const ( MsgGoModSummary = "✔ Module path renamed\n" MsgGoModOld = " Old: %s\n" MsgGoModNew = " New: %s\n" MsgGoModFiles = " Files updated: %d\n" MsgGoModBackupBranch = " Backup branch: %s\n" MsgGoModFeatureBranch = " Feature branch: %s\n" MsgGoModMergedInto = " Merged into: %s\n" MsgGoModLeftOn = " Left on branch: %s\n" MsgGoModVerboseFile = " replaced: %s\n" MsgGoModDryHeader = "gomod (dry-run): would rename module path\n" MsgGoModDryOld = " Old: %s\n" MsgGoModDryNew = " New: %s\n" MsgGoModDryFiles = " Files that would change: %d\n" MsgGoModDryFile = " %s\n" MsgGoModNoImports = "Warning: no files found containing the old path to replace (only go.mod updated)\n" MsgGoModTidyWarn = "Warning: go mod tidy failed: %v (continuing)\n" MsgGoModNothingRename = "module path is already %s, nothing to rename\n" )
GoMod terminal messages.
const ( ErrGoModUsage = "usage: gitmap gomod <new-module-path> [--ext *.go,*.md] [--dry-run] [--no-merge] [--no-tidy] [--verbose]\n" ErrGoModNoFile = "error: go.mod not found in current directory\n" ErrGoModNoModule = "error: no module directive found in go.mod\n" ErrGoModNotRepo = "error: not inside a git repository\n" ErrGoModDirtyTree = "error: working tree has uncommitted changes, commit or stash first\n" ErrGoModBranchExists = "error: branch %s already exists, aborting\n" ErrGoModMergeConflict = "error: merge conflict — resolve manually on %s\n" ErrGoModReadFailed = "error: failed to read %s: %v (operation: read)\n" ErrGoModWriteFailed = "error: failed to write %s: %v (operation: write)\n" ErrGoModCommitFailed = "error: git commit failed: %v\n" )
GoMod error messages.
const ( GitAdd = "add" GitAddAll = "-A" GitCommit = "commit" GitCommitMsg = "-m" GitMerge = "merge" GitMergeNoFF = "--no-ff" GitStatusShort = "--porcelain" GitStatus = "status" )
GoMod git arguments.
const ( CmdHasAnyUpdates = "has-any-updates" CmdHasAnyUpdatesAlias = "hau" CmdHasAnyChanges = "has-any-changes" CmdHasAnyChangesAlias = "hac" )
gitmap:cmd top-level Has-any-updates command.
const ( MsgHAUChecking = " Checking for updates...\n" MsgHAUYes = "\n ✓ Yes, you have %d new update(s) from remote.\n Run 'git pull' to sync.\n" MsgHAUNo = "\n ✓ You are up to date. No new changes.\n" MsgHAUAhead = "\n ✓ You are %d commit(s) ahead of remote. No incoming changes.\n" MsgHAUDiverged = "\n ⚠ Branch has diverged: %d ahead, %d behind remote.\n Run 'git pull --rebase' or 'git pull' to reconcile.\n" MsgHAUNoUpstream = "\n ⚠ No upstream tracking branch configured.\n Run 'git branch --set-upstream-to=origin/<branch>' first.\n" ErrHAUNotRepo = "Error: not inside a Git repository.\n" ErrHAUFetchFailed = " Warning: fetch failed, using cached refs: %v\n" )
Has-any-updates messages.
const ( HDDefaultPort = 5173 HDDistDir = "dist" HDDocsDir = "docs-site" DocsSiteArchive = "docs-site.zip" )
Help-dashboard defaults.
const ( MsgHDServingStatic = " Serving docs from %s on http://localhost:%d\n" MsgHDStartingDev = " Starting dev server from %s...\n" MsgHDRunningNPM = " Running npm install...\n" MsgHDOpening = " Opening http://localhost:%d in browser...\n" MsgHDNoDistFallback = " No pre-built dist/ found, falling back to npm run dev\n" MsgHDStopped = "\n Server stopped.\n" )
Help-dashboard terminal messages.
const ( ErrHDNoDocsDir = " ✗ Docs site directory not found at %s (operation: resolve, reason: directory does not exist)\n" ErrHDNPMInstall = " ✗ npm install failed: %v\n" ErrHDDevServer = " ✗ Dev server failed: %v\n" ErrHDServe = " ✗ Failed to start server: %v\n" ErrHDNPMNotFound = " ✗ npm not found — install Node.js to use dev mode\n" ErrDocsSiteBundle = " ✗ Failed to bundle docs-site: %v\n" )
Help-dashboard error messages.
const ( MsgDocsSiteBundling = " Bundling docs-site from %s...\n" MsgDocsSiteBundled = " ✓ Docs site bundled: %s\n" )
Docs-site release messages.
const ( HelpGroupScanning = " Scanning & Discovery:" HelpGroupCloning = " Cloning & Sync:" HelpGroupGitOps = " Git Operations:" HelpGroupRelease = " Release & Versioning:" HelpGroupReleaseInfo = " Release History & Info:" HelpGroupData = " Data, Profiles & Bookmarks:" HelpGroupHistory = " History & Stats:" HelpGroupAmendGroup = " Author Amendment:" HelpGroupProject = " Project Detection:" HelpGroupSSH = " SSH Key Management:" HelpGroupZip = " Zip Groups (Release Archives):" HelpGroupEnvTools = " Environment & Tools:" HelpGroupTasks = " File-Sync Tasks:" HelpGroupUtilities = " Utilities:" HelpGroupVisualize = " Visualization:" HelpGroupHint = " Run any command with --help or -h for detailed usage and examples." HelpGroupExample = " Quick start:" HelpExampleScan = " $ gitmap scan ~/projects" HelpExampleList = " $ gitmap ls" HelpExamplePull = " $ gitmap pull my-api" HelpExampleCD = " $ gitmap cd my-api" HelpCompactHint = " Use --compact for a minimal command list without descriptions." HelpAlias = " alias (a) <sub> Assign short names to repos (set, remove, list, show, suggest)" HelpSSH = " ssh <sub> Generate, list, and manage SSH keys for Git authentication" HelpZipGroup = " zip-group (z) <sub> Manage named file collections for release ZIP archives" // Compact-mode lines: command (alias) only. CompactScanning = " scan (s), rescan (rsc), list (ls)" CompactCloning = " clone (c), clone-next (cn), desktop-sync (ds), github-desktop (gd)" CompactGitOps = " pull (p), exec (x), status (st), watch (w), has-any-updates, latest-branch (lb)" CompactRelease = " release (r), release-self (rs), release-branch (rb), temp-release" CompactRelInfo = "" /* 139-byte string literal not displayed */ CompactData = " export (ex), import (im), profile (pf), bookmark (bk), db-reset" CompactHistory = " history (hi), history-reset (hr), stats (ss)" CompactAmend = " amend (am), amend-list (al)" CompactProject = " go-repos (gr), node-repos (nr), react-repos (rr), cpp-repos (cr), csharp-repos (csr)" CompactSSH = " ssh" CompactZip = " zip-group (z)" CompactEnvTools = " env, install (in), uninstall (un)" CompactTasks = " task" CompactVisualize = " dashboard (db)" CompactUtilities = "" /* 152-byte string literal not displayed */ CompactNoMatchFmt = " No group matching '%s'. Showing all groups:\n" )
Help group headers.
const ( // Scan flags help section. HelpScanFlags = "Scan flags:" HelpConfig = " --config <path> Config file (default: ./data/config.json)" HelpMode = " --mode ssh|https Clone URL style (default: https)" HelpOutput = " --output csv|json|terminal Output format (default: terminal)" HelpOutputPath = " --output-path <dir> Output directory (default: .gitmap/output)" HelpOutFile = " --out-file <path> Exact output file path" HelpScanFlagGitHubDesktop = " --github-desktop Add repos to GitHub Desktop" HelpOpen = " --open Open output folder after scan" HelpQuiet = " --quiet Suppress clone help section (for CI/scripted use)" // Clone flags help section. HelpCloneFlags = "Clone flags:" HelpTargetDir = " --target-dir <dir> Base directory for clones (default: .)" HelpSafePull = " --safe-pull Pull existing repos with retry + unlock diagnostics (auto-enabled)" HelpVerbose = " --verbose Write detailed debug log to a timestamped file" // Release flags help section. HelpReleaseFlags = "Release flags:" HelpAssets = " --assets <path> Directory or file to attach to the release" HelpCommit = " --commit <sha> Create release from a specific commit" HelpRelBranch = " --branch <name> Create release from latest commit of a branch" HelpBump = " --bump major|minor|patch Auto-increment from latest released version" HelpDraft = " --draft Create an unpublished draft release" HelpDryRun = " --dry-run Preview release steps without executing" HelpCompressFlag = " --compress Wrap assets in .zip (Windows) or .tar.gz archives" HelpChecksumsFlag = " --checksums Generate SHA256 checksums.txt for assets" )
Help section headers and flag-line help strings, grouped by command domain. Extracted from constants_cli.go to keep that file under the 200-line guideline.
const ( HintCDRepo = "gitmap cd <repo-name>" HintCDRepoDesc = "Navigate to a repo" HintGroupCreate = "gitmap g create <name>" HintGroupCreateDesc = "Create a group" HintLsType = "gitmap ls go" HintLsTypeDesc = "List only Go projects" HintGroupAdd = "gitmap g add <group> <slug>" HintGroupAddDesc = "Add repos to a group" HintPullGroup = "gitmap g pull" HintPullGroupDesc = "Pull repos in active group" HintGroupShow = "gitmap g show <name>" HintGroupShowDesc = "Show repos in a group" HintGroupDelete = "gitmap g delete <name>" HintGroupDeleteDesc = "Delete a group" HintLsGroups = "gitmap ls groups" HintLsGroupsDesc = "List all groups" HintGPull = "gitmap g pull" HintGPullDesc = "Pull active group repos" HintGStatus = "gitmap g status" HintGStatusDesc = "Show active group status" HintGExec = "gitmap g exec <cmd>" HintGExecDesc = "Run git across active group" HintGClear = "gitmap g clear" HintGClearDesc = "Clear active group" HintCDSetDefault = "gitmap cd set-default <name> <path>" HintCDSetDefaultDesc = "Set a default repo path" HintCDRepos = "gitmap cd repos" HintCDReposDesc = "Browse all repos interactively" HintMGUsage = "gitmap mg g1,g2" HintMGUsageDesc = "Select multiple groups" HintZGCreate = "gitmap z create <name>" HintZGCreateDesc = "Create a zip group" HintZGAdd = "gitmap z add <group> <path>" HintZGAddDesc = "Add files to a zip group" HintZGShow = "gitmap z show <name>" HintZGShowDesc = "Show items in a zip group" HintZGDelete = "gitmap z delete <name>" HintZGDeleteDesc = "Delete a zip group" HintZGRelease = "gitmap r v1.0.0 --zip-group <name>" HintZGReleaseDesc = "Include zip group in release" HintAliasSet = "gitmap a set <alias> <slug>" HintAliasSetDesc = "Create a repo alias" HintAliasList = "gitmap a list" HintAliasListDesc = "List all aliases" HintAliasSuggest = "gitmap a suggest" HintAliasSuggestDesc = "Auto-suggest aliases" HintAliasUse = "gitmap pull -A <alias>" HintAliasUseDesc = "Use alias with any command" HintAliasRemove = "gitmap a remove <alias>" HintAliasRemoveDesc = "Remove an alias" )
Hint messages for project-repos commands (go-repos, node-repos, etc.).
const ( SQLInsertHistory = `` /* 163-byte string literal not displayed */ SQLUpdateHistory = `` /* 129-byte string literal not displayed */ SQLSelectAllHistory = `` /* 176-byte string literal not displayed */ SQLSelectHistoryByCommand = `` /* 194-byte string literal not displayed */ SQLDeleteAllHistory = "DELETE FROM CommandHistory" SQLDropCommandHistory = "DROP TABLE IF EXISTS CommandHistory" )
SQL: command history operations (v15: CommandHistoryId PK).
const ( CmdHistory = "history" CmdHistoryAlias = "hi" CmdHistoryReset = "history-reset" CmdHistoryResetAlias = "hr" )
gitmap:cmd top-level History CLI commands.
const ( HelpHistory = " history (hi) Show command execution audit log (--limit N, --json, --command, --detail)" HelpHistoryReset = " history-reset (hr) Clear command history (--confirm required)" )
History help text.
const ( FlagDescDetail = "Detail level: basic, standard, or detailed (default: standard)" FlagDescCommand = "Filter by command name" )
History flag descriptions.
const ( DetailBasic = "basic" DetailStandard = "standard" DetailDetailed = "detailed" )
History detail levels.
const ( MsgHistoryColumnsBasic = "COMMAND TIMESTAMP STATUS" MsgHistoryColumnsStandard = "COMMAND TIMESTAMP FLAGS STATUS DURATION" MsgHistoryColumnsDetailed = "COMMAND TIMESTAMP ARGS FLAGS STATUS DURATION REPOS SUMMARY" MsgHistoryRowBasicFmt = "%-15s %-24s %s\n" MsgHistoryRowStdFmt = "%-15s %-24s %-24s %-7s %s\n" MsgHistoryRowDetailFmt = "%-15s %-24s %-16s %-24s %-7s %-9s %-6s %s\n" )
History terminal columns.
const ( MsgHistoryEmpty = "No command history found.\n" MsgHistoryResetDone = "Command history cleared.\n" ErrHistoryResetFailed = "failed to reset command history: %v\n" ErrHistoryResetNoConfirm = "history-reset requires --confirm flag\n" ErrHistoryQuery = "failed to query command history: %v" MsgHistoryStatusOK = "OK" MsgHistoryStatusFail = "FAIL" )
History messages.
const ( CmdImport = "import" CmdImportAlias = "im" )
gitmap:cmd top-level Import CLI commands.
const ( MsgImportDone = "Database imported from %s (%d repos, %d groups, %d releases, %d history, %d bookmarks)\n" MsgImportFailed = "import failed: %v\n" MsgImportReadFailed = "failed to read import file: %v\n" MsgImportParseFailed = "failed to parse import file: %v\n" ErrImportNoConfirm = "import requires --confirm flag (existing data will be merged)\n" MsgImportSkipGroup = "skipped group %q: missing member repos\n" )
Import messages.
const ( CmdInstall = "install" CmdInstallAlias = "in" CmdUninstall = "uninstall" CmdUninstallAlias = "un" )
gitmap:cmd top-level Install CLI commands.
const ( HelpInstall = " install (in) <tool> Install a developer tool by name" HelpUninstall = " uninstall (un) <tool> Remove a previously installed tool" )
Install help text.
const ( ToolVSCode = "vscode" ToolNodeJS = "node" ToolYarn = "yarn" ToolBun = "bun" ToolPnpm = "pnpm" ToolPython = "python" ToolGo = "go" ToolGit = "git" ToolGitLFS = "git-lfs" ToolGHCLI = "gh" ToolGitHubDesktop = "github-desktop" ToolCPP = "cpp" ToolPHP = "php" ToolPowerShell = "powershell" ToolChocolatey = "chocolatey" ToolWinget = "winget" ToolNpp = "npp" ToolNppSettings = "npp-settings" ToolNppInstall = "install-npp" ToolVSCodeSync = "vscode-settings" ToolOBSSync = "obs-settings" ToolWTSync = "wt-settings" ToolScripts = "scripts" ToolDbeaver = "dbeaver" ToolStickyNotes = "sticky-notes" ToolLiteDB = "litedb" ToolVSCodeCtx = "vscode-ctx" ToolPwshCtx = "pwsh-ctx" ToolOBS = "obs" ToolAllDevTools = "all" )
Supported tool names — Core.
const ( ToolMySQL = "mysql" ToolMariaDB = "mariadb" ToolPostgreSQL = "postgresql" ToolSQLite = "sqlite" ToolMongoDB = "mongodb" ToolCouchDB = "couchdb" ToolRedis = "redis" ToolCassandra = "cassandra" ToolNeo4j = "neo4j" ToolElasticsearch = "elasticsearch" ToolDuckDB = "duckdb" )
Supported tool names — Databases.
const ( PkgMgrChocolatey = "choco" PkgMgrWinget = "winget" PkgMgrApt = "apt" PkgMgrBrew = "brew" PkgMgrSnap = "snap" PkgMgrDnf = "dnf" PkgMgrPacman = "pacman" )
Package manager names.
const ( FlagInstallManager = "manager" FlagInstallVersion = "version" FlagInstallVerbose = "verbose" FlagInstallDryRun = "dry-run" FlagInstallCheck = "check" FlagInstallList = "list" FlagInstallStatus = "status" FlagInstallUpgrade = "upgrade" FlagInstallYes = "yes" )
Install flag names.
const ( FlagDescInstallManager = "Force package manager (choco, winget, apt, brew, snap)" FlagDescInstallVersion = "Install a specific version" FlagDescInstallVerbose = "Show full installer output" FlagDescInstallDryRun = "Show install command without executing" FlagDescInstallCheck = "Only check if tool is installed" FlagDescInstallList = "List all supported tools" FlagDescInstallStatus = "Show installed tools from database" FlagDescInstallUpgrade = "Upgrade an already-installed tool" FlagDescInstallYes = "Auto-confirm install without prompting" )
Install flag descriptions.
const ( FlagUninstallDryRun = "dry-run" FlagUninstallForce = "force" FlagUninstallPurge = "purge" )
Uninstall flag names.
const ( FlagDescUninstallDryRun = "Show uninstall command without executing" FlagDescUninstallForce = "Skip confirmation prompt" FlagDescUninstallPurge = "Remove config files too" )
Uninstall flag descriptions.
const ( ChocoPkgVSCode = "vscode" ChocoPkgNodeJS = "nodejs" ChocoPkgYarn = "yarn" ChocoPkgBun = "bun" ChocoPkgPnpm = "pnpm" ChocoPkgPython = "python" ChocoPkgGo = "golang" ChocoPkgGit = "git" ChocoPkgGitLFS = "git-lfs" ChocoPkgGHCLI = "gh" ChocoPkgGitHubDesktop = "github-desktop" ChocoPkgCPP = "mingw" ChocoPkgPHP = "php" ChocoPkgMySQL = "mysql" ChocoPkgMariaDB = "mariadb" ChocoPkgPostgreSQL = "postgresql" ChocoPkgSQLite = "sqlite" ChocoPkgMongoDB = "mongodb" ChocoPkgCouchDB = "couchdb" ChocoPkgRedis = "redis-64" ChocoPkgNeo4j = "neo4j-community" ChocoPkgElasticsearch = "elasticsearch" ChocoPkgDuckDB = "duckdb" ChocoPkgNpp = "notepadplusplus" ChocoPkgDbeaver = "dbeaver" ChocoPkgOBS = "obs-studio" ChocoPkgPowerShell = "powershell-core" ChocoPkgStickyNotes = "microsoft-windows-terminal" // sticky notes is a Windows Store app )
Chocolatey package IDs.
const ( WingetPkgVSCode = "Microsoft.VisualStudioCode" WingetPkgPowerShell = "Microsoft.PowerShell" WingetPkgDbeaver = "dbeaver.DBeaverCommunity" WingetPkgOBS = "OBSProject.OBSStudio" WingetPkgStickyNotes = "9NBLGGH4QGHW" // Microsoft Sticky Notes Store ID WingetPkgGitHubDesktop = "GitHub.GitHubDesktop" )
Winget package IDs.
const ( AptPkgNodeJS = "nodejs" AptPkgPython = "python3" AptPkgGo = "golang" AptPkgGit = "git" AptPkgGitLFS = "git-lfs" AptPkgCPP = "g++" AptPkgPHP = "php" AptPkgMySQL = "mysql-server" AptPkgMariaDB = "mariadb-server" AptPkgPostgreSQL = "postgresql" AptPkgSQLite = "sqlite3" AptPkgMongoDB = "mongod" AptPkgCouchDB = "couchdb" AptPkgRedis = "redis-server" AptPkgCassandra = "cassandra" AptPkgElasticsearch = "elasticsearch" )
Apt package IDs.
const ( BrewPkgNodeJS = "node" BrewPkgPython = "python" BrewPkgGo = "go" BrewPkgGit = "git" BrewPkgGitLFS = "git-lfs" BrewPkgGHCLI = "gh" BrewPkgCPP = "gcc" BrewPkgPHP = "php" BrewPkgMySQL = "mysql" BrewPkgMariaDB = "mariadb" BrewPkgPostgreSQL = "postgresql" BrewPkgSQLite = "sqlite" BrewPkgMongoDB = "mongodb-community" BrewPkgCouchDB = "couchdb" BrewPkgRedis = "redis" BrewPkgNeo4j = "neo4j" BrewPkgElasticsearch = "elasticsearch" BrewPkgDuckDB = "duckdb" BrewPkgDbeaver = "dbeaver-community" BrewPkgOBS = "obs" )
Brew package IDs.
const ( SnapPkgCouchDB = "couchdb" SnapPkgRedis = "redis" )
Snap package IDs.
const ( MsgInstallChecking = "\n Checking if %s is installed...\n" MsgInstallFound = " ✓ %s is already installed (version: %s)\n" MsgInstallNotFound = " ✗ %s is not installed.\n" MsgInstallInstalling = "\n Installing %s...\n" MsgInstallSuccess = " ✓ %s installed successfully.\n" MsgInstallDryCmd = " [dry-run] Would run: %s\n" MsgInstallVerifying = "\n Verifying %s installation...\n" MsgInstallListHeader = "Supported tools:\n\n" MsgInstallListRow = " %-20s %s\n" MsgInstallRecorded = " ✓ Recorded %s v%s in database.\n" MsgInstallStatusHdr = "Installed tools:\n\n" MsgInstallStatusRow = " %-20s %-12s %-8s %s\n" MsgInstallExeVerify = " Verifying %s binary at: %s\n" MsgInstallExeFound = " ✓ Binary confirmed: %s\n" MsgInstallNppSettings = "Syncing Notepad++ settings...\n" MsgInstallNppSkipBin = "Skipping Notepad++ installation (settings-only mode)\n" MsgInstallNppSkipSet = "Skipping Notepad++ settings (install-only mode)\n" MsgInstallNppExtract = "Extracting Notepad++ settings to %s...\n" MsgInstallPrompt = "\n → Install %s %s using %s? (y/N): " MsgInstallPromptNoVer = "\n → Install %s (latest) using %s? (y/N): " MsgInstallAborted = "\n Installation canceled by user.\n" MsgInstallVersion = " → Version: %s\n" MsgInstallVersionLabel = " → Version: latest\n" MsgInstallManager = " → Package manager: %s\n" )
Install terminal messages.
const ( ErrInstallToolRequired = "Tool name is required. Use --list to see available tools." ErrInstallUnknownTool = "Unknown tool: %s. Use --list to see available tools.\n" ErrInstallNoPkgMgr = "No package manager found. Install Chocolatey or Winget first." ErrInstallFailed = "\n ✗ Installation failed for %s.\n" ErrInstallFailedReason = " → Reason: %v\n" ErrInstallFailedVersion = " → Attempted version: %s\n" ErrInstallFailedManager = " → Package manager: %s\n" ErrInstallFailedCmd = " → Command: %s\n" ErrInstallFailedLog = " → Error log: %s\n" ErrInstallFailedHint = " → Share the log file with an AI or support to diagnose the issue.\n" ErrInstallVerifyFailed = "\n ✗ Post-install verification failed for %s.\n" ErrInstallAdminRequired = "%s requires administrator privileges to install.\n" ErrInstallNetworkRequired = "Network connection required for installation." ErrInstallExeNotFound = " Error: post-install binary not found at %s (operation: verify, reason: file does not exist)\n" )
Install error messages.
const ( MsgInstallAptUpdate = "\n Updating package index (apt-get update)...\n" MsgInstallAptUpdateDone = " ✓ Package index updated.\n" ErrInstallAptUpdateFailed = " ⚠ apt-get update failed (continuing anyway): %v\n" )
Apt-specific messages.
const ( ErrNppZipNotFound = "Error: settings zip not found at %s: %v (operation: extract, reason: file does not exist)\n" ErrNppSourceDir = "Error: settings source directory not found at %s: %v (operation: read, reason: directory does not exist)\n" ErrNppDirCreate = "Error: failed to create directory %s: %v (operation: mkdir, reason: path is inaccessible)\n" ErrNppExtractEntry = "Error: failed to open zip entry '%s' for extraction to %s: %v (operation: extract)\n" ErrNppFileCreate = "Error: failed to create file at %s: %v (operation: write, reason: path is inaccessible)\n" ErrNppFileCopy = "Error: failed to copy zip entry '%s' to %s: %v (operation: extract)\n" ErrNppFileRead = "Error: failed to read settings file at %s: %v (operation: read)\n" ErrNppFileWrite = "Error: failed to write settings file to %s: %v (operation: write)\n" ErrNppWindowsOnly = "Error: Notepad++ settings sync is only supported on Windows (current OS: %s)\n" ErrNppNoAppData = "Error: APPDATA environment variable not set (operation: resolve, reason: environment variable not set)\n" MsgNppSettingsSynced = "Settings synced to %s\n" MsgNppSettingsFallback = "Settings synced to %s (fallback — zip was missing)\n" )
NPP error messages — Code Red: all file errors include exact path and reason.
const ( MsgUninstallRemoving = "Removing %s...\n" MsgUninstallSuccess = "%s uninstalled successfully.\n" MsgUninstallDryCmd = "[dry-run] Would run: %s\n" MsgUninstallConfirm = "Uninstall %s? (y/N): " ErrUninstallFailed = "Uninstall failed for %s: %v\n" ErrUninstallNotFound = "%s is not tracked in the database. Use --force to try anyway.\n" ErrUninstallDBRemove = "Warning: could not remove %s from database: %v\n" )
Uninstall messages.
const ( MsgScriptsTarget = " → Scripts target: %s\n" MsgScriptsCloning = " Cloning gitmap repo for scripts...\n %s\n" MsgScriptsSkip = " ⚠ Skipped (not found): %s\n" MsgScriptsCopied = " ✓ Copied: %s\n" MsgScriptsDone = "\n ✅ %d scripts installed to %s\n" ErrScriptsMkdir = " ✗ Could not create target directory %s: %v\n" ErrScriptsTemp = " ✗ Could not create temp directory: %v\n" ErrScriptsClone = " ✗ Clone failed: %v\n" ErrScriptsCopy = " ✗ Failed to copy %s: %v\n" )
Scripts install messages.
const ( ToolCategoryCore = "Core Tools" ToolCategoryDatabase = "Databases" )
Tool categories.
const ( SQLInsertInstalledTool = `` /* 237-byte string literal not displayed */ SQLSelectInstalledTool = `` /* 186-byte string literal not displayed */ SQLSelectAllInstalled = `` /* 185-byte string literal not displayed */ SQLDeleteInstalledTool = `DELETE FROM InstalledTool WHERE Tool = ?` SQLExistsInstalledTool = `SELECT COUNT(*) FROM InstalledTool WHERE Tool = ?` SQLDropInstalledTool = `DROP TABLE IF EXISTS InstalledTool` SQLDropInstalledTools = `DROP TABLE IF EXISTS InstalledTools` // legacy )
SQL: InstalledTool queries (v15).
const ( MsgLLMDocsWritten = " ✓ LLM.md written to %s\n" MsgLLMDocsGenning = " ↻ Generating LLM.md from command registry...\n" ErrLLMDocsWrite = " ✗ Could not write LLM.md: %v\n" HelpLLMDocs = " llm-docs (ld) Generate LLM.md reference for AI assistants" )
llm-docs messages.
const ( FlagLLMDocsStdout = "stdout" FlagDescLLMDocsStdout = "Print to stdout instead of writing LLM.md file" FlagLLMDocsFormat = "format" FlagDescLLMDocsFormat = "Output format: markdown (default) or json" ErrLLMDocsFormat = " ✗ Unknown format %q — use markdown or json\n" FlagLLMDocsSections = "sections" FlagDescLLMDocsSections = "Comma-separated sections to include (default: all)" ErrLLMDocsSections = " ✗ Unknown section %q — valid: commands,architecture,flags,conventions,structure,database,installation,patterns\n" LLMDocsValidSections = "commands,architecture,flags,conventions,structure,database,installation,patterns" )
llm-docs flags.
const ( MsgLockCheckScanning = "Checking for processes locking %s...\n" MsgLockCheckFound = "The following processes are using this folder:\n%s\n" MsgLockCheckKillPrompt = "Terminate these processes to allow deletion? [y/N] " MsgLockCheckKilling = "Terminating %s (PID %d)...\n" MsgLockCheckKilled = "✓ Terminated %s\n" MsgLockCheckRetrying = "Retrying folder removal...\n" WarnLockCheckKillFailed = "Warning: could not terminate %s (PID %d): %v\n" WarnLockCheckScanFailed = "Warning: could not scan for locking processes: %v\n" MsgLockCheckNoneFound = "No locking processes detected.\n" )
Lock-check messages.
const ( NoteNoRemote = "no remote configured" UnknownRepoName = "unknown" )
Notes.
const ( GitHubDesktopBin = "github" OSWindows = "windows" MsgDesktopNotFound = "GitHub Desktop CLI not found — skipping." MsgDesktopAdded = " ✓ Added to GitHub Desktop: %s\n" MsgDesktopFailed = " ✗ Failed to add %s: %v\n" MsgDesktopSummary = "GitHub Desktop: %d added, %d failed\n" MsgGHDesktopRegister = " Registering with GitHub Desktop: %s\n" MsgGHDesktopDone = " ✓ Registered with GitHub Desktop: %s\n" ErrGHDesktopCwd = " ✗ Could not determine current directory: %v\n" ErrGHDesktopNotRepo = " ✗ Not a git repository: %s\n (run `gitmap gd <path>` to register a different folder)\n" ErrGHDesktopInvoke = " ✗ GitHub Desktop CLI failed: %v\n%s\n" )
GitHub Desktop.
const ( MsgLatestBranchFetching = " Fetching remotes..." MsgLatestBranchFetchWarning = " Warning: fetch failed: %v\n" LBUnknownBranch = "<unknown>" )
Latest-branch display messages.
const ( ErrGenericFmt = "Error: %v\n" ErrBareFmt = "%v\n" )
Generic error formats.
const ( CmdExplorer = "explorer" // gitmap:cmd skip CmdOpen = "open" // gitmap:cmd skip CmdXdgOpen = "xdg-open" // gitmap:cmd skip CmdWindowsShell = "cmd" // gitmap:cmd skip CmdArgSlashC = "/c" // gitmap:cmd skip CmdArgStart = "start" // gitmap:cmd skip CmdArgEmpty = "" // gitmap:cmd skip )
gitmap:cmd top-level OS file-explorer commands.
const ( ErrDesktopReadFailed = "Error reading %s: %v\n" ErrDesktopParseFailed = "Error parsing JSON from %s: %v\n" ErrNoAbsPath = "no absolute path" )
Desktop sync error messages.
const ( ErrUnknownCommand = "Unknown command: %s\n" ErrUnknownGroupSub = "Unknown group subcommand: %s\n" )
Command dispatch errors.
const ( DocsURL = "https://gitmap.dev/docs" MsgDocsOpened = " ✓ Opened %s\n" ErrDocsOpen = " ✗ Failed to open browser: %v\n" )
Docs command.
const ( MsgFoundRepos = "Found %d repositories.\n" MsgCSVWritten = " 📊 CSV %s\n" MsgJSONWritten = " 🧬 JSON %s\n" MsgTextWritten = " 📝 Text list %s\n" MsgStructureWritten = " 🌳 Structure %s\n" MsgCloneScript = " 🪄 Clone PS1 %s\n" MsgDirectClone = " ⚡ HTTPS PS1 %s\n" MsgDirectCloneSSH = " 🔐 SSH PS1 %s\n" MsgDesktopScript = " 🖥️ Desktop PS1 %s\n" MsgCloneComplete = "\nClone complete: %d succeeded, %d failed\n" MsgAutoSafePull = "Existing repos detected — safe-pull enabled automatically.\n" MsgOpenedFolder = "Opened output folder: %s\n" MsgVerboseLogFile = "Verbose log: %s\n" MsgDesktopSyncStart = "\n Syncing repos to GitHub Desktop from %s...\n" MsgDesktopSyncSkipped = " ⊘ Skipped (already exists): %s\n" MsgDesktopSyncAdded = " ✓ Added to GitHub Desktop: %s\n" MsgDesktopSyncFailed = " ✗ Failed: %s — %v\n" MsgDesktopSyncDone = "\n GitHub Desktop sync: %d added, %d skipped, %d failed\n" MsgNoOutputDir = "Error: .gitmap/output/ not found in current directory.\nRun 'gitmap scan' first to generate output files." MsgNoJSONFile = "Error: %s not found.\nRun 'gitmap scan' first to generate the JSON output." MsgFailedClones = "\nFailed clones:" MsgFailedEntry = " - %s (%s): %s\n" MsgPullStarting = "\n Pulling %s (%s)...\n" MsgPullSuccess = " ✓ %s is up to date.\n" MsgPullFailed = " ✗ Pull failed for %s: %s\n" MsgPullAvailable = "\nAvailable repos:" MsgPullListEntry = " - %s\n" WarnVerboseLogFailed = "Warning: could not create verbose log: %v\n" MsgRescanReplay = "\n Rescanning with cached flags (dir: %s)...\n" MsgScanCacheSaved = " 💾 Cache %s\n" MsgDBUpsertDone = " ✅ %d repositories upserted into database\n" MsgDBUpsertFailed = "Warning: database upsert failed: %v\n" // Section headers for the post-scan summary. // MsgSectionArtifacts takes the common output base directory so it can be // printed once instead of repeated on every file line. MsgSectionArtifacts = "\n📦 Output Artifacts\n" + MsgSectionRule + "\n📂 Base: %s\n\n" MsgSectionDatabase = "\n🗄️ Database\n" + MsgSectionRule + "\n" MsgSectionProjects = "\n🔍 Project Detection\n" + MsgSectionRule + "\n" MsgSectionDone = "\n🎉 Scan complete.\n" MsgSectionRule = "" /* 132-byte string literal not displayed */ MsgScanFolderTagged = " 🏷️ Tagged %d repo(s) with scan folder #%d\n" MsgUpdateStarting = "\n Updating gitmap from source repo...\n" MsgUpdateRepoPath = " → Repo path: %s\n" MsgUpdateVersion = "\n ✓ Updated to gitmap v%s\n" )
CLI messages.
const ( MsgListHeader = "SLUG REPO NAME" MsgListSeparator = "" /* 126-byte string literal not displayed */ MsgListRowFmt = "%-20s %s\n" MsgListVerboseFmt = "%-20s %-20s %s\n" MsgListEmpty = "No repos tracked. Run 'gitmap scan' first." MsgListDBPath = " → Database: %s\n" MsgGroupCreated = "Group created: %s\n" MsgGroupDeleted = "Group deleted: %s\n" MsgGroupAdded = "Added %s to group %s\n" MsgGroupRemoved = "Removed %s from group %s\n" MsgGroupHeader = "GROUP REPOS DESCRIPTION" MsgGroupRowFmt = "%-15s %-7d %s\n" MsgGroupShowHeader = "Group: %s (%d repos)\n" MsgGroupShowRowFmt = " %-16s %s\n" MsgGroupEmpty = "No groups defined. Use 'gitmap group create <name>' to create one." MsgGroupActivated = "Active group set: %s\n" MsgGroupActiveShow = "Active group: %s\n" MsgGroupNoActive = "No active group. Use 'gitmap g <name>' to set one." MsgGroupCleared = "Active group cleared." ErrGroupNameReq = "Error: group name is required" ErrGroupUsage = "Usage: gitmap group <create|add|remove|list|show|delete> [args]" ErrGroupSlugReq = "Error: at least one slug is required" ErrListDBFailed = "Error: could not open database: %v\nRun 'gitmap scan' first.\n" ErrNoDatabase = "No database found. Run 'gitmap scan' first." MsgDBResetDone = "Database reset: all repos and groups cleared.\n" ErrDBResetFailed = "Error: database reset failed: %v\n" ErrDBResetNoConfirm = "Error: this will delete all tracked repos and groups.\nRun with --confirm to proceed: gitmap db-reset --confirm" MsgResetFileRemoved = "Removed database file: %s\n" MsgResetReseeded = "Reseeded %s\n" MsgResetDone = "Reset complete: database file deleted, schema rebuilt, seeds reapplied.\n" ErrResetNoConfirm = "" /* 137-byte string literal not displayed */ ErrResetRemoveFile = "Error: could not delete database file %s: %v\n" ErrResetReinit = "Error: could not reinitialize database: %v\n" )
List and group messages.
const ( ErrLatestBranchNotRepo = "Error: not inside a Git repository." ErrLatestBranchNoRefs = "Error: no remote-tracking branches found for remote '%s'.\n" ErrLatestBranchNoRefsAll = "Error: no remote-tracking branches found on any remote." ErrLatestBranchNoCommits = "Error: could not read commit info for remote branches." ErrLatestBranchNoMatch = "Error: no branches matching filter '%s'.\n" )
Latest-branch error messages.
const ( ErrSourceRequired = "Error: source file or URL is required" ErrCloneUsage = "Usage: gitmap clone <url|source|json|csv|text> [folder] [--target-dir <dir>] [--safe-pull]" ErrShorthandNotFound = "Error: %s not found.\nRun 'gitmap scan' first to generate output files.\n" ErrConfigLoad = "Error: failed to load config from %s: %v (operation: read)\n" ErrScanFailed = "Error: scan failed on directory %s: %v (operation: resolve)\n" ErrCloneFailed = "Error: clone failed for source file %s: %v (operation: read)\n" ErrOutputFailed = "Error: output generation failed: %v\n" ErrCreateDir = "Error: cannot create directory at %s: %v (operation: mkdir)\n" ErrCreateFile = "Error: cannot create file at %s: %v (operation: write)\n" ErrNoRepoPath = `` /* 706-byte string literal not displayed */ ErrUpdateFailed = "Update error: %v\n" ErrPullSlugRequired = "Error: repo name is required" ErrPullUsage = "Usage: gitmap pull <repo-name> [--verbose]" ErrPullLoadFailed = "Error: could not load gitmap.json at %s: %v (operation: read)\n" ErrPullNotFound = "Error: no repo found matching '%s'\n" ErrPullNotRepo = "Error: %s is not a git repository\n" ErrRescanNoCache = "Error: no previous scan found. Run 'gitmap scan' first.\n%v\n" ErrSetupLoadFailed = "Error: could not load git-setup.json at %s: %v (operation: read)\n" ErrStatusLoadFailed = "Error: could not load gitmap.json at %s for status: %v (operation: read)\nRun 'gitmap scan' first.\n" MsgStatusNoData = "" /* 139-byte string literal not displayed */ ErrExecUsage = "Usage: gitmap exec <git-args...>\nExample: gitmap exec fetch --prune" ErrExecLoadFailed = "Error: could not load gitmap.json at %s: %v (operation: read)\nRun 'gitmap scan' first.\n" ErrReleaseVersionRequired = "Error: version is required.\nProvide a version argument, use --bump, or create a version.json file." ErrReleaseUsage = "" /* 133-byte string literal not displayed */ ErrReleaseBranchUsage = "Usage: gitmap release-branch <release/vX.Y.Z> [--assets <path>] [--draft]" ErrReleaseAlreadyExists = "Error: version %s is already released. See .gitmap/release/%s.json for details.\n" ErrReleaseTagExists = "Error: tag %s already exists.\n" ErrReleaseBranchNotFound = "Error: branch %s does not exist.\n" ErrReleaseCommitNotFound = "Error: commit %s not found.\n" ErrReleaseInvalidVersion = "Error: '%s' is not a valid version.\n" ErrReleaseBumpNoLatest = "Error: no previous release found. Create an initial release before using --bump.\n" ErrReleaseBumpConflict = "Error: --bump cannot be used with an explicit version argument.\n" ErrReleaseCommitBranch = "Error: --commit and --branch are mutually exclusive.\n" ErrReleasePushFailed = "Error: failed to push to remote: %v\n" ErrReleaseVersionLoad = "Error: could not read version.json at %s: %v (operation: read)\n" ErrReleaseMetaWrite = "Error: could not write release metadata at %s: %v (operation: write)\n" ErrChangelogRead = "Error: could not read CHANGELOG.md at %s: %v (operation: read)\n" ErrChangelogVersionNotFound = "Error: version %s not found in CHANGELOG.md\n" ErrChangelogOpen = "Error: could not open CHANGELOG.md at %s: %v (operation: open)\n" )
CLI error messages.
const ( MsgListReleasesEmpty = "No releases found." MsgListReleasesHeader = "Releases (%d found)\n" MsgListReleasesSeparator = "" /* 216-byte string literal not displayed */ MsgListReleasesColumns = " VERSION TAG BRANCH DRAFT LATEST SOURCE DATE" MsgListReleasesRowFmt = " %-10s %-12s %-19s %-6s %-7s %-8s %s\n" ErrListReleasesFailed = "Error: failed to load releases: %v\n" MsgYes = "yes" MsgNo = "no" )
List-releases messages.
const ( MsgListReleasesAllReposEmpty = "No releases recorded across any repo. Run `gitmap release` in any repo first." MsgListReleasesAllReposHeader = "Releases across all repos (%d found)\n" MsgListReleasesAllReposSeparator = "" /* 252-byte string literal not displayed */ MsgListReleasesAllReposColumns = " REPO VERSION TAG BRANCH LATEST SOURCE DATE" MsgListReleasesAllReposRowFmt = " %-20s %-10s %-12s %-19s %-7s %-8s %s\n" )
List-releases --all-repos messages (v3.20.0). Wider table — adds REPO column.
const ( MsgReleasesImported = "Releases imported: %d from .gitmap/release/\n" WarnReleaseImportSkip = "Warning: skipping %s: %v\n" ReleaseGlob = "v*.json" )
Release import messages.
const ( MsgPendingMetaFound = " → Found %d unreleased version(s) from .gitmap/release/ metadata\n" MsgPendingMetaRelease = " → Creating release from metadata: %s (commit: %s)\n" WarnPendingMetaNoCommit = " ⚠ Skipping %s: commit %s not found in repository\n" WarnPendingMetaNoSHA = " ⚠ Skipping %s: no commit SHA in metadata\n" )
Pending metadata discovery messages.
const ( MsgClearReleaseDone = " ✓ Removed .gitmap/release/%s.json\n" MsgClearReleaseDryRun = " [dry-run] Would remove %s\n" ErrClearReleaseUsage = "Usage: gitmap clear-release-json <version> [--dry-run]\nExample: gitmap clear-release-json v2.20.0" ErrClearReleaseNotFound = "Error: no release file found for %s\n" ErrClearReleaseFailed = "Error: could not remove release file at %s: %v (operation: delete)\n" )
Clear release JSON messages.
const ( MsgRevertCheckout = " → Checking out %s...\n" MsgRevertStarting = "\n Building reverted version...\n" MsgRevertDone = "\n ✓ Revert complete.\n" ErrRevertUsage = "Usage: gitmap revert <version>\nExample: gitmap revert v2.9.0" ErrRevertTagNotFound = "Error: tag %s not found locally. Run 'git fetch --tags' first.\n" ErrRevertCheckoutFailed = "Error: git checkout failed: %v\n" ErrRevertFailed = "Revert error: %v\n" RevertScriptLogExec = "executing revert script: %s" RevertScriptLogExit = "revert script exited: err=%v" )
Revert messages.
const ( NetworkProto = "tcp" NetworkCheckHost = "github.com:443" NetworkTimeoutSec = 5 ErrOffline = "network unavailable — cannot reach github.com" MsgOfflineWarning = "\n ⚠ Network unavailable — cannot reach github.com.\n" MsgOfflineHint = " Offline operations (scan, list, status, group) still work.\n" )
Network / offline detection.
const ( MsgMigrated = "Migrated %s/ -> %s/\n" MsgMergedAndRemoved = "Merged %s/ into %s/ (%d files copied, %d skipped) and removed legacy folder\n" ErrMigrationFailed = "Error: failed to migrate directory %s: %v (operation: move, reason: path is inaccessible)\n" )
Legacy directory migration messages.
const ( MsgLegacyIDMigrationStart = "Migrating database from legacy UUID IDs to integer IDs..." MsgLegacyIDMigrationDone = "Database migration complete. Group-repo associations have been reset." )
Legacy ID migration messages.
const ( MsgCloneURLCloning = "Cloning %s into %s...\n" MsgCloneURLDone = "Cloned %s successfully.\n" ErrCloneURLFailed = "Error: clone failed for %s: %v (operation: git-clone)\n" MsgCloneDesktopPrompt = "Add to GitHub Desktop? (y/n): " ErrCloneURLExists = "Error: target folder already exists: %s\n" )
Direct URL clone messages.
const ( MsgCloneReplaceFree = " [clone] target free, cloning directly into %s\n" MsgCloneReplaceExists = " [clone] target exists: %s\n" MsgCloneReplaceStrategy1 = " [clone] strategy 1/2 — direct remove + clone" MsgCloneReplaceStrat1Fail = " [clone] strategy 1/2 failed: %v\n" MsgCloneReplaceStrategy2 = " [clone] strategy 2/2 — temp-clone then swap-in-place" MsgCloneReplaceTempClone = " [clone] cloning into %s\n" MsgCloneReplaceEmptying = " [clone] emptying target contents (%d entries) in %s\n" MsgCloneReplaceMoving = " [clone] moving %d entries from temp into target\n" MsgCloneReplaceSwapDone = " [clone] swap complete; target now points at fresh clone" WarnCloneReplaceEntryFail = " [clone] could not remove %s: %v\n" FlagDescCloneNoReplace = "Abort if the target folder already exists (disables replace)" )
Clone replace-existing-folder flow (spec/01-app/96-clone-replace-existing-folder.md).
const ( VSCodeBin = "code" VSCodeFlagReuseWindow = "--reuse-window" VSCodeFlagNewWindow = "--new-window" MsgVSCodeOpening = " Opening %s in VS Code...\n" MsgVSCodeOpened = " VS Code opened." MsgVSCodeNotFound = " VS Code not found on PATH — skipping editor open.\n" ErrVSCodeOpenFailed = " Warning: could not open VS Code: %v\n" ErrVSCodeAdminLock = " Warning: VS Code may be running as administrator — could not open automatically.\n" )
VS Code integration messages.
const ( CmdMv = "mv" CmdMove = "move" CmdMergeBoth = "merge-both" CmdMergeBothA = "mb" CmdMergeLeft = "merge-left" CmdMergeLeftA = "ml" CmdMergeRight = "merge-right" CmdMergeRgtA = "mr" )
gitmap:cmd top-level Move/merge command IDs and aliases.
Spec: spec/01-app/97-move-and-merge.md
const ( FlagMMYes = "yes" FlagMMYesShort = "y" FlagMMAccept = "accept-all" FlagMMAcceptShrt = "a" FlagMMPreferL = "prefer-left" FlagMMPreferR = "prefer-right" FlagMMPreferNew = "prefer-newer" FlagMMPreferSkip = "prefer-skip" FlagMMNoPush = "no-push" FlagMMNoCommit = "no-commit" FlagMMForceFold = "force-folder" FlagMMPullFold = "pull" FlagMMInit = "init" FlagMMDryRun = "dry-run" FlagMMIncludeVCS = "include-vcs" FlagMMIncludeNM = "include-node-modules" )
Move/merge flag names.
const ( LogPrefixMv = "[mv]" LogPrefixMergeBoth = "[merge-both]" LogPrefixMergeLeft = "[merge-left]" LogPrefixMergeRight = "[merge-right]" )
Log prefixes per command.
const ( CommitMsgMv = "gitmap mv from %s" CommitMsgMergeBoth = "gitmap merge-both with %s" CommitMsgMergeLeft = "gitmap merge-left from %s" CommitMsgMergeRight = "gitmap merge-right from %s" )
Commit message templates.
const ( GitAddCmd = "add" GitAddAllArg = "-A" GitCommitCmd = "commit" GitMessageArg = "-m" )
Git argument tokens used by movemerge finalize.
const ( ConflictPromptLine = " [L]eft [R]ight [S]kip [A]ll-left [B]all-right [Q]uit" ConflictPromptCue = " > " ErrMMUsageFmt = "Usage: gitmap %s LEFT RIGHT [flags]\n" ErrMMSameFolderFmt = "error: LEFT and RIGHT resolve to the same folder: %s" ErrMMNestedFmt = "error: RIGHT is nested inside LEFT (or vice versa): LEFT=%s RIGHT=%s" ErrMMOriginFmt = "error: folder '%s' exists but its remote is '%s', not '%s'. Pass --force-folder to overwrite, or rename it." ErrMMSrcMissingFmt = "error: source '%s' does not exist" ErrMMQuit = "user pressed Q (quit)" ErrMMPushFailFmt = "Push failed. Local commit is preserved at %s. Resolve manually or re-run with --no-push to skip." )
Conflict prompt and error messages.
const ( CmdMultiGroup = "multi-group" CmdMultiGroupAlias = "mg" )
gitmap:cmd top-level Multi-group CLI commands.
const ( CmdMGClear = "clear" // gitmap:cmd skip CmdMGPull = "pull" // gitmap:cmd skip CmdMGStatus = "status" // gitmap:cmd skip CmdMGExec = "exec" // gitmap:cmd skip )
gitmap:cmd top-level Multi-group subcommands.
const ( MsgMGActive = "Active multi-group: %s\n" MsgMGSet = "Multi-group set: %s\n" MsgMGCleared = "Multi-group selection cleared.\n" MsgMGNone = "No multi-group set. Use 'gitmap mg g1,g2' to select groups.\n" ErrMGUsage = "Usage: gitmap multi-group <group1,group2,...|clear|pull|status|exec>\n" ErrMGGroupMissing = "Group not found: %s\n" )
Multi-group messages.
const ( PathSnippetMarkerOpenFmt = "# gitmap shell wrapper v2 - managed by %s. Do not edit manually." PathSnippetMarkerClose = "# gitmap shell wrapper v2 end" )
PathSnippet marker lines (do not change without bumping snippet version).
const ( PathSnippetBashFmt = `` /* 194-byte string literal not displayed */ PathSnippetZshFmt = `` /* 194-byte string literal not displayed */ PathSnippetFishFmt = `` /* 142-byte string literal not displayed */ PathSnippetPwshFmt = `` /* 238-byte string literal not displayed */ )
PathSnippet body templates per shell. Each MUST start with the marker open line and end with the marker close line so awk/sed-based rewriters in run.sh and install.sh can locate the block.
const ( PathSnippetShellBash = "bash" PathSnippetShellZsh = "zsh" PathSnippetShellFish = "fish" PathSnippetShellPwsh = "pwsh" )
Shell identifiers accepted by `gitmap setup print-path-snippet --shell`.
const ( FlagDescPathSnippetShell = "Target shell: bash | zsh | fish | pwsh" FlagDescPathSnippetDir = "Resolved deploy directory to inject into the snippet" FlagDescPathSnippetManager = "Manager string shown in the snippet header (e.g. run.sh, installer)" )
CLI flag descriptions for the print-path-snippet subcommand.
const ( ErrPathSnippetUnknownShell = "unknown shell %q (expected bash | zsh | fish | pwsh)" ErrPathSnippetDirRequired = "--dir is required" )
Errors.
const ( TableTaskType = "TaskType" TablePendingTask = "PendingTask" TableCompletedTask = "CompletedTask" )
Pending task table names (v15: singular; PK renamed to {Table}Id).
const ( TaskTypeDelete = "Delete" TaskTypeRemove = "Remove" TaskTypeScan = "Scan" TaskTypeClone = "Clone" TaskTypePull = "Pull" TaskTypeExec = "Exec" )
Pending task type seed values.
const ( SQLDropCompletedTask = "DROP TABLE IF EXISTS CompletedTask" SQLDropPendingTask = "DROP TABLE IF EXISTS PendingTask" SQLDropTaskType = "DROP TABLE IF EXISTS TaskType" )
SQL: drop pending task tables.
const ( SQLMigratePendingWorkDir = "ALTER TABLE PendingTask ADD COLUMN WorkingDirectory TEXT DEFAULT ''" SQLMigratePendingCmdArgs = "ALTER TABLE PendingTask ADD COLUMN CommandArgs TEXT DEFAULT ''" SQLMigrateCompletedWorkDir = "ALTER TABLE CompletedTask ADD COLUMN WorkingDirectory TEXT DEFAULT ''" SQLMigrateCompletedCmdArgs = "ALTER TABLE CompletedTask ADD COLUMN CommandArgs TEXT DEFAULT ''" )
SQL: legacy ALTERs to add WorkingDirectory/CommandArgs columns. Idempotent. Run BEFORE the v15 rebuild copies these columns by name.
const ( ErrPendingTaskInsert = "failed to insert pending task: %v (operation: insert)" ErrPendingTaskQuery = "failed to query pending tasks: %v (operation: query)" ErrPendingTaskComplete = "failed to complete task: %v (operation: complete)" ErrPendingTaskFail = "failed to update task failure: %v (operation: update)" ErrPendingTaskNotFound = "pending task not found: %d\n" ErrTaskTypeNotFound = "task type not found: %s" ErrPendingTaskExists = "pending task already exists for %s at %s (Id %d)\n" ErrPendingReplayFailed = "failed to replay command: %v (operation: exec)" )
Pending task error messages.
const ( WarnPendingDBOpen = "Warning: could not open DB for task tracking: %v\n" WarnPendingTypeLookup = "Warning: task type lookup failed: %v\n" WarnPendingInsertFailed = "Warning: could not record pending task: %v\n" WarnPendingCompleteFail = "Warning: could not mark task #%d complete: %v\n" WarnPendingFailUpdate = "Warning: could not update task #%d failure: %v\n" )
Pending task warning messages.
const ( ReasonLockScanFailed = "lock scan failed: %v" ReasonNoLockingProcs = "removal failed, no locking processes found: %v" ReasonUserDeclined = "user declined to terminate locking processes" ReasonRetryFailed = "retry removal failed: %v" ReasonReplayFailed = "command replay failed: %v" ReasonTargetNotFound = "target path does not exist: %s (operation: stat, reason: file does not exist)" ReasonWorkDirNotFound = "working directory does not exist: %s (operation: stat, reason: directory does not exist)" ReasonPermissionDenied = "permission denied at path: %s (operation: %s, reason: %v)" )
Pending task failure reasons for FailureReason field.
const ( HelpPending = " pending List all pending tasks" HelpDoPending = " do-pending (dp) Retry pending tasks (all or by ID)" )
Pending task help text.
const ( MsgPendingTaskCreated = "Task #%d created: %s %s\n" MsgPendingTaskCompleted = "Task #%d completed: %s\n" MsgPendingTaskFailed = "Task #%d failed: %s\n" MsgPendingListHeader = "Pending Tasks:\n" MsgPendingListRow = " #%-6d %-8s %-40s %s\n" MsgPendingListEmpty = "No pending tasks.\n" MsgPendingRetryAll = "Retrying %d pending task(s)...\n" MsgPendingRetryOne = "Retrying task #%d...\n" MsgPendingReplaying = "Replaying: gitmap %s\n" MsgPendingSkipNotExist = "Task #%d skipped: target path no longer exists, marking complete\n" )
Pending task terminal messages.
const ( SQLInsertPendingTask = `INSERT INTO PendingTask (TaskTypeId, TargetPath, WorkingDirectory, SourceCommand, CommandArgs) VALUES (?, ?, ?, ?, ?)` SQLSelectAllPendingTasks = `` /* 252-byte string literal not displayed */ SQLSelectPendingTaskByID = `` /* 253-byte string literal not displayed */ SQLSelectPendingTaskByTypePath = `SELECT p.PendingTaskId FROM PendingTask p WHERE p.TaskTypeId = ? AND p.TargetPath = ?` SQLSelectPendingTaskByTypePathCmd = `SELECT p.PendingTaskId FROM PendingTask p WHERE p.TaskTypeId = ? AND p.TargetPath = ? AND p.CommandArgs = ?` SQLUpdatePendingTaskFailure = `UPDATE PendingTask SET FailureReason = ?, UpdatedAt = CURRENT_TIMESTAMP WHERE PendingTaskId = ?` SQLDeletePendingTask = `DELETE FROM PendingTask WHERE PendingTaskId = ?` )
SQL: pending task operations (v15: PendingTaskId / CompletedTaskId / TaskTypeId PKs).
const ( SQLInsertCompletedTask = `` /* 159-byte string literal not displayed */ SQLSelectAllCompletedTasks = `` /* 262-byte string literal not displayed */ )
SQL: completed task operations (v15: CompletedTaskId PK).
const ( ProbeMethodLsRemote = "ls-remote" ProbeMethodShallowClone = "shallow-clone" ProbeMethodNone = "none" )
Probe method tokens (stored in VersionProbe.Method).
const ( ErrProbeOpenDB = "version probe: failed to open database: %v" ErrProbeMissingURL = "version probe: repo %q has no clone URL" ErrProbeLsRemoteFail = "ls-remote failed: %v" ErrProbeCloneFail = "shallow clone failed: %v" ErrProbeRecord = "version probe: failed to record result for repo %d: %v" ErrProbeNoRepo = "version probe: no repo found at %q" ErrProbeTagFail = "scan: failed to tag repos with scan folder %d: %v" )
VersionProbe error/message strings.
const ( MsgProbeStartFmt = "→ Probing %d repo(s)...\n" MsgProbeOkFmt = " ✓ %s → %s (method=%s)\n" MsgProbeNoneFmt = " · %s → no new version (method=%s)\n" MsgProbeFailFmt = " ✗ %s → %s\n" MsgProbeDoneFmt = "✓ Probe complete: %d available, %d unchanged, %d failed.\n" MsgProbeUsageHeader = "Usage: gitmap probe [<repo-path>|--all]" MsgProbeNoTargets = "No repos to probe. Pass a path or --all.\n" )
VersionProbe user-facing CLI strings.
const ( ProbeFlagAll = "--all" ProbeFlagJSON = "--json" )
VersionProbe CLI tokens.
const ( CmdProfile = "profile" CmdProfileAlias = "pf" )
gitmap:cmd top-level Profile CLI commands.
const ( CmdProfileCreate = "create" // gitmap:cmd skip CmdProfileList = "list" // gitmap:cmd skip CmdProfileSwitch = "switch" // gitmap:cmd skip CmdProfileDelete = "delete" // gitmap:cmd skip CmdProfileShow = "show" // gitmap:cmd skip )
gitmap:cmd top-level Profile subcommands.
const ( ProfileConfigFile = "profiles.json" DefaultProfileName = "default" ProfileDBPrefix = "gitmap-" )
Profile file and defaults.
const ( MsgProfileCreated = "Profile created: %s\n" MsgProfileSwitched = "Switched to profile: %s\n" MsgProfileDeleted = "Profile deleted: %s\n" MsgProfileActive = "Active profile: %s\n" MsgProfileColumns = "PROFILE STATUS" MsgProfileRowFmt = "%-20s %s\n" MsgProfileActiveTag = "(active)" MsgProfileEmpty = "No profiles found.\n" ErrProfileUsage = "usage: gitmap profile <create|list|switch|delete|show> [name]\n" ErrProfileCreateUsage = "usage: gitmap profile create <name>\n" ErrProfileSwitchUsage = "usage: gitmap profile switch <name>\n" ErrProfileDeleteUsage = "usage: gitmap profile delete <name>\n" ErrProfileNotFound = "profile not found: %s\n" ErrProfileExists = "profile already exists: %s\n" ErrProfileDeleteActive = "cannot delete the active profile (switch first)\n" ErrProfileDeleteDefault = "cannot delete the default profile\n" ErrProfileConfig = "failed to manage profile config: %v\n" )
Profile messages.
const ( ProjectTypeGoID int64 = 1 ProjectTypeNodeID int64 = 2 ProjectTypeReactID int64 = 3 ProjectTypeCppID int64 = 4 ProjectTypeCsharpID int64 = 5 )
Project type IDs matching seed order in SQLSeedProjectTypes.
const ( ProjectKeyGo = "go" ProjectKeyNode = "node" ProjectKeyReact = "react" ProjectKeyCpp = "cpp" ProjectKeyCsharp = "csharp" )
Project type keys.
const ( TableProjectType = "ProjectType" TableDetectedProject = "DetectedProject" TableGoProjectMetadata = "GoProjectMetadata" TableGoRunnableFile = "GoRunnableFile" TableCsharpProjectMeta = "CsharpProjectMetadata" TableCsharpProjectFile = "CsharpProjectFile" TableCsharpKeyFile = "CsharpKeyFile" )
Project detection table names (v15: PascalCase singular + {Table}Id PK).
const ( LegacyTableProjectTypes = "ProjectTypes" LegacyTableDetectedProjects = "DetectedProjects" LegacyTableGoRunnableFiles = "GoRunnableFiles" LegacyTableCsharpProjectMeta = "CSharpProjectMetadata" // pre-Csharp spelling LegacyTableCsharpProjectFiles = "CSharpProjectFiles" // pre-Csharp spelling + plural LegacyTableCsharpKeyFiles = "CSharpKeyFiles" // pre-Csharp spelling + plural )
Legacy project detection table names retained ONLY for migration detection (do not use in new SQL). Includes both pre-v15 plurals and the pre-Csharp-rename "CSharp*" spellings.
const ( JSONFileGoProjects = "go-projects.json" JSONFileNodeProjects = "node-projects.json" JSONFileReactProjects = "react-projects.json" JSONFileCppProjects = "cpp-projects.json" JSONFileCsharpProjects = "csharp-projects.json" )
Project JSON output filenames.
const ( IndicatorGoMod = "go.mod" IndicatorPackageJSON = "package.json" IndicatorCMakeLists = "CMakeLists.txt" IndicatorMesonBuild = "meson.build" )
Detection indicator files.
const ( ExtCsproj = ".csproj" ExtFsproj = ".fsproj" ExtVcxproj = ".vcxproj" ExtSln = ".sln" )
Detection file extensions.
const ( GoCmdDir = "cmd" GoMainFile = "main.go" GoSumFile = "go.sum" CMakeBuildPfx = "cmake-build-" )
Go structural indicators.
const ( CmdGoRepos = "go-repos" CmdGoReposAlias = "gr" CmdNodeRepos = "node-repos" CmdNodeReposAlias = "nr" CmdReactRepos = "react-repos" CmdReactReposAlias = "rr" CmdCppRepos = "cpp-repos" CmdCppReposAlias = "cr" CmdCsharpRepos = "csharp-repos" CmdCsharpAlias = "csr" )
gitmap:cmd top-level Project query commands.
const ( FlagProjectJSON = "json" FlagProjectCount = "count" )
Project query flags.
const ( HelpGoRepos = " go-repos (gr) List repositories containing Go projects" HelpNodeRepos = " node-repos (nr) List repositories containing Node.js projects" HelpReactRepos = " react-repos (rr) List repositories containing React projects" HelpCppRepos = " cpp-repos (cr) List repositories containing C++ projects" HelpCsharpRepos = " csharp-repos (csr) List repositories containing C# projects" )
Project query help text.
const ( MsgProjectDetectDone = " 🧭 Detected %d project(s) across %d repo(s)\n" MsgProjectUpsertDone = " ✅ Saved %d detected project(s) to database\n" MsgProjectJSONWritten = " 📄 %-22s %d record(s)\n" MsgProjectNoDB = "No database found. Run 'gitmap scan' first.\n" MsgProjectNoneFound = "No %s projects found.\n" MsgProjectCount = "%d\n" MsgProjectCleanedStale = "Cleaned %d stale project records\n" MsgProjectListCount = "\n%d projects found.\n" )
Project detection messages.
const ( ErrProjectDetect = "failed to detect projects in %s: %v\n" ErrProjectUpsert = "failed to upsert detected project: %v" ErrProjectQuery = "failed to query projects: %v" ErrProjectJSONWrite = "failed to write %s: %v (operation: write)\n" ErrProjectParseMod = "failed to parse go.mod in %s: %v\n" ErrProjectParsePkgJSON = "failed to parse package.json in %s: %v\n" ErrProjectParseCsproj = "failed to parse .csproj in %s: %v\n" ErrProjectCleanup = "failed to clean stale projects for repo %d: %v\n" ErrGoMetadataUpsert = "failed to upsert Go metadata: %v" ErrGoRunnableUpsert = "failed to upsert Go runnable: %v" ErrCsharpMetaUpsert = "failed to upsert C# metadata: %v" ErrCsharpFileUpsert = "failed to upsert C# project file: %v" ErrCsharpKeyUpsert = "failed to upsert C# key file: %v" )
Project detection error messages.
const ( SQLDeleteStaleProjects = "DELETE FROM DetectedProject WHERE RepoId = ? AND DetectedProjectId NOT IN (%s)" SQLDeleteStaleGoRunnables = "DELETE FROM GoRunnableFile WHERE GoMetadataId = ? AND GoRunnableFileId NOT IN (%s)" SQLDeleteStaleCsharpFiles = "DELETE FROM CsharpProjectFile WHERE CsharpMetadataId = ? AND CsharpProjectFileId NOT IN (%s)" SQLDeleteStaleCsharpKeyFiles = "DELETE FROM CsharpKeyFile WHERE CsharpMetadataId = ? AND CsharpKeyFileId NOT IN (%s)" )
SQL: stale cleanup (v15 singular tables, {Table}Id PKs in WHERE/IN clauses).
const ( SQLDropGoRunnableFile = "DROP TABLE IF EXISTS GoRunnableFile" SQLDropGoRunnableFiles = "DROP TABLE IF EXISTS GoRunnableFiles" // legacy SQLDropGoProjectMetadata = "DROP TABLE IF EXISTS GoProjectMetadata" SQLDropCsharpKeyFile = "DROP TABLE IF EXISTS CsharpKeyFile" SQLDropCsharpKeyFiles = "DROP TABLE IF EXISTS CSharpKeyFiles" // legacy (pre-Csharp + plural) SQLDropCsharpProjectFile = "DROP TABLE IF EXISTS CsharpProjectFile" SQLDropCsharpProjectFiles = "DROP TABLE IF EXISTS CSharpProjectFiles" // legacy SQLDropCsharpProjectMeta = "DROP TABLE IF EXISTS CsharpProjectMetadata" SQLDropCsharpProjectMetaLegacy = "DROP TABLE IF EXISTS CSharpProjectMetadata" // legacy SQLDropDetectedProject = "DROP TABLE IF EXISTS DetectedProject" SQLDropDetectedProjects = "DROP TABLE IF EXISTS DetectedProjects" // legacy SQLDropProjectType = "DROP TABLE IF EXISTS ProjectType" SQLDropProjectTypes = "DROP TABLE IF EXISTS ProjectTypes" // legacy )
SQL: drop project detection tables (v15 names + legacy retained for Reset).
const ( CmdPrune = "prune" CmdPruneAlias = "pr" )
gitmap:cmd top-level Prune command names.
const ( PruneFlagDryRun = "dry-run" PruneFlagConfirm = "confirm" PruneFlagRemote = "remote" )
Prune flag names.
const ( MsgPruneStaleHeader = "\n Stale release branches (%d):\n" MsgPruneStaleItem = " %s → tag %s exists\n" MsgPruneDryRunHint = "\n Use --confirm to delete, or run without --dry-run for interactive mode.\n" MsgPruneDeleting = "\n Pruning stale release branches...\n" MsgPruneDeleted = " ✓ Deleted %s\n" MsgPruneRemoteDelete = " ✓ Deleted remote %s\n" MsgPruneRemoteWarn = " ⚠ Failed to delete remote %s: %v\n" MsgPruneSummary = "\n Summary: %d deleted, %d kept.\n" MsgPruneNone = " No stale release branches found.\n" MsgPrunePrompt = " Delete %d stale branch(es)? (y/N): " MsgPruneAborted = " Prune aborted.\n" )
Prune messages.
const ( ErrPruneListBranches = "failed to list branches: %v\n" ErrPruneDeleteBranch = " ✗ Failed to delete %s: %v\n" )
Prune errors.
const ( GitBranchDeleteFlag = "-D" GitPushDeleteFlag = "--delete" )
Prune git arguments.
const ( FlagDescPullParallel = "Run up to N pulls concurrently (default 1; serial)" FlagDescPullOnlyAvailable = "Skip repos whose latest probe reports no new tag (run `gitmap probe --all` first)" )
CLI flag descriptions (used by flag.NewFlagSet).
const ( MsgPullNoAvailable = "No repos with available updates. Run `gitmap probe --all` first.\n" WarnPullFilterFallback = " ⚠ --only-available filter unavailable (probe DB unreadable); falling back to full target set" )
User-facing pull messages (Phase 2.5).
const ( SetupSectionDiff = "Diff Tool" SetupSectionMerge = "Merge Tool" SetupSectionAlias = "Aliases" SetupSectionCred = "Credential Helper" SetupSectionCore = "Core Settings" SetupSectionComp = "■ Shell Completion —" SetupGlobalFlag = "--global" )
Setup section headers.
const ( MsgReleaseStart = "\n Creating release %s...\n" MsgReleaseBranch = " ✓ Created branch %s\n" MsgReleaseTag = " ✓ Created tag %s\n" MsgReleasePushed = " ✓ Pushed branch and tag to origin\n" MsgReleaseMeta = " ✓ Release metadata written to %s\n" MsgReleaseMetaCommitted = " ✓ Committed release metadata on %s\n" MsgReleaseLatest = " ✓ Marked %s as latest release\n" MsgReleaseAttach = " ✓ Attached %s\n" MsgReleaseChangelog = " ✓ Using CHANGELOG.md as release body\n" MsgReleaseReadme = " ✓ Attached README.md\n" MsgReleaseDryRun = " [dry-run] %s\n" MsgReleaseComplete = "\n Release %s complete.\n" MsgReleaseBranchStart = "\n Completing release from %s...\n" MsgReleaseBranchPending = "\n → On release branch %s with no tag — completing pending release...\n" MsgReleaseVersionRead = " → Version from %s: %s\n" MsgReleaseBumpResult = " → Bumped %s → %s\n" MsgReleaseNotes = " → Release notes: %s\n" MsgReleaseSwitchedBack = " ✓ Switched back to %s\n" MsgReleasePendingNone = " No pending release branches found." MsgReleasePendingFound = "\n Found %d pending release branch(es).\n" MsgReleasePendingFailed = " ✗ Failed to release %s: %v\n" ReleaseBranchPrefix = "release/" ChangelogFile = "CHANGELOG.md" ReadmeFile = "README.md" ReleaseTagPrefix = "Release " FlagDescNotes = "Release notes or title for the release" )
Release messages.
const ( MsgReleaseAutoBumpHeader = "\n Auto-bump: %s → %s (minor)\n" MsgReleaseAutoBumpPrompt = " Proceed with this release? [y/N]: " MsgReleaseAutoBumpYes = " → -y supplied; proceeding without prompt.\n" MsgReleaseAutoBumpAborted = " ✗ Auto-bump aborted by user.\n" )
Bare-release auto-bump messages (v3.19.0).
When `gitmap release` / `gitmap r` is run with no version and no --bump, gitmap reads the last release from .gitmap/release/latest.json, bumps the MINOR segment, and prompts the user. -y skips the prompt.
const ( MsgReleaseScanHeader = "\n Auto-bump %d repo(s) with prior releases:\n" MsgReleaseScanRow = " • %s %s → %s\n" MsgReleaseScanPrompt = "\n Proceed with all releases? [y/N]: " MsgReleaseScanYes = "\n → -y supplied; proceeding without prompt.\n" MsgReleaseScanAborted = " ✗ Multi-repo release aborted by user.\n" MsgReleaseScanRunning = "\n ── Releasing %s → %s ──\n" MsgReleaseScanFail = " ✗ Release failed for %s: %v\n" MsgReleaseScanPartial = "\n ⚠ %d of %d release(s) failed.\n" MsgReleaseScanDone = "\n ✓ All %d release(s) complete.\n" )
Multi-repo scan-dir release messages (v3.19.0).
When `gitmap r` is run from a directory containing many git repos (the cwd itself is NOT a git repo), gitmap walks the tree, keeps only repos that have a prior release manifest, computes a minor bump per repo, and prompts ONCE before releasing them all.
const ( MsgReleaseOrphanedMeta = " ⚠ Release metadata exists for %s but no tag or branch was found.\n" MsgReleaseOrphanedPrompt = " → Do you want to remove the release JSON and proceed? (y/N): " MsgReleaseOrphanedRemoved = " ✓ Removed orphaned release metadata for %s\n" ErrReleaseOrphanedRemove = "failed to remove release metadata at %s: %w (operation: delete)" ErrReleaseAborted = "release aborted by user" )
Release orphaned metadata messages.
const ( MsgSelfReleaseSwitch = "\n → Self-release: switching to %s\n" MsgSelfReleaseReturn = " ✓ Returned to %s\n" MsgSelfReleaseSameDir = "\n → Self-release: already in source repo %s\n" MsgSelfReleasePromptPath = " → Enter gitmap source repo path: " MsgSelfReleaseSavedPath = " ✓ Saved gitmap source repo path: %s\n" MsgSelfReleaseInvalidPath = " ✗ Invalid gitmap source repo path: %s\n" ErrSelfReleaseExec = "could not resolve executable path at %s: %w (operation: resolve)" ErrSelfReleaseNoRepo = "could not locate gitmap source repository" )
Self-release messages.
const ( GitmapRepoPrefix = "github.com/alimtvnetwork/gitmap-v5" GitmapRepoOwner = "github.com/alimtvnetwork/" GitmapRepoNamePrefix = "gitmap-v" MsgInstallHintHeader = ` 📦 Install gitmap %s ` MsgInstallHintWindows = `` /* 133-byte string literal not displayed */ MsgInstallHintUnix = `` /* 132-byte string literal not displayed */ )
Install hint constants (printed after release for gitmap repos).
const ( ReleaseSnippetMarker = "<!-- gitmap-pinned-install-snippet:%s -->" ReleaseSnippetTemplate = "<!-- gitmap-pinned-install-snippet:%s -->\n" + "## Install this exact version (%s)\n\n" + "Copy-paste these snippets to install **this exact tag**. " + "They skip the GitHub `latest` lookup and the versioned-repo discovery probe.\n\n" + "**Windows (PowerShell)**\n" + "```powershell\n" + "$ver = '%s'\n" + "$installer = irm https://raw.githubusercontent.com/alimtvnetwork/gitmap-v5/main/gitmap/scripts/install.ps1\n" + "& ([scriptblock]::Create($installer)) -Version $ver -NoDiscovery\n" + "```\n\n" + "**Linux / macOS (bash)**\n" + "```bash\n" + "curl -fsSL https://raw.githubusercontent.com/alimtvnetwork/gitmap-v5/main/gitmap/scripts/install.sh \\\n" + " | bash -s -- --version %s --no-discovery\n" + "```\n" )
Release-body pinned-install snippet.
AppendPinnedInstallSnippet renders this block into the GitHub release body so anyone copying from the release page installs EXACTLY that tag — no "latest" lookup, no -v<N> sibling-repo discovery.
Spec: spec/07-generic-release/08-pinned-version-install-snippet.md
const ( MsgRollbackStart = "\n ⚠ Push failed — rolling back local branch and tag...\n" MsgRollbackBranch = " ✓ Deleted local branch %s\n" MsgRollbackTag = " ✓ Deleted local tag %s\n" MsgRollbackDone = " ✓ Rollback complete. No changes remain.\n" MsgRollbackWarn = " ⚠ Rollback warning (%s): %v\n" )
Release rollback messages.
const ( CmdReleaseAlias = "release-alias" CmdReleaseAliasShort = "ra" CmdReleaseAliasPull = "release-alias-pull" CmdReleaseAliasPullShort = "rap" LogPrefixReleaseAlias = "[release-alias]" FlagRAPull = "pull" FlagRANoStash = "no-stash" FlagRADryRun = "dry-run" )
gitmap:cmd top-level `gitmap release-alias` and `gitmap release-alias-pull` — release a repo by its registered alias from anywhere on disk.
Spec: docs in helptext/release-alias.md and README.
const ( RAStashMessageFmt = "gitmap-release-alias autostash %s" MsgRAStashCreatedFmt = " ✓ Auto-stashed dirty changes (label: %s)\n" MsgRAStashPoppedFmt = " ✓ Restored auto-stashed changes (label: %s)\n" MsgRAPullingFmt = " ↻ Pulling latest from origin in %s\n" MsgRAReleasingFmt = " ▸ Releasing repo '%s' (path: %s) version=%s\n" WarnRAStashPopFailed = " ⚠ Auto-stash pop failed; your changes remain in `git stash`. Resolve manually." ErrRAUsage = "Usage: gitmap release-alias <alias> <version> [--pull] [--no-stash] [--dry-run]" ErrRAUnknownAliasFmt = "error: alias '%s' is not registered. Run `gitmap as %s` from the repo first." ErrRAChdirFailedFmt = "error: could not change directory to '%s': %v" ErrRAPullFailedFmt = "error: git pull failed in %s: %v" ErrRAStashFailedFmt = "error: auto-stash failed in %s: %v" )
Auto-stash bookkeeping.
const ( TableScanFolder = "ScanFolder" TableVersionProbe = "VersionProbe" )
const ( SQLUpsertScanFolder = `` /* 319-byte string literal not displayed */ SQLSelectAllScanFolders = `` /* 137-byte string literal not displayed */ SQLSelectScanFolderByPath = `SELECT ScanFolderId, AbsolutePath, Label, Notes, LastScannedAt, CreatedAt FROM ScanFolder WHERE AbsolutePath = ?` SQLSelectScanFolderByID = `SELECT ScanFolderId, AbsolutePath, Label, Notes, LastScannedAt, CreatedAt FROM ScanFolder WHERE ScanFolderId = ?` SQLCountReposInScanFolder = `SELECT COUNT(*) FROM Repo WHERE ScanFolderId = ?` SQLDeleteScanFolderByID = `DELETE FROM ScanFolder WHERE ScanFolderId = ?` SQLDeleteScanFolderByPath = `DELETE FROM ScanFolder WHERE AbsolutePath = ?` // Detach: set Repo.ScanFolderId = NULL for any repos pointing at the // scan folder being removed. Run BEFORE DELETE to avoid orphan FK ids. SQLDetachReposFromScanFolder = `UPDATE Repo SET ScanFolderId = NULL WHERE ScanFolderId = ?` )
SQL: ScanFolder operations.
const ( SQLDropScanFolder = "DROP TABLE IF EXISTS ScanFolder" SQLDropVersionProbe = "DROP TABLE IF EXISTS VersionProbe" )
SQL: drop statements for Reset() ordering.
const ( ErrSFEnsure = "failed to ensure scan folder %q: %v" ErrSFList = "failed to list scan folders: %v" ErrSFFindByPath = "no scan folder registered for path: %s" ErrSFFindByID = "no scan folder with id: %d" ErrSFRemove = "failed to remove scan folder: %v" ErrSFDetachRepos = "failed to detach repos from scan folder: %v" ErrSFAbsResolve = "failed to resolve absolute path for %q: %v" ErrSFInvalidID = "invalid scan folder id %q: %v" ErrSFMissingArg = "missing required argument: %s" )
ScanFolder error messages (Code Red zero-swallow policy).
const ( MsgSFAddedFmt = "✓ Registered scan folder: %s (id=%d)\n" MsgSFAddedExistsFmt = "✓ Scan folder already registered: %s (id=%d, last scanned %s)\n" MsgSFRemovedFmt = "✓ Removed scan folder: %s (id=%d, %d repos detached)\n" MsgSFListEmpty = "No scan folders registered. Run `gitmap scan <dir>` or `gitmap sf add <dir>`.\n" MsgSFListHeaderFmt = "Scan folders (%d):\n" MsgSFListRowFmt = " [%d] %s\n label: %s | repos: %d | last scanned: %s\n" MsgSFUsageHeader = "Usage: gitmap sf <add|list|rm> [args]" MsgSFUsageAdd = " gitmap sf add <absolute-path> [--label <text>] [--notes <text>]" MsgSFUsageList = " gitmap sf list" MsgSFUsageRm = " gitmap sf rm <absolute-path|id>" )
ScanFolder user-facing CLI strings.
const ( SFSubAdd = "add" SFSubList = "list" SFSubListAlias = "ls" SFSubRm = "rm" SFSubRmAlias = "remove" SFFlagLabel = "--label" SFFlagNotes = "--notes" )
ScanFolder CLI tokens (avoid magic strings).
const ( SelfInstallDefaultWindows = "D:\\gitmap" SelfInstallDefaultUnix = ".local/bin/gitmap" // joined under $HOME at runtime )
Default install directories per platform.
const ( SelfInstallScriptPwsh = "install.ps1" SelfInstallScriptBash = "install.sh" )
Embedded script names.
const ( SelfInstallRemotePwsh = "https://raw.githubusercontent.com/" + "alimtvnetwork/gitmap-v5/main/gitmap/scripts/install.ps1" SelfInstallRemoteBash = "https://raw.githubusercontent.com/" + "alimtvnetwork/gitmap-v5/main/gitmap/scripts/install.sh" )
Remote installer URLs (fallback when embedded scripts are missing).
const ( MsgSelfInstallHeader = "\n gitmap self-install\n\n" MsgSelfInstallPrompt = " Install directory [%s]: " MsgSelfInstallUsing = " Using install directory: %s\n" MsgSelfInstallEmbedded = " Running embedded installer (%s)...\n" MsgSelfInstallRemote = " Embedded installer unavailable; downloading from %s\n" MsgSelfInstallDone = " ✓ Install completed.\n" MsgSelfInstallReminder = " Open a new terminal (or reload your profile) to pick up PATH changes.\n" )
Self-install messages.
const ( ErrSelfInstallScriptWrite = "Error: write installer to temp: %v\n" ErrSelfInstallScriptRun = "Error: run installer: %v\n" ErrSelfInstallDownload = "Error: download installer from %s: %v\n" ErrSelfInstallNoShell = "Error: no supported shell found (need PowerShell on Windows or bash on Unix)\n" ErrSelfInstallReadStdin = "Error: read install dir from stdin: %v\n" )
Self-install errors.
const ( MsgSelfUninstallHeader = "\n gitmap self-uninstall\n\n" MsgSelfUninstallTargets = " The following will be removed:\n" MsgSelfUninstallTargetBin = " - Binary + deploy dir: %s\n" MsgSelfUninstallTargetData = " - Data dir: %s\n" MsgSelfUninstallTargetSnippet = " - PATH snippet from: %s\n" MsgSelfUninstallTargetCompl = " - Completion files in: %s\n" MsgSelfUninstallConfirmPrompt = "\n Type 'yes' to proceed: " MsgSelfUninstallSkipBin = " ⚠ Could not resolve own binary location: %v\n" MsgSelfUninstallRemovedBin = " ✓ Removed binary: %s\n" MsgSelfUninstallRemovedDir = " ✓ Removed dir: %s\n" MsgSelfUninstallSnippetGone = " ✓ PATH snippet removed from %s\n" MsgSelfUninstallSnippetMiss = " - No PATH snippet found in %s\n" MsgSelfUninstallDone = "\n ✓ gitmap has been uninstalled. Restart your terminal to clear $env:Path.\n\n" MsgSelfUninstallHandoffActive = " Handing off to %s so the original binary can self-delete...\n" )
Self-uninstall messages.
const ( ErrSelfUninstallNoConfirm = "Error: refusing to run without --confirm or interactive 'yes'.\n" ErrSelfUninstallRemove = "Error: remove %s: %v\n" ErrSelfUninstallSnippetRead = "Error: read profile %s: %v\n" ErrSelfUninstallSnippetWrite = "Error: rewrite profile %s: %v\n" ErrSelfUninstallHandoffCopy = "Error: create handoff copy: %v\n" )
Self-uninstall errors.
const ( FlagSelfDir = "--dir" FlagSelfYes = "--yes" FlagSelfConfirm = "--confirm" FlagSelfKeepData = "--keep-data" FlagSelfKeepSnippet = "--keep-snippet" FlagSelfFromVersion = "--version" )
Flag names shared by self-install / self-uninstall.
const ( FlagDescSelfDir = "Install directory (prompted with default if omitted)" FlagDescSelfYes = "Skip the install-directory prompt and accept the default" FlagDescSelfConfirm = "Required for self-uninstall to actually remove files" FlagDescSelfKeepData = "Preserve the .gitmap data dir during self-uninstall" FlagDescSelfKeepSnippet = "Leave the PATH snippet in shell profile during self-uninstall" FlagDescSelfFromVersion = "Pin a specific gitmap version to install (e.g. v3.0.0)" )
Flag descriptions.
const ( CmdSEOWrite = "seo-write" CmdSEOWriteAlias = "sw" CmdCreateTemplate = "ct" // gitmap:cmd skip )
gitmap:cmd top-level SEO-write command constants.
const ( FlagSEOCSV = "csv" FlagSEOURL = "url" FlagSEOService = "service" FlagSEOArea = "area" FlagSEOCompany = "company" FlagSEOPhone = "phone" FlagSEOEmail = "email" FlagSEOAddress = "address" FlagSEOMaxCommits = "max-commits" FlagSEOInterval = "interval" FlagSEOFiles = "files" FlagSEORotateFile = "rotate-file" FlagSEODryRun = "dry-run" FlagSEOTemplate = "template" FlagSEOCreateTemplate = "create-template" FlagSEOAuthorName = "author-name" FlagSEOAuthorEmail = "author-email" )
SEO-write flag names.
const ( FlagDescSEOCSV = "CSV file with title,description columns" FlagDescSEOURL = "Website URL to glorify in commit messages" FlagDescSEOService = "Service name for template placeholders" FlagDescSEOArea = "Geographic area for template placeholders" FlagDescSEOCompany = "Company name for template placeholders" FlagDescSEOPhone = "Phone number for template placeholders" FlagDescSEOEmail = "Email address for template placeholders" FlagDescSEOAddress = "Physical address for template placeholders" FlagDescSEOMaxCommits = "Stop after N commits (0 = run until Ctrl+C)" FlagDescSEOInterval = "Random delay range in seconds (min-max)" FlagDescSEOFiles = "Glob pattern to select files for staging" FlagDescSEORotateFile = "File to modify during rotation mode" FlagDescSEODryRun = "Preview commit messages without executing" FlagDescSEOTemplate = "Load templates from a custom JSON file" FlagDescSEOCreateTemplate = "Generate a sample seo-templates.json and exit" FlagDescSEOAuthorName = "Git author name for commits" FlagDescSEOAuthorEmail = "Git author email for commits" )
SEO-write flag descriptions.
const ( SEODefaultIntervalMin = 60 SEODefaultIntervalMax = 120 SEODefaultInterval = "60-120" SEOSeedFile = "data/seo-templates.json" SEOTemplateOutputFile = "seo-templates.json" )
SEO-write defaults.
const ( PlaceholderService = "{service}" PlaceholderArea = "{area}" PlaceholderURL = "{url}" PlaceholderCompany = "{company}" PlaceholderPhone = "{phone}" PlaceholderEmail = "{email}" PlaceholderAddress = "{address}" )
SEO-write placeholder tokens.
const ( MsgSEOHeader = "seo-write: %d commits planned (interval: %d-%ds)\n" MsgSEOHeaderUnlimited = "seo-write: unlimited commits (interval: %d-%ds)\n" MsgSEOCommit = " [%d/%d] ✓ %q → pushed (file: %s)\n" MsgSEOCommitOpen = " [%d] ✓ %q → pushed (file: %s)\n" MsgSEORotation = " [%d/%d] ↻ rotation: %s (append → commit → revert → commit)\n" MsgSEORotationOpen = " [%d] ↻ rotation: %s (append → commit → revert → commit)\n" MsgSEODone = " Done: %d commits pushed in %s\n" MsgSEODryTitle = " [%d] title: %s\n" MsgSEODryDesc = " desc: %s\n" MsgSEODryAuthor = " author: %s\n" MsgSEOCreated = "Created %s with sample templates\n" MsgSEOSeeded = "Seeded %d templates into database\n" MsgSEOGraceful = "\nGraceful shutdown: finishing current commit...\n" MsgSEOWaiting = " waiting %ds before next commit...\n" )
SEO-write terminal messages.
const ( ErrSEOURLRequired = "error: --url is required in template mode\n" ErrSEOCSVRead = "error: failed to read CSV file at %s: %v (operation: read)\n" ErrSEOCSVEmpty = "error: CSV file contains no rows\n" ErrSEOTemplateRead = "error: failed to read template file at %s: %v (operation: read)\n" ErrSEOTemplateEmpty = "error: no templates found\n" ErrSEOIntervalFmt = "error: invalid --interval format, expected min-max (e.g. 60-120)\n" ErrSEONoFiles = "error: no files found matching pattern\n" ErrSEORotateNotFound = "error: rotate file not found at %s (operation: resolve, reason: file does not exist)\n" ErrSEOGitStage = "error: git add failed: %v\n" ErrSEOGitCommit = "error: git commit failed: %v\n" ErrSEOGitPush = "error: git push failed: %v\n" ErrSEOSeedRead = "error: failed to read seed file at %s: %v (operation: read)\n" ErrSEOCreateWrite = "error: failed to write template file at %s: %v (operation: write)\n" ErrSEODBInsert = "error: failed to insert template: %v\n" )
SEO-write error messages.
const ( HelpSEOWrite = " seo-write (sw) Automated SEO commit scheduler with templates" HelpSEOWriteFlags = "SEO-write flags:" HelpSEOCSV = " --csv <path> CSV file with title,description columns" HelpSEOURL = " --url <url> Website URL to glorify in commit messages (required)" HelpSEOService = " --service <name> Service name for template placeholders" HelpSEOArea = " --area <name> Geographic area for template placeholders" HelpSEOCompany = " --company <name> Company name for template placeholders" HelpSEOPhone = " --phone <number> Phone number for template placeholders" HelpSEOEmail = " --email <addr> Email address for template placeholders" HelpSEOAddress = " --address <addr> Physical address for template placeholders" HelpSEOMaxCommits = " --max-commits <N> Stop after N commits (0 = unlimited, default: 0)" HelpSEOInterval = " --interval <min-max> Random delay in seconds (default: 60-120)" HelpSEOFilesFlag = " --files <glob> Glob pattern to select files for staging" HelpSEORotate = " --rotate-file <f> File to modify in rotation mode" HelpSEODryRunFlag = " --dry-run Preview commit messages without executing" HelpSEOTemplateF = " --template <path> Load templates from a custom JSON file" HelpSEOCreateTpl = " --create-template Generate sample seo-templates.json (alias: ct)" HelpSEOAuthorName = " --author-name <n> Git author name for commits" HelpSEOAuthorEmail = " --author-email <e> Git author email for commits" )
SEO-write help text.
const ( SQLInsertTemplate = "INSERT INTO CommitTemplate (Kind, Template) VALUES (?, ?)" SQLSelectTemplatesByKind = "SELECT CommitTemplateId, Kind, Template, CreatedAt FROM CommitTemplate WHERE Kind = ? ORDER BY CreatedAt" SQLCountTemplates = "SELECT COUNT(*) FROM CommitTemplate" SQLDropCommitTemplate = "DROP TABLE IF EXISTS CommitTemplate" SQLDropCommitTemplates = "DROP TABLE IF EXISTS CommitTemplates" // legacy )
SQL: commit-template operations (v15).
const ( TemplateKindTitle = "title" TemplateKindDescription = "description" )
Template kinds.
const ( SQLUpsertSetting = `INSERT INTO Setting (Key, Value) VALUES (?, ?) ON CONFLICT(Key) DO UPDATE SET Value=excluded.Value` SQLSelectSetting = "SELECT Value FROM Setting WHERE Key = ?" SQLDeleteSetting = "DELETE FROM Setting WHERE Key = ?" )
SQL: setting operations (v15).
const ( SQLDropSetting = "DROP TABLE IF EXISTS Setting" SQLDropSettings = "DROP TABLE IF EXISTS Settings" // legacy )
SQL: reset (v15 + legacy).
const ( SettingActiveGroup = "active_group" SettingActiveMultiGroup = "active_multi_group" SettingSourceRepoPath = "source_repo_path" SettingSchemaVersion = "schema_version" )
Settings keys.
const ( MsgSchemaVersionUpToDateFmt = " ✓ Schema version %d is current — skipping migration pipeline.\n" MsgSchemaVersionAdvanceFmt = " ▸ Schema version %d → %d — running migration pipeline...\n" WarnSchemaVersionWriteFmt = " ⚠ Could not record schema version %d: %v\n" )
Schema-version log strings.
const ( ErrDBSettingUpsert = "failed to save setting: %v" ErrDBSettingQuery = "failed to read setting: %v" )
Settings error messages.
const ( CmdSSH = "ssh" SubCmdSSHCat = "cat" SubCmdSSHList = "list" SubCmdSSHListS = "ls" SubCmdSSHDelete = "delete" SubCmdSSHDeleteS = "rm" SubCmdSSHConfig = "config" )
gitmap:cmd top-level SSH command names.
const ( SQLInsertSSHKey = `INSERT INTO SshKey (Name, PrivatePath, PublicKey, Fingerprint, Email) VALUES (?, ?, ?, ?, ?)` SQLUpdateSSHKey = `UPDATE SshKey SET PrivatePath = ?, PublicKey = ?, Fingerprint = ?, Email = ? WHERE Name = ?` SQLSelectAllSSHKeys = `SELECT SshKeyId, Name, PrivatePath, PublicKey, Fingerprint, Email, CreatedAt FROM SshKey ORDER BY Name` SQLSelectSSHKeyByName = `SELECT SshKeyId, Name, PrivatePath, PublicKey, Fingerprint, Email, CreatedAt FROM SshKey WHERE Name = ?` SQLDeleteSSHKeyByName = `DELETE FROM SshKey WHERE Name = ?` )
SQL: SshKey operations (v15). Constant names retain SSH for callsite stability.
const ( SQLDropSshKey = "DROP TABLE IF EXISTS SshKey" SQLDropSSHKeys = "DROP TABLE IF EXISTS SSHKeys" // legacy )
SQL: drop SshKey table (and legacy plural).
const ( SSHKeyType = "rsa" SSHKeyBits = "4096" DefaultSSHKeyName = "default" SSHKeygenBin = "ssh-keygen" )
SSH key generation defaults.
const ( FlagSSHName = "--name" FlagSSHNameS = "-n" FlagSSHPath = "--path" FlagSSHPathS = "-p" FlagSSHEmail = "--email" FlagSSHEmailS = "-e" FlagSSHForce = "--force" FlagSSHForceS = "-f" FlagSSHFiles = "--files" FlagSSHKey = "--ssh-key" FlagSSHKeyS = "-K" FlagSSHHost = "--host" FlagSSHHostS = "-H" FlagSSHJSON = "--json" FlagSSHConfirm = "--confirm" )
SSH key generation flags.
const ( SSHConfigMarkerStart = "# --- gitmap managed (do not edit) ---" SSHConfigMarkerEnd = "# --- end gitmap managed ---" )
SSH config markers.
const ( MsgSSHGenerated = " \u2713 SSH key %q generated\n" MsgSSHPath = " Path: %s\n" MsgSSHFingerprint = " Fingerprint: %s\n" MsgSSHPubLabel = " Public key:\n\n" MsgSSHCopyHint = "\n \u2139 Copy the public key above and add it to your Git provider.\n" MsgSSHExists = " Key %q already exists at %s\n" MsgSSHExistsFP = " Fingerprint: %s\n" MsgSSHPromptAction = " [R]egenerate / [N]ew path / [C]ancel: " MsgSSHRegenerated = " \u2713 SSH key %q regenerated\n" MsgSSHDeleted = " \u2713 SSH key %q deleted\n" MsgSSHDeletedFiles = " \u2713 Key files removed from disk\n" MsgSSHDeleteConfirm = " Delete SSH key %q? (y/N): " MsgSSHListHeader = "\n SSH Keys (%d):\n\n" MsgSSHListRow = " %-15s %-30s %-25s %s\n" MsgSSHListColumns = " %-15s %-30s %-25s %s\n" MsgSSHConfigDone = " \u2713 SSH config updated\n" MsgSSHConfigShow = "\n Managed SSH config:\n\n" MsgSSHNewPathPrompt = " Enter new key path: " MsgSSHCloneUsing = " \u2192 Cloning with SSH key %q (%s)\n" MsgSSHMultiKeyHint = `` /* 127-byte string literal not displayed */ MsgSSHConfirmPrompt = " Generate SSH key %q at %s? (y/N): " MsgSSHCanceled = " Canceled.\n" MsgSSHHostUsed = " Host: %s\n" )
SSH messages.
const ( ErrSSHKeygen = "Error: SSH key generation failed at %s: %v (operation: write)\n" ErrSSHReadPub = "Error: failed to read public key at %s: %v (operation: read, reason: file does not exist)\n" ErrSSHNotFound = "Error: SSH key not found: %s\n" ErrSSHAvailable = " Available keys: %s\n" ErrSSHNameEmpty = "SSH key name cannot be empty" ErrSSHCreate = "failed to create SSH key record: %v" ErrSSHQuery = "failed to query SSH keys: %v" ErrSSHDelete = "failed to delete SSH key: %v" ErrSSHConfig = "Error: failed to update SSH config at %s: %v (operation: write)\n" ErrSSHKeygenMissing = "Error: ssh-keygen not found on PATH (operation: resolve, reason: file does not exist)\n" ErrSSHEmailResolve = "could not resolve email; use --email flag\n" ErrSSHFingerprint = "Error: failed to read key fingerprint at %s: %v (operation: read)\n" )
SSH error messages — Code Red: all file errors include exact path and reason.
const ( CmdStats = "stats" CmdStatsAlias = "ss" )
gitmap:cmd top-level Stats CLI commands.
const ( SQLStatsPerCommand = `` /* 498-byte string literal not displayed */ SQLStatsForCommand = `` /* 492-byte string literal not displayed */ SQLStatsOverall = `` /* 384-byte string literal not displayed */ )
Stats SQL queries.
const ( MsgStatsHeader = "Command Usage Statistics" MsgStatsSeparator = "" /* 210-byte string literal not displayed */ MsgStatsOverallFmt = "Total: %d executions (%d unique commands) | Success: %d | Fail: %d (%.1f%%) | Avg: %dms\n" MsgStatsColumns = "COMMAND RUNS SUCCESS FAIL FAIL%% AVG(ms) MIN(ms) MAX(ms) LAST USED" MsgStatsRowFmt = "%-15s %-6d %-8d %-5d %-7.1f %-8d %-8d %-8d %s\n" MsgStatsEmpty = "No command history found. Run some commands first.\n" ErrStatsQuery = "failed to query stats: %v" )
Stats terminal formatting.
const ( DBDir = "data" DBFile = "gitmap.db" )
Database location.
const ( LockFileName = "gitmap.lock" LockFilePermission = 0o644 ErrLockHeld = "another gitmap process is running (PID %d).\n If incorrect, delete: %s" )
Lock file.
const ( TableRepo = "Repo" TableGroup = "Group" TableGroupRepo = "GroupRepo" TableRelease = "Release" )
Table names (v15: PascalCase + singular + {Table}Id PK).
const ( LegacyTableRepos = "Repos" LegacyTableGroups = "Groups" LegacyTableGroupRepos = "GroupRepos" LegacyTableReleases = "Releases" )
Legacy table names retained only for migration detection (do not use in new SQL).
const ( SQLUpsertRepo = `` /* 454-byte string literal not displayed */ SQLSelectAllRepos = "" /* 132-byte string literal not displayed */ SQLSelectRepoBySlug = "" /* 133-byte string literal not displayed */ SQLSelectRepoByPath = "" /* 141-byte string literal not displayed */ )
SQL: repo operations (v15: Repo table, RepoId PK).
const ( SQLInsertGroup = `INSERT INTO "Group" (Name, Description, Color) VALUES (?, ?, ?)` SQLSelectAllGroups = `SELECT GroupId, Name, Description, Color, CreatedAt FROM "Group" ORDER BY Name` SQLSelectGroupByName = `SELECT GroupId, Name, Description, Color, CreatedAt FROM "Group" WHERE Name = ?` SQLDeleteGroup = `DELETE FROM "Group" WHERE Name = ?` SQLInsertGroupRepo = "INSERT OR IGNORE INTO GroupRepo (GroupId, RepoId) VALUES (?, ?)" SQLDeleteGroupRepo = "DELETE FROM GroupRepo WHERE GroupId = ? AND RepoId = ?" SQLSelectGroupRepos = `` /* 223-byte string literal not displayed */ SQLCountGroupRepos = "SELECT COUNT(*) FROM GroupRepo WHERE GroupId = ?" )
SQL: group operations (v15: "Group" singular, GroupId PK).
const ( SQLUpsertRelease = `` /* 528-byte string literal not displayed */ SQLSelectAllReleases = `` /* 180-byte string literal not displayed */ // SQLSelectAllReleasesAcrossRepos powers `gitmap releases --all-repos`. // The JOIN on Repo.RepoId = Release.RepoId is what exercises (and // pre-pays) the IdxRelease_RepoId secondary index added in v17. SQLSelectAllReleasesAcrossRepos = `` /* 255-byte string literal not displayed */ SQLSelectReleaseByTag = `` /* 170-byte string literal not displayed */ SQLClearLatestRelease = "UPDATE Release SET IsLatest = 0 WHERE IsLatest = 1 AND RepoId = ?" SQLAddNotesColumn = "ALTER TABLE Release ADD COLUMN Notes TEXT DEFAULT ''" )
SQL: release operations (v17: composite UNIQUE(RepoId, Tag), RepoId FK).
const ( SQLDropGroupRepo = "DROP TABLE IF EXISTS GroupRepo" SQLDropGroupRepos = "DROP TABLE IF EXISTS GroupRepos" // legacy SQLDropGroup = `DROP TABLE IF EXISTS "Group"` SQLDropGroups = "DROP TABLE IF EXISTS Groups" // legacy SQLDropRepo = "DROP TABLE IF EXISTS Repo" SQLDropRepos = "DROP TABLE IF EXISTS Repos" // legacy, kept for migrateLegacyIDs SQLDropRelease = "DROP TABLE IF EXISTS Release" SQLDropReleases = "DROP TABLE IF EXISTS Releases" // legacy )
SQL: reset operations (v15 names + legacy plurals kept for safe drop on upgraded DBs).
const ( ErrDBOpen = "failed to open database at %s: %v (operation: open)" ErrDBMigrate = "failed to initialize tables: %v" ErrDBUpsert = "failed to upsert repo: %v" ErrDBQuery = "failed to query repos: %v" ErrDBNoMatch = "no repo matches slug: %s\n" ErrDBCreateDir = "failed to create database directory at %s: %v (operation: mkdir)" ErrDBGroupCreate = "failed to create group: %v" ErrDBGroupQuery = "failed to query groups: %v" ErrDBGroupAdd = "failed to add repo to group: %v" ErrDBGroupRemove = "failed to remove repo from group: %v" ErrDBGroupDelete = "failed to delete group: %v" ErrDBGroupNone = "no group found: %s" ErrDBGroupExists = "group already exists: %s" ErrDBReleaseUpsert = "failed to upsert release: %v" ErrDBReleaseQuery = "failed to query releases: %v" )
Store error messages.
const ( MsgV15RepoMigrationStart = "→ Migrating database to v15 schema (Repos → Repo)..." MsgV15RepoMigrationDone = "✓ Migrated Repos → Repo (RepoId PK). Existing data preserved." ErrV15RepoMigration = "v15 Repo migration failed: %v" ErrV15RepoCountMismatch = "v15 Repo migration count mismatch: old=%d new=%d" ErrV15Phase2Migration = "v15 Phase 1.2 migration failed: %v" ErrV15Phase3Migration = "v15 Phase 1.3 migration failed: %v" ErrV15Phase4Migration = "v15 Phase 1.4 migration failed: %v" ErrV15Phase5Migration = "v15 Phase 1.5 migration failed: %v" ErrV15Phase6Migration = "v15 Phase 1.6 migration failed: %v" )
Phase 1 v15 migration messages.
const ( MsgV15Phase6Start = "→ Migrating Release table: adding RepoId FK to Repo (v3.17.0 schema)..." MsgV15Phase6Wipe = " Existing Release rows will be wiped and re-imported from .gitmap/release/v*.json on next list-releases." MsgV15Phase6Done = "✓ Release table dropped — will be recreated with RepoId FK on next CREATE pass." ErrReleaseNoRepo = "cannot persist release: no repo registered for path %q. Run `gitmap scan` first to register the repo, then retry." )
Phase 1.6 (v17) Release.RepoId FK migration messages.
const ( CmdTask = "task" CmdTaskAlias = "tk" )
gitmap:cmd top-level Task CLI commands.
const ( CmdTaskCreate = "create" // gitmap:cmd skip CmdTaskList = "list" // gitmap:cmd skip CmdTaskRun = "run" // gitmap:cmd skip CmdTaskShow = "show" // gitmap:cmd skip CmdTaskDelete = "delete" // gitmap:cmd skip )
gitmap:cmd top-level Task subcommands.
const ( TaskDefaultInterval = 5 TaskMinInterval = 2 TaskMaxGoroutines = 64 TaskCopyBufferSize = 32768 TasksFileName = "tasks.json" )
Task defaults.
const ( FlagTaskSrc = "src" FlagTaskDest = "dest" FlagTaskInterval = "interval" FlagTaskVerbose = "verbose" FlagTaskDryRun = "dry-run" )
Task flag names.
const ( FlagDescTaskSrc = "Source directory path" FlagDescTaskDest = "Destination directory path" FlagDescTaskInterval = "Sync interval in seconds (minimum 2)" FlagDescTaskVerbose = "Show detailed sync output" FlagDescTaskDryRun = "Preview sync actions without copying" )
Task flag descriptions.
const ( MsgTaskCreated = "Task '%s' created.\n" MsgTaskDeleted = "Task '%s' deleted.\n" MsgTaskRunning = "Task '%s' running — syncing every %ds (Ctrl+C to stop)\n" MsgTaskSynced = "Synced: %s\n" MsgTaskUpToDate = "All files up to date.\n" MsgTaskDrySync = "[dry-run] Would sync: %s\n" MsgTaskListHeader = "Tasks:\n" MsgTaskListRow = " %-20s %s → %s\n" MsgTaskListEmpty = "No tasks defined. Use 'gitmap task create' to add one.\n" MsgTaskShowFmt = "Name: %s\nSource: %s\nDest: %s\n" MsgTaskStopped = "\nTask '%s' stopped.\n" )
Task terminal messages.
const ( ErrTaskNameRequired = "Task name is required." ErrTaskSrcRequired = "Source directory (--src) is required." ErrTaskDestRequired = "Destination directory (--dest) is required." ErrTaskNotFound = "Task '%s' not found.\n" ErrTaskAlreadyExists = "Task '%s' already exists.\n" ErrTaskSrcNotExist = "Error: source directory does not exist at %s (operation: resolve, reason: file does not exist)\n" ErrTaskDestCreate = "Error: failed to create destination directory at %s: %v (operation: mkdir)\n" ErrTaskLoadFile = "Error: failed to load tasks file at %s: %v (operation: read)\n" ErrTaskSaveFile = "Error: failed to save tasks file at %s: %v (operation: write)\n" ErrTaskSyncFailed = "Sync failed for %s: %v\n" ErrTaskSubcommand = "Unknown task subcommand: %s\n" )
Task error messages.
const ( CmdTempRelease = "temp-release" CmdTempReleaseShort = "tr" SubCmdTRList = "list" SubCmdTRRemove = "remove" )
gitmap:cmd top-level Temp-release command names.
const ( SQLInsertTempRelease = `INSERT INTO TempRelease (Branch, VersionPrefix, SequenceNumber, CommitSha, CommitMessage) VALUES (?, ?, ?, ?, ?)` SQLSelectAllTempReleases = `` /* 139-byte string literal not displayed */ SQLSelectMaxSeqByPrefix = `SELECT COALESCE(MAX(SequenceNumber), 0) FROM TempRelease WHERE VersionPrefix = ?` SQLDeleteTempRelease = `DELETE FROM TempRelease WHERE Branch = ?` SQLDeleteAllTempReleases = `DELETE FROM TempRelease` SQLCountTempReleases = `SELECT COUNT(*) FROM TempRelease` )
SQL: temp-release operations (v15).
const ( SQLDropTempRelease = "DROP TABLE IF EXISTS TempRelease" SQLDropTempReleases = "DROP TABLE IF EXISTS TempReleases" // legacy )
SQL: drop TempRelease table (and legacy plural).
const ( FlagDescTRStart = "Starting sequence number (default: auto-increment)" FlagDescTRDryRun = "Preview branch names without creating" FlagDescTRJSON = "Output structured JSON" FlagDescTRVerbose = "Detailed logging" )
Temp-release flag descriptions.
const ( MsgTRCreating = " Creating %d temp-release branch(es)...\n" MsgTRCreated = " ✓ Created %s from %s\n" MsgTRPushing = " Pushing %d branch(es) to origin...\n" MsgTRPushed = " ✓ Pushed %d branch(es) to origin\n" MsgTRSeqStart = " → Starting sequence: %d\n" MsgTRSeqAuto = " → Starting sequence: %d (auto-detected)\n" MsgTRDryRunHeader = " Dry-run: would create %d temp-release branch(es):\n" MsgTRDryRunEntry = " %s %s %s\n" MsgTRListHeader = "\n Temp-release branches (%d):\n\n" MsgTRListRow = " %-35s %s %-50s %s\n" MsgTRListEmpty = " No temp-release branches found.\n" MsgTRRemovePrompt = " Remove %s? (y/N): " MsgTRRemoveRange = " Remove %d temp-release branch(es):\n" MsgTRRemoveAll = " Remove ALL %d temp-release branch(es):\n" MsgTRRemoveBranch = " %s\n" MsgTRRemoveConfirm = " Proceed? (y/N): " MsgTRRemoved = " ✓ Removed %d temp-release branch(es) (local + remote)\n" MsgTRRemovedOne = " ✓ Removed %s (local + remote)\n" MsgTRSkipExists = " ⚠ Branch already exists, skipping: %s\n" MsgTRSkipMissing = " ⚠ Branch not found, skipping: %s\n" MsgTRComplete = " Temp-release complete.\n" MsgTRNoneToRemove = " No temp-release branches to remove.\n" )
Temp-release messages.
const ( ErrTRUsage = "Usage: gitmap temp-release <count> <version-pattern> [-s N]" ErrTRInvalidCount = "count must be between 1 and %d" ErrTRNoPlaceholder = "version pattern must contain at least one '$' placeholder (e.g., v1.$$)" ErrTROverflow = "sequence %d exceeds %d-digit format (max %d)" ErrTRNotEnough = " ⚠ Only %d commit(s) available (requested %d)\n" ErrTRCreate = "failed to create temp-release: %v" ErrTRQuery = "failed to query temp-releases: %v" ErrTRDelete = "failed to delete temp-release: %v" ErrTRRemoveUsage = "Usage: gitmap tr remove <version> | <v1> to <v2> | all" )
Temp-release error messages.
const ( ColorReset = "\033[0m" ColorGreen = "\033[32m" ColorRed = "\033[31m" ColorYellow = "\033[33m" ColorCyan = "\033[36m" ColorWhite = "\033[97m" ColorDim = "\033[90m" )
ANSI color codes.
const ( StatusBannerTop = "╔══════════════════════════════════════╗" StatusBannerTitle = "║ gitmap status ║" StatusBannerBottom = "╚══════════════════════════════════════╝" StatusRepoCountFmt = "%d repos from .gitmap/output/gitmap.json" )
Status banner box-drawing.
const ( StatusIconClean = "✓ clean" StatusIconDirty = "● dirty" StatusDash = "—" StatusSyncDash = " —" StatusStashFmt = "📦 %d" StatusSyncUpFmt = "↑%d" StatusSyncDownFmt = "↓%d" StatusSyncBothFmt = "↑%d ↓%d" StatusStagedFmt = "+%d" StatusModifiedFmt = "~%d" StatusUntrackedFmt = "?%d" )
Status indicator strings.
const ( StatusRowFmt = " %-22s %s %s %s %s %s\n" StatusMissingFmt = " %s%-22s %s⊘ not found%s\n" StatusHeaderFmt = " %s%-22s %-12s %-8s %-10s %-8s %-6s%s\n" )
Status row format strings.
const ( SummaryJoinSep = " · " SummaryReposFmt = "%d repos" SummaryCleanFmt = "%d clean" SummaryDirtyFmt = "%d dirty" SummaryAheadFmt = "%d ahead" SummaryBehindFmt = "%d behind" SummaryStashedFmt = "%d stashed" SummaryMissingFmt = "%d missing" SummarySucceededFmt = "%d succeeded" SummaryFailedFmt = "%d failed" StatusFileCountSep = " " TruncateEllipsis = "…" )
Summary format strings.
const ( SetupBannerTop = "╔══════════════════════════════════════╗" SetupBannerTitle = "║ gitmap setup ║" SetupBannerBottom = "╚══════════════════════════════════════╝" SetupDryRunFmt = "[DRY RUN] No changes will be made" SetupAppliedFmt = "✓ %d settings applied" SetupSkippedFmt = "⊘ %d settings unchanged" SetupFailedFmt = "✗ %d settings failed" SetupErrorEntryFmt = "- %s" )
Setup banner box-drawing.
const ( ChangelogVersionFmt = "\n%s" ChangelogNoteFmt = " - %s" )
Changelog entry format strings (legacy — used by tests and any caller that still wants the bare layout). The pretty console renderer in gitmap/cmd/changelogprint.go ignores these.
const ( ChangelogPrettyRule = "" /* 210-byte string literal not displayed */ ChangelogPrettyHeaderFmt = " %s%s%s%s %s%s%s\n" // dim, version, reset, dim-bullet, white, title, reset ChangelogPrettyHeaderBare = " %s%s%s\n" // version only when no title parsed ChangelogPrettyBulletFmt = " %s%s%s %s\n" // indent, color marker, reset, text ChangelogPrettyBoldOpen = "\033[1m" ChangelogPrettyBoldClose = "\033[22m" ChangelogPrettyCodeOpen = "\033[36m" ChangelogPrettyCodeClose = "\033[39m" ChangelogPrettyMarkerL0 = "•" ChangelogPrettyMarkerL1 = "◦" ChangelogPrettyMarkerLN = "·" ChangelogPrettyIndentUnit = " " ChangelogPrettyWrapDefault = 100 ChangelogPrettyWrapMin = 60 ChangelogPrettyWrapMax = 140 ChangelogPrettyEnvColumns = "COLUMNS" )
Changelog pretty-print constants. Centralised here so future tweaks to colours, indent widths, or rule glyphs don't require code changes in the cmd package.
const ( ExecBannerTop = "╔══════════════════════════════════════╗" ExecBannerTitle = "║ gitmap exec ║" ExecBannerBottom = "╚══════════════════════════════════════╝" ExecCommandFmt = "Command: git %s" ExecRepoCountFmt = "%d repos from .gitmap/output/gitmap.json" ExecSuccessFmt = " %s✓ %-22s%s\n" ExecFailFmt = " %s✗ %-22s%s\n" ExecMissingFmt = " %s⊘ %-22s %snot found%s\n" ExecOutputLineFmt = " %s%s%s\n" ExecSummaryRule = "" /* 150-byte string literal not displayed */ )
Exec banner box-drawing.
const ( TermBannerTop = " ╔══════════════════════════════════════╗" TermBannerTitle = " ║ gitmap v%s ║" TermBannerBottom = " ╚══════════════════════════════════════╝" TermFoundFmt = " ✓ Found %d repositories" TermReposHeader = " ■ Repositories" TermTreeHeader = " ■ Folder Structure" TermCloneHeader = " ■ How to Clone on Another Machine" TermSeparator = "" /* 128-byte string literal not displayed */ TermTableRule = "" /* 210-byte string literal not displayed */ )
Terminal output sections.
const ( TermRepoIcon = " 📦 %s\n" TermPathLine = " Path: %s\n" TermCloneLine = " Clone: %s\n" )
Terminal repo entry formats.
const ( TermCloneStep1 = " 1. Copy the output files to the target machine:" TermCloneCmd1 = " .gitmap/output/gitmap.json (or .csv / .txt)" TermCloneStep2 = " 2. Clone via JSON (shorthand):" TermCloneCmd2 = " gitmap clone json --target-dir ./projects" TermCloneCmd2Alt = " gitmap c json # alias" TermCloneStep3 = " 3. Clone via CSV (shorthand):" TermCloneCmd3 = " gitmap clone csv --target-dir ./projects" TermCloneCmd3Alt = " gitmap c csv # alias" TermCloneStep3t = " 4. Clone via text (shorthand):" TermCloneCmd3t = " gitmap clone text --target-dir ./projects" TermCloneCmd3tAlt = " gitmap c text # alias" TermCloneStep3b = " 5. Or specify a file path directly:" TermCloneCmd3b = " gitmap clone .gitmap/output/gitmap.json --target-dir ./projects" TermCloneStep4 = " 6. Or run the PowerShell script directly:" TermCloneCmd4HTTPS = " .\\direct-clone.ps1 # HTTPS clone commands" TermCloneCmd4SSH = " .\\direct-clone-ssh.ps1 # SSH clone commands" TermCloneStep5 = " 7. Full clone script with progress & error handling:" TermCloneCmd5 = " .\\clone.ps1 -TargetDir .\\projects" TermCloneStep6 = " 8. Sync repos to GitHub Desktop:" TermCloneCmd6 = " gitmap desktop-sync # or: gitmap ds" TermCloneNote = " Note: safe-pull is auto-enabled when existing repos are detected." )
Terminal clone help text.
const ( StructureTitle = "# Folder Structure" StructureDescription = "Git repositories discovered by gitmap." StructureRepoFmt = "📦 **%s** (`%s`) — %s" TreeBranch = "├──" TreeCorner = "└──" TreePipe = "│ " TreeSpace = " " )
Folder structure Markdown.
const ( LBTermLatestFmt = " Latest branch: %s\n" LBTermRemoteFmt = " Remote: %s\n" LBTermSHAFmt = " SHA: %s\n" LBTermDateFmt = " Commit date: %s\n" LBTermSubjectFmt = " Subject: %s\n" LBTermRefFmt = " Ref: %s\n" LBTermTopHdrFmt = " Top %d most recently updated remote branches (%s):\n" LBTermRowFmt = " %-30s %-30s %-9s %s\n" )
Latest-branch terminal display format strings.
const ( CmdInteractive = "interactive" CmdInteractiveAlias = "i" )
gitmap:cmd top-level TUI command.
const ( FlagRefresh = "refresh" FlagDescRefresh = "Dashboard auto-refresh interval in seconds" )
TUI flag constants.
const ( HelpInteractive = " interactive (i) Launch interactive TUI with repo browser and batch actions" HelpInteractiveFlags = "Interactive Flags:" HelpRefresh = " --refresh <seconds> Dashboard auto-refresh interval (default: config or 30s)" )
TUI help text.
const ( TUIViewBrowser = "Repos" TUIViewActions = "Actions" TUIViewGroups = "Groups" TUIViewDashboard = "Status" TUIViewReleases = "Releases" TUIViewTempReleases = "Temp" TUIViewZipGroups = "Zip Groups" TUIViewAliases = "Aliases" TUIViewLogs = "Logs" )
TUI view labels.
const ( TUITitle = "gitmap interactive" TUISearchPrompt = "Search: " TUINoRepos = "No repositories found. Run 'gitmap scan' first." TUINoGroups = "No groups found. Press 'c' to create one." TUINoSelection = "No repos selected. Use Space to select." TUIConfirmDelete = "Delete group '%s'? (y/n)" TUIGroupCreated = "Group '%s' created" TUIGroupDeleted = "Group '%s' deleted" TUIActionPull = "Pulling %d repo(s)..." TUIActionExec = "Executing across %d repo(s)..." TUIActionStatus = "Checking status of %d repo(s)..." TUIActionComplete = "Action complete: %d success, %d failed" TUIRefreshing = "Refreshing..." TUIQuitHint = "q/esc: quit" TUITabHint = "tab: switch view" TUISelectHint = "space: select enter: detail /: search" TUIBatchHint = "p: pull x: exec s: status g: add to group" TUIGroupHint = "c: create d: delete enter: show members" TUIDashHint = "r: refresh" TUIZGHint = "enter: show items r: refresh c: create d: delete" TUIAliasHint = "r: refresh c: set alias d: remove" )
TUI status messages.
const ( TUIZGEmpty = "No zip groups defined. Use 'gitmap z create <name>' to create one." TUIZGRefreshed = "Zip groups refreshed." TUIZGCreateHint = "Use CLI: gitmap z create <name>" )
TUI zip group messages.
const ( TUIAliasEmpty = "No aliases defined. Use 'gitmap alias set <alias> <slug>' to create one." TUIAliasRefreshed = "Aliases refreshed." TUIAliasCreateHint = "Use CLI: gitmap alias set <alias> <slug>" TUIAliasDeleteHint = "Remove alias '%s'? Use CLI: gitmap alias remove %s" )
TUI alias messages.
const ( TUIColSlug = "Slug" TUIColBranch = "Branch" TUIColPath = "Path" TUIColType = "Type" TUIColStatus = "Status" TUIColAhead = "Ahead" TUIColBehind = "Behind" TUIColStash = "Stash" TUIColGroup = "Group" TUIColMembers = "Members" TUIColVersion = "Version" TUIColTag = "Tag" TUIColDraft = "Draft" TUIColLatest = "Latest" TUIColSource = "Source" TUIColDate = "Date" TUIColCommand = "Command" TUIColAlias = "Alias" TUIColArgs = "Args" TUIColDuration = "Duration" TUIColExit = "Exit" )
TUI column headers.
const ( TUILogEmpty = "No command history found. Run some gitmap commands first." TUILogHint = "enter: detail r: refresh /: filter" TUILogFilterActive = " Filter: %s (%d matches)" TUILogNoMatch = " No logs match the current filter." )
TUI log messages.
const ( TUIRelEmpty = "No releases found. Use 'gitmap release' to create one." TUIRelHint = "enter: detail r: refresh n: new release" )
TUI release messages.
const ( TUITREmpty = "No temp-release branches found. Use 'gitmap tr <count> <pattern>' to create." TUITRHint = "enter: detail g: group by prefix r: refresh" TUIColTRBranch = "Branch" TUIColTRPrefix = "Prefix" TUIColTRSeq = "Seq" TUIColTRCommit = "Commit" )
TUI temp-release messages.
const ( TUIRelTriggerTitle = " New Release" TUIRelTriggerCmd = "gitmap release %s" TUIRelTriggerBumpCmd = "gitmap release %s" TUIRelTriggerVerPrompt = " Version: " TUIRelTriggerTypeHint = " enter: confirm esc: back" TUIRelTriggerReady = " Release Command" TUIRelTriggerRunHint = " Run this command in your terminal. esc: back" )
TUI release trigger messages.
const ( ErrTUINoTerminal = "interactive mode requires a terminal — use standard commands instead" ErrTUIDBOpen = "failed to open database for interactive mode: %v" )
TUI errors.
const ( UpdateCopyFmtExe = "gitmap-update-%d.exe" UpdateCopyFmtUnix = "gitmap-update-%d" UpdateCopyGlob = "gitmap-update-*" UpdateScriptGlob = "gitmap-update-*.ps1" )
Update handoff file patterns.
const ( ReportErrorsJSON = "json" EnvReportErrorsFormat = "GITMAP_REPORT_ERRORS" EnvReportErrorsFile = "GITMAP_REPORT_ERRORS_FILE" ReportErrorsFilePrefix = "gitmap-update-report-" ReportErrorsFileSuffix = ".jsonl" )
Report-errors values and env-var bridge to run.ps1 / run.sh.
const ( MsgReportErrorsEnabled = " → Error report (json): %s\n" MsgReportErrorsSummary = " → Wrote %d non-fatal failure entr%s to %s\n" WarnReportErrorsCreate = " ⚠ Could not create report-errors file at %s: %v\n" ErrReportErrorsValue = " ✗ Unsupported --report-errors value: %q (supported: json)\n" )
Report-errors UI messages.
const ( EnvDebugRepoDetect = "GITMAP_DEBUG_REPO_DETECT" MsgDebugRepoDetectOn = " → Repo-detect debug enabled (will print marker checks)\n" )
Debug-repo-detect bridge.
const ( UpdaterBin = "gitmap-updater" MsgUpdaterFallback = " → No source repo found. Delegating to %s...\n\n" )
Updater fallback.
const ( MsgUpdateActive = " → Active: %s\n → Handoff: %s\n" MsgUpdateCleanStart = "\n Cleaning up update artifacts..." MsgUpdateCleanDone = " ✓ Removed %d file(s)\n\n" MsgUpdateCleanNone = " ✓ Nothing to clean up" MsgUpdateTempRemoved = " → Removed temp copy: %s\n" MsgUpdateOldRemoved = " → Removed backup: %s\n" UpdateRunnerLogStart = "update-runner starting, repo=%s" UpdateScriptLogExec = "executing update script: %s" UpdateScriptLogExit = "update script exited: err=%v" )
Update UI messages.
const ( ErrUpdateExecFind = "Error finding executable: %v\n" ErrUpdateCopyFail = "Error creating update copy: %v\n" ErrUpdateNoRunSH = " ✗ run.sh not found at %s — cannot update on this platform without it.\n" ErrUpdateCleanupExecPath = "Error: could not resolve executable path at active-binary: %v (operation: resolve executable, reason: os.Executable failed)\n" ErrUpdateCleanupConfigRead = "Error: could not read cleanup config at %s: %v (operation: read config, reason: cleanup path resolution unavailable)\n" ErrUpdateCleanupGlob = "Error: could not enumerate cleanup matches at %s: %v (operation: glob, reason: invalid cleanup pattern)\n" ErrUpdateCleanupRemove = "Error: could not remove cleanup artifact at %s: %v (operation: remove, reason: file may be locked or missing)\n" )
Update error messages.
const ( MsgUpdatePathMissing = "\n ⚠ The saved source repository path no longer exists on disk.\n" MsgUpdatePathPrompt = " Enter the new path to the gitmap source repo: " ErrUpdatePathInvalid = " ✗ Directory not found at %s (operation: resolve, reason: file does not exist)\n" )
Update path resolution messages.
const ( SourceRepoCloneURL = "https://github.com/alimtvnetwork/gitmap-v5.git" MsgUpdateCloning = "\n ■ Path does not exist. Cloning gitmap source into %s...\n" MsgUpdateCloneOK = " ✓ Cloned successfully.\n" ErrUpdateCloneFailed = " ✗ Clone failed: %v\n" )
Clone-on-missing-path constants.
const ( UpdatePSHeader = `` /* 1146-byte string literal not displayed */ // UpdatePSDeployDetect format args (in order): // %[1]s — repo path (e.g. C:\dev\gitmap-v5) // %[2]s — gitmap subdir (sourceRepoSubdir from manifest) // %[3]s — app subdir (appSubdir from manifest, e.g. gitmap-cli) // %[4]s — binary name (gitmap.exe) // %[5]s — known-subdir array (PowerShell @("a","b") literal of app + legacy) UpdatePSDeployDetect = `` /* 1046-byte string literal not displayed */ UpdatePSVersionBefore = `` /* 278-byte string literal not displayed */ UpdatePSRunUpdate = `` /* 198-byte string literal not displayed */ UpdatePSSync = `` /* 3694-byte string literal not displayed */ UpdatePSVersionAfter = `` /* 773-byte string literal not displayed */ UpdatePSVerify = `` /* 2542-byte string literal not displayed */ UpdatePSPostActions = `` /* 321-byte string literal not displayed */ )
Update PowerShell script template sections.
const ( RevertPSHeader = `# gitmap revert script (auto-generated) Set-Location "%s" ` RevertPSBuild = `` /* 191-byte string literal not displayed */ RevertPSPostActions = `` /* 411-byte string literal not displayed */ )
Revert PowerShell script template sections.
const ( ErrSetSourceRepoNoPath = " ✗ set-source-repo requires a path argument\n" ErrSetSourceRepoInvalid = " ✗ Invalid source repo path: %s\n" MsgSetSourceRepoDone = " ✓ Source repo path saved: %s\n" )
Set-source-repo messages.
const ( PSBin = "powershell" PSExecPolicy = "-ExecutionPolicy" PSBypass = "Bypass" PSNoProfile = "-NoProfile" PSNoLogo = "-NoLogo" PSFile = "-File" PSNonInteractive = "-NonInteractive" PSCommand = "-Command" )
PowerShell execution arguments.
const ( CmdHasChange = "has-change" CmdHasChangeAlias = "hc" )
New CLI commands.
const ( FlagHCMode = "mode" FlagHCAll = "all" FlagHCFetch = "fetch" FlagDescHCMode = "Dimension to check: dirty (default), ahead, or behind" FlagDescHCAll = "Print all three dimensions as structured output" FlagDescHCFetch = "Run 'git fetch' before checking ahead/behind (default true)" )
has-change flag names + descriptions.
const ( HCModeDirty = "dirty" HCModeAhead = "ahead" HCModeBehind = "behind" HCTrue = "true" HCFalse = "false" )
has-change mode values + literals.
const ( MsgHCAllFmt = "dirty=%s ahead=%s behind=%s\n" MsgHCAllNoUpstream = "dirty=%s ahead=n/a behind=n/a (no upstream)\n" ErrHCUsage = "Usage: gitmap has-change <repo> [--mode dirty|ahead|behind] [--all]" ErrHCBadMode = " ✗ Unknown mode %q. Use one of: dirty, ahead, behind.\n" WarnHCFetchFailed = " ⚠ git fetch failed in %s: %v (ahead/behind may be stale)\n" )
has-change messages + errors.
const ( MsgRRStartingFmt = " → Releasing %s at %s (version %s)...\n" MsgRRFetchingFmt = " 📡 Fetching remote refs in %s...\n" MsgRRRebasingFmt = " 🔁 Pull --rebase in %s...\n" MsgRRReturnedFmt = " ↩ Returned to %s\n" ErrRRFetchFailedFmt = " ✗ git fetch failed in %s: %v" ErrRRRebaseFailedFmt = " ✗ git pull --rebase failed in %s: %v\n Resolve the conflict, then re-run the release." )
Cross-dir release (`r <repo> <ver>`) messages + errors.
const ( MsgCNXStartingFmt = " → clone-next for %s at %s (version %s)...\n" MsgCNXReturnedFmt = " ↩ Returned to %s\n" )
Cross-dir clone-next (`cn <repo> <ver>`) messages.
const ( MsgSSHExistsOnDisk = "\n ℹ SSH key already exists on disk: %s\n Reusing existing key (no regeneration needed).\n\n" MsgSSHForceHint = "\n 💡 Pass --force to back up and regenerate this key.\n" MsgSSHBackedUp = " 💾 Backed up existing key: %s.bak.<timestamp>\n" ErrSSHBackup = " ✗ Could not back up existing SSH key: %v\n" )
SSH existing-key-on-disk fix messages.
const ( SQLAddCurrentVersionTag = "ALTER TABLE Repo ADD COLUMN CurrentVersionTag TEXT DEFAULT ''" SQLAddCurrentVersionNum = "ALTER TABLE Repo ADD COLUMN CurrentVersionNum INTEGER DEFAULT 0" )
SQL: add version columns to Repo (v15 table name).
const ( SQLInsertVersionHistory = `` /* 144-byte string literal not displayed */ SQLSelectVersionHistory = `` /* 190-byte string literal not displayed */ SQLUpdateRepoVersion = `UPDATE Repo SET CurrentVersionTag = ?, CurrentVersionNum = ?, UpdatedAt = CURRENT_TIMESTAMP WHERE RepoId = ?` SQLSelectRepoIDByPath = "SELECT RepoId FROM Repo WHERE AbsolutePath = ?" SQLDropRepoVersionHistory = "DROP TABLE IF EXISTS RepoVersionHistory" )
SQL: version history operations (v15: RepoVersionHistoryId PK).
const ( MsgFlattenRemoving = "Removing existing %s for fresh clone...\n" MsgFlattenCloning = "Cloning %s into %s (flattened)...\n" MsgFlattenDone = "✓ Cloned %s into %s\n" MsgFlattenVersionDB = "✓ Recorded version transition v%d -> v%d\n" )
Flatten messages.
const ( CmdVersionHistory = "version-history" CmdVersionHistoryAlias = "vh" )
gitmap:cmd top-level Version history CLI commands.
const ( MsgVersionHistoryEmpty = "No version history found for this repo.\n" MsgVersionHistoryHeader = "Version history for %s:\n\n" MsgVersionHistoryColumns = "FROM TO FOLDER TIMESTAMP" MsgVersionHistoryRowFmt = "%-11s %-11s %-25s %s\n" MsgVersionHistoryCount = "\n%d transition(s) recorded.\n" )
Version history terminal output.
const ( ErrVersionHistoryCwd = "Error: cannot determine current directory: %v\n" ErrVersionHistoryDB = "Error: failed to query version history: %v\n" )
Version history error messages.
const ( VSCodeExeBin = "Code.exe" VSCodeFlagUserDataDir = "--user-data-dir" VSCodeUserDataDirName = "gitmap-vscode-user-data" VSCodeEnvLocalAppData = "LOCALAPPDATA" VSCodeEnvProgramFiles = "ProgramFiles" VSCodeEnvProgramFilesX86 = "ProgramFiles(x86)" VSCodeProgramsDirName = "Programs" VSCodeInstallDirName = "Microsoft VS Code" )
VS Code executable discovery and isolation constants.
const ( VSCodeUserDataRootDirName = "Code" VSCodeUserDataMacRel = "Library/Application Support/Code" VSCodeUserDataLinuxFallback = ".config/Code" VSCodeEnvAppData = "APPDATA" VSCodeEnvUserProfile = "USERPROFILE" VSCodeEnvHome = "HOME" VSCodeEnvXDGConfigHome = "XDG_CONFIG_HOME" VSCodeUserProfileAppDataRel = "AppData/Roaming/Code" )
User-data root segments per OS.
const ( VSCodePMUserDir = "User" VSCodePMGlobalStorageDir = "globalStorage" VSCodePMExtensionDir = "alefragnani.project-manager" VSCodePMProjectsFile = "projects.json" VSCodePMProjectsTempSuffix = ".tmp" VSCodePMJSONIndent = "\t" )
Relative tail under the user-data root (constant across all OSes).
const ( VSCodePMDefaultEnabled = true VSCodePMDefaultProfile = "" )
Default field values gitmap writes when inserting a NEW projects.json entry. Existing entries' values are preserved across re-syncs.
const ( FlagNoVSCodeSync = "no-vscode-sync" FlagDescNoVSCodeSync = "skip syncing scanned repos into VS Code Project Manager projects.json" )
CLI flag for opting out of the automatic sync during scan.
const ( ErrVSCodePMUserDataNotFound = "vscode: user data directory not found at %q (is VS Code installed?)\n" ErrVSCodePMExtDirMissing = "" /* 133-byte string literal not displayed */ ErrVSCodePMReadFailed = "vscode: failed to read %s: %v\n" ErrVSCodePMParseFailed = "vscode: %s is not valid JSON: %v (left untouched)\n" ErrVSCodePMWriteTempFailed = "vscode: failed to write temp %s: %v\n" ErrVSCodePMRenameFailed = "vscode: failed to commit %s: %v\n" ErrVSCodePMNoUserDataEnv = "vscode: cannot determine user-data directory (no APPDATA / USERPROFILE / HOME env)\n" )
Error messages (Code Red zero-swallow policy).
const ( MsgVSCodePMSectionHeader = " → VS Code Project Manager: %s\n" MsgVSCodePMSyncSummary = " ✓ projects.json synced: %d added, %d updated, %d unchanged (%d total)\n" MsgVSCodePMSyncSkipped = " • VS Code Project Manager sync skipped (--no-vscode-sync)\n" MsgVSCodePMRenamed = " ✓ projects.json: renamed %q -> %q\n" MsgVSCodePMRenameNoMatch = " • projects.json: no entry matched %q (skipped rename)\n" // Diagnostic messages used by `gitmap vscode-pm-path` (v3.41.0+). MsgVSCodePMPathRootMissing = "vscode: user-data directory not found (is VS Code installed? checked APPDATA / HOME / XDG_CONFIG_HOME)" MsgVSCodePMPathExtMissing = "" /* 143-byte string literal not displayed */ )
User-facing messages.
const ( AutoTagGit = "git" AutoTagNode = "node" AutoTagGo = "go" AutoTagPython = "python" AutoTagRust = "rust" AutoTagDocker = "docker" )
Canonical tag identifiers — keep in sync with AutoTagMarkers / AutoTagOrder.
const ( FlagNoAutoTags = "no-auto-tags" FlagDescNoAutoTags = "skip auto-derived tags (git/node/go/...) when syncing VS Code Project Manager projects.json" )
CLI flag for opting out of auto-tag detection during sync.
const ( SQLUpsertVSCodeProject = `` /* 282-byte string literal not displayed */ SQLSelectAllVSCodeProjects = `` /* 156-byte string literal not displayed */ SQLSelectVSCodeProjectByPath = `` /* 152-byte string literal not displayed */ SQLSelectVSCodeProjectByName = `` /* 156-byte string literal not displayed */ SQLRenameVSCodeProject = `UPDATE VSCodeProject SET Name = ?, UpdatedAt = CURRENT_TIMESTAMP WHERE RootPath = ? COLLATE NOCASE` SQLUpdateVSCodeProjectPaths = `UPDATE VSCodeProject SET Paths = ?, UpdatedAt = CURRENT_TIMESTAMP WHERE RootPath = ? COLLATE NOCASE` SQLDeleteVSCodeProjectByPath = `DELETE FROM VSCodeProject WHERE RootPath = ? COLLATE NOCASE` )
const ( ErrVSCodePMUpsert = "failed to upsert VSCodeProject %q: %v" ErrVSCodePMList = "failed to list VSCodeProject rows: %v" ErrVSCodePMRename = "failed to rename VSCodeProject %q: %v" ErrVSCodePMDelete = "failed to delete VSCodeProject %q: %v" ErrVSCodePMUpdatePaths = "failed to update Paths for VSCodeProject %q: %v" ErrVSCodePMPathsEncode = "failed to encode Paths for VSCodeProject %q: %v" ErrVSCodePMPathsDecode = "failed to decode Paths for VSCodeProject %q: %v" ErrVSCodePMAliasNotFound = "no VS Code project registered with alias %q (register one first via `gitmap code %s`)" )
Error messages.
const ( MsgVSCodePMPathsAdded = " ✓ added extra path to %q: %s\n" MsgVSCodePMPathsRemoved = " ✓ removed extra path from %q: %s\n" MsgVSCodePMPathsExists = " • path already attached to %q: %s\n" MsgVSCodePMPathsMissing = " • path not attached to %q: %s\n" MsgVSCodePMPathsList = "%s (%s)\n rootPath: %s\n paths : %s\n" MsgVSCodePMPathsNone = " (no extra paths)\n" )
User-facing messages for the `code paths` subcommand.
const ( CmdWatch = "watch" CmdWatchAlias = "w" )
gitmap:cmd top-level Watch CLI commands.
const ( WatchDefaultInterval = 30 WatchMinInterval = 5 )
Watch defaults.
const ( WatchBannerTop = "╔══════════════════════════════════════╗" WatchBannerTitle = "║ gitmap watch ║" WatchBannerBottom = "╚══════════════════════════════════════╝" WatchRefreshFmt = "gitmap watch — refreshing every %ds (Ctrl+C to stop)" WatchLastUpdFmt = "Last updated: %s" WatchHeaderFmt = " %s%-22s %-10s %-16s %-6s %-8s %-6s%s\n" WatchRowFmt = " %-22s %s %-16s %-6s %-8s %s\n" WatchErrorRowFmt = " %s%-22s %serror%s\n" WatchSummaryFmt = "Repos: %d | Dirty: %d | Behind: %d | Stash: %d" WatchStoppedMsg = "\ngitmap watch stopped." )
Watch display messages.
const ( FlagDescWatchInterval = "Refresh interval in seconds (minimum 5)" FlagDescWatchNoFetch = "Skip git fetch; use local refs only" FlagDescWatchJSON = "Output single snapshot as JSON and exit" )
Watch flag descriptions.
const ( CmdZipGroup = "zip-group" CmdZipGroupShort = "z" SubCmdZGCreate = "create" SubCmdZGAdd = "add" SubCmdZGRemove = "remove" SubCmdZGList = "list" SubCmdZGShow = "show" SubCmdZGDelete = "delete" SubCmdZGRename = "rename" )
gitmap:cmd top-level Zip group command names.
const ( TableZipGroup = "ZipGroup" TableZipGroupItem = "ZipGroupItem" )
Zip group table names (v15: PascalCase singular + {Table}Id PK).
const ( LegacyTableZipGroups = "ZipGroups" LegacyTableZipGroupItems = "ZipGroupItems" )
Legacy plural names retained for migration detection.
const ( SQLMigrateZGIRepoPath = `ALTER TABLE ZipGroupItems ADD COLUMN RepoPath TEXT NOT NULL DEFAULT ''` SQLMigrateZGIRelativePath = `ALTER TABLE ZipGroupItems ADD COLUMN RelativePath TEXT NOT NULL DEFAULT ''` SQLMigrateZGIFullPath = `ALTER TABLE ZipGroupItems ADD COLUMN FullPath TEXT NOT NULL DEFAULT ''` SQLMigrateZGICopyPath = `UPDATE ZipGroupItems SET FullPath = Path WHERE FullPath = '' AND Path IS NOT NULL AND Path != ''` SQLMigrateZGIDropPath = `ALTER TABLE ZipGroupItems DROP COLUMN Path` )
SQL: legacy ALTERs for pre-v15 ZipGroupItems (still target legacy plural — run BEFORE v15 rebuild copies the table). Idempotent.
const ( SQLInsertZipGroup = `INSERT INTO ZipGroup (Name, ArchiveName) VALUES (?, ?)` SQLSelectAllZipGroups = `SELECT ZipGroupId, Name, ArchiveName, CreatedAt FROM ZipGroup ORDER BY Name` SQLSelectZipGroupByName = `SELECT ZipGroupId, Name, ArchiveName, CreatedAt FROM ZipGroup WHERE Name = ?` SQLDeleteZipGroup = `DELETE FROM ZipGroup WHERE Name = ?` SQLUpdateZipGroupArchive = `UPDATE ZipGroup SET ArchiveName = ? WHERE Name = ?` )
SQL: zip group operations (v15 singular tables + ZipGroupId PK).
const ( SQLInsertZipGroupItem = `INSERT OR IGNORE INTO ZipGroupItem (ZipGroupId, RepoPath, RelativePath, FullPath, IsFolder) VALUES (?, ?, ?, ?, ?)` SQLDeleteZipGroupItem = `DELETE FROM ZipGroupItem WHERE ZipGroupId = ? AND FullPath = ?` SQLSelectZipGroupItems = `SELECT ZipGroupId, RepoPath, RelativePath, FullPath, IsFolder FROM ZipGroupItem WHERE ZipGroupId = ? ORDER BY FullPath` SQLCountZipGroupItems = `SELECT COUNT(*) FROM ZipGroupItem WHERE ZipGroupId = ?` SQLSelectAllZipGroupsWithCount = `` /* 177-byte string literal not displayed */ )
SQL: zip group item operations.
const ( SQLDropZipGroup = "DROP TABLE IF EXISTS ZipGroup" SQLDropZipGroups = "DROP TABLE IF EXISTS ZipGroups" // legacy SQLDropZipGroupItem = "DROP TABLE IF EXISTS ZipGroupItem" SQLDropZipGroupItems = "DROP TABLE IF EXISTS ZipGroupItems" // legacy )
SQL: drop zip group tables (v15 + legacy plurals retained for Reset).
const ( FlagDescZGArchive = "Custom output archive filename" FlagDescZGZipGroup = "Include a persistent zip group as a release asset" FlagDescZGZipItem = "Add ad-hoc file or folder to zip as a release asset" FlagDescZGBundle = "Bundle all -Z items into a single named archive" )
Zip group flag descriptions.
const ( ZGJSONDir = ".gitmap" ZGJSONFile = "zip-groups.json" )
Zip group JSON persistence directory/file.
const ( MsgZGCreated = " ✓ Created zip group %q\n" MsgZGCreatedPath = " ✓ Created zip group %q with %s %s\n" MsgZGDeleted = " ✓ Deleted zip group %q\n" MsgZGItemAdded = " ✓ Added %s to %q (%s)\n" MsgZGItemRemoved = " ✓ Removed %s from %q\n" MsgZGArchiveSet = " ✓ Archive name set to %q for group %q\n" MsgZGListHeader = "\n Zip Groups (%d):\n\n" MsgZGListRow = " %-20s %3d item(s) %s\n" MsgZGShowHeader = "\n %s (%d item(s)):\n\n" MsgZGShowFile = " 📄 %s\n" MsgZGShowFolder = " 📁 %s\n" MsgZGShowArchive = " Archive: %s\n" MsgZGShowPaths = " repo: %s\n relative: %s\n full: %s\n" MsgZGCompressed = " ✓ Compressed %s → %s\n" MsgZGDryRunHeader = " [dry-run] Would create %d zip archive(s):\n" MsgZGDryRunEntry = " → %s (%d items: %s)\n" MsgZGSkipEmpty = " ⚠ Skipping empty group %q\n" MsgZGSkipMissing = " ⚠ Skipping missing item: %s\n" MsgZGProcessing = " Processing %d zip group(s)...\n" MsgZGNoArchives = " ⚠ No zip archives were produced from %d group(s)\n" ErrZGStagingDir = " ✗ Cannot create staging dir at %s: %v (operation: mkdir)\n" MsgZGTypeFolder = "folder" MsgZGTypeFile = "file" MsgZGJSONWritten = " ✓ Saved %s\n" MsgZGShowExpanded = " Contents (%d files):\n" MsgZGShowExpFile = " %s\n" )
Zip group messages.
const ( ErrZGNotFound = "no zip group found: %s" ErrZGEmpty = "zip group name cannot be empty" ErrZGCreate = "failed to create zip group: %v" ErrZGQuery = "failed to query zip groups: %v" ErrZGDelete = "failed to delete zip group: %v" ErrZGAddItem = "failed to add item to zip group: %v" ErrZGRemoveItem = "failed to remove item from zip group: %v" ErrZGCompress = " ✗ Failed to create archive for %s: %v (operation: write)\n" ErrZGGroupNotDB = "zip group %q not found in database" ErrZGPathResolve = "cannot resolve path %q: %v (operation: resolve)" ErrZGJSONWrite = "failed to write zip-groups.json at %s: %v (operation: write)" )
Zip group error messages.
const CDDefaultsFile = "cd-defaults.json"
CD file.
const CDFuncBash = `` /* 568-byte string literal not displayed */
CDFuncBash installs gitmap and gcd wrappers for Bash.
const CDFuncMarker = "# gitmap shell wrapper v2"
CD shell wrapper functions — installed by setup/completion.
const CDFuncPowerShell = `` /* 1102-byte string literal not displayed */
CDFuncPowerShell installs gitmap and gcd wrappers for PowerShell.
const CDFuncZsh = `` /* 582-byte string literal not displayed */
CDFuncZsh installs gitmap and gcd wrappers for Zsh.
const CmdSelfUninstallRunner = "self-uninstall-runner" // gitmap:cmd skip
Hidden runner subcommand for the self-uninstall handoff (lets the temp copy delete the original .exe on Windows where the running file is locked).
const CompListSSHKeys = "--list-ssh-keys"
SSH completion flag.
const (
DefaultCleanCodeURL = "https://raw.githubusercontent.com/alimtvnetwork/coding-guidelines-v15/main/install.ps1"
)
Clean-code / coding-guidelines installer. One-liner published at the URL below installs the alimtvnetwork coding-guidelines (v15) into the current directory via PowerShell IRM | IEX.
The four CLI aliases (clean-code, code-guide, cg, cc) all dispatch to the same flow — see gitmap/cmd/installcleancode.go.
const DefaultDashboardRefresh = 30
TUI defaults.
const DefaultExportFile = "gitmap-export.json"
Export default file name.
const (
DefaultLatestFile = "latest.json"
)
const (
DefaultSSHHost = "github.com"
)
SSH defaults.
const DirPermission = 0o755
File and directory permissions.
const (
DoctorLegacyDirsOK = "No legacy directories (.release/, gitmap-output/, .deployed/)"
)
Doctor legacy directory messages.
const ErrAmendListFailed = "error: failed to list amendments: %v\n"
Amend-list error messages.
const ErrDBVersionHistory = "failed to query version history: %v"
Version history error messages.
const (
ErrListVersionsNoTags = "Error: no version tags found. Create a release first."
)
List-versions error messages.
const (
ErrWatchNoRepos = "No repos to watch. Run 'gitmap scan' first."
)
Watch error messages.
const FilePermission = 0o644
const FlagAmendListBranch = "--branch"
Amend-list flag.
const FlagDebugRepoDetect = "--debug-repo-detect"
const FlagDescExportOut = "Output file path for the export"
Export flag descriptions.
const (
FlagDescHDPort = "Port to serve the dashboard on (default: 5173)"
)
Help-dashboard flag descriptions.
const (
FlagDescStatsCommand = "Show stats for a specific command only"
)
Stats flag descriptions.
const FlagRepoPath = "--repo-path"
const FlagReportErrors = "--report-errors"
const FlagReportErrorsFile = "--report-errors-file"
const FlagVerbose = "--verbose"
Update flags.
const GitBranchDashFormat = "%(refname:short)|%(objectname:short)|%(creatordate:iso-strict)"
Dashboard git branch format — pipe-delimited fields: refname short | objectname short | creator date ISO.
const GitLogDashFormat = "%H|%h|%an|%ae|%aI|%s|%P"
Dashboard git log format — pipe-delimited fields: full SHA | short SHA | author name | author email | ISO date | subject | parent hashes.
const GitMapDir = ".gitmap"
Root directory for all repo-local gitmap data.
const GitTagDashFormat = "%(refname:short)|%(objectname:short)|%(creatordate:iso-strict)"
Dashboard git tag format — pipe-delimited fields: refname short | objectname short | creator date ISO.
const GoModCommitMsgFmt = "" /* 131-byte string literal not displayed */
GoMod commit message format.
const GoModMergeMsgFmt = "merge: module rename to %s"
GoMod merge message format.
const (
HelpBookmark = " bookmark (bk) <sub> Save and replay command+flag combinations (save, list, run, delete)"
)
Bookmark help text.
const HelpCD = " cd (go) <name> Navigate to a tracked repo directory"
CD help text.
const (
HelpChangelogGen = " changelog-gen (cg) Auto-generate changelog from commits between tags (--from, --to, --write)"
)
Changelog generate help text.
const HelpCompletionLong = " completion (cmp) Generate or install shell tab-completion scripts"
Completion help text.
const HelpDashboard = " dashboard (db) Generate an interactive HTML dashboard for a repo"
Dashboard help text.
const HelpDiffProfiles = " diff-profiles (dp) Compare repos across two database profiles"
Diff-profiles help text.
const HelpEnv = " env (ev) <sub> Manage environment variables and PATH"
Env help text.
const HelpExport = " export (ex) [file] Export full database as portable JSON (default: gitmap-export.json)"
Export help text.
const HelpHasAnyUpdates = " has-any-updates (hau/hac) Check if remote has new commits"
Has-any-updates help text.
const HelpHelpDashboard = " help-dashboard (hd) Serve the docs site locally in your browser"
Help-dashboard help text.
const HelpImport = " import (im) [file] Import database from a gitmap-export.json file (--confirm required)"
Import help text.
const HelpProfile = " profile (pf) <sub> Manage database profiles (create, list, switch, delete, show)"
Profile help text.
const HelpPrune = " prune (pr) Delete stale release branches that have been tagged"
Prune help text.
const (
HelpStats = " stats (ss) Show aggregated command usage statistics (--json, --command)"
)
Stats help text.
const HelpTask = " task (tk) <sub> Manage file-sync watch tasks"
Task help text.
const (
HelpTempRelease = " temp-release (tr) <count> <pattern> [-s N] Create temp branches from recent commits"
)
Temp-release help text.
const HelpVersionHistory = " version-history (vh) Show version transitions for the current repo (--limit N, --json)"
Version history help text.
const HelpWatch = " watch (w) Live-refresh dashboard of repo status"
Watch help text.
const (
InstallLogDir = ".gitmap/logs"
)
Install log directory.
const JSONIndent = " "
JSON formatting.
const LegacyTableAliases = "Aliases"
Legacy plural retained for migration detection.
const LegacyTableAmendments = "Amendments"
Legacy plural retained for migration detection.
const LegacyTableBookmarks = "Bookmarks"
Legacy plural retained for migration detection.
const LegacyTableCommitTemplates = "CommitTemplates"
Legacy plural retained for migration detection.
const LegacyTableInstalledTools = "InstalledTools"
Legacy plural retained for migration detection.
const LegacyTableSSHKeys = "SSHKeys"
Legacy plural retained for migration detection.
const LegacyTableSettings = "Settings"
Legacy plural retained for migration detection.
const LegacyTableTempReleases = "TempReleases"
Legacy plural retained for migration detection.
const MsgHintHeader = "\nHints:\n"
Hint header.
const MsgHintRowFmt = " → %-35s %s\n"
Hint format.
const (
MsgLegacyProjectData = "Database contains legacy project data from a previous version.\n" +
"To fix, run one of:\n\n" +
" gitmap rescan Re-scan repos and rebuild project data\n" +
" gitmap db-reset --confirm Reset the entire database\n"
)
Legacy data recovery messages.
const (
MsgUpdateInstallDir = " → Installed directory: %s\n"
)
Unix update messages.
const MsgVersionFmt = "gitmap v%s\n"
Version display.
const OSDarwin = "darwin"
OS platform constants.
const OldBackupGlob = "*.old"
Backup file extension glob.
const SQLAddRepoScanFolderId = "ALTER TABLE Repo ADD COLUMN ScanFolderId INTEGER DEFAULT NULL"
SQL: ALTER Repo with nullable ScanFolderId FK. Idempotent via addColumnIfNotExists. SQLite cannot add a REFERENCES clause via ALTER without a table rebuild, so the column stores the FK value without a declared FOREIGN KEY constraint — application code enforces validity.
const SQLAddSourceColumn = "ALTER TABLE Release ADD COLUMN Source TEXT DEFAULT 'release'"
SQL: add Source column — v15: now targets singular Release table.
const SQLAddVSCodeProjectPathsColumn = `ALTER TABLE VSCodeProject ADD COLUMN Paths TEXT NOT NULL DEFAULT '[]'`
Idempotent additive migration — safe to re-run on legacy v18/v19 DBs that pre-date the Paths column. SQLite's ALTER TABLE ADD COLUMN errors when the column already exists, so callers must IGNORE that single error.
const SQLCountProjectsByTypeKey = `SELECT COUNT(*)
FROM DetectedProject dp
JOIN ProjectType pt ON dp.ProjectTypeId = pt.ProjectTypeId
WHERE pt.Key = ?`
SQL: count projects by type key.
const SQLCreateAbsPathIndex = "CREATE UNIQUE INDEX IF NOT EXISTS IdxRepo_AbsolutePath ON Repo(AbsolutePath)"
SQL: create unique index on AbsolutePath for upsert-by-path (v15: IdxRepo_AbsolutePath).
const SQLCreateAlias = `` /* 228-byte string literal not displayed */
SQL: create Alias table (v15: singular + AliasId PK). FK references Repo(RepoId).
const SQLCreateAmendment = `` /* 451-byte string literal not displayed */
SQL: create Amendment table (v15).
const SQLCreateBookmark = `` /* 248-byte string literal not displayed */
SQL: create Bookmark table (v15: singular + BookmarkId PK).
const SQLCreateCommandHistory = `` /* 499-byte string literal not displayed */
SQL: create CommandHistory table (v15: CommandHistoryId PK).
const SQLCreateCommitTemplate = `` /* 222-byte string literal not displayed */
SQL: create CommitTemplate table.
const SQLCreateCompletedTask = `` /* 437-byte string literal not displayed */
SQL: create CompletedTask table (v15: CompletedTaskId PK).
const SQLCreateCsharpKeyFile = `` /* 350-byte string literal not displayed */
SQL: create CsharpKeyFile table (v15: singular + CsharpKeyFileId PK).
const SQLCreateCsharpProjectFile = `` /* 518-byte string literal not displayed */
SQL: create CsharpProjectFile table (v15: singular + CsharpProjectFileId PK).
const SQLCreateCsharpProjectMeta = `` /* 395-byte string literal not displayed */
SQL: create CsharpProjectMetadata table (v15: CsharpProjectMetadataId PK + Csharp abbreviation per strict v15 PascalCase rule).
const SQLCreateDetectedProject = `` /* 520-byte string literal not displayed */
SQL: create DetectedProject table (v15: singular + DetectedProjectId PK). FK references v15 Repo(RepoId) and ProjectType(ProjectTypeId).
const SQLCreateGoProjectMetadata = `` /* 363-byte string literal not displayed */
SQL: create GoProjectMetadata table (v15: GoProjectMetadataId PK).
const SQLCreateGoRunnableFile = `` /* 339-byte string literal not displayed */
SQL: create GoRunnableFile table (v15: singular + GoRunnableFileId PK).
const SQLCreateGroup = `` /* 225-byte string literal not displayed */
SQL: create Group table (v15 singular). "Group" is a SQL reserved word so it MUST be double-quoted everywhere it appears in DDL/DML.
const SQLCreateGroupRepo = `` /* 213-byte string literal not displayed */
SQL: create GroupRepo join table (v15: singular). FKs reference v15 PKs.
const SQLCreateInstalledTool = `` /* 529-byte string literal not displayed */
SQL: create InstalledTool table (v15: singular + InstalledToolId PK).
const SQLCreatePendingTask = `` /* 454-byte string literal not displayed */
SQL: create PendingTask table (v15: PendingTaskId PK).
const SQLCreateProjectType = `` /* 190-byte string literal not displayed */
SQL: create ProjectType table (v15: singular + ProjectTypeId PK).
const SQLCreateRelease = `` /* 573-byte string literal not displayed */
SQL: create Release table (v17: + RepoId FK to Repo, composite UNIQUE(RepoId, Tag)). See spec/04-generic-cli/24-release-repo-relationship.md for the rationale.
const SQLCreateReleaseRepoIdIndex = "CREATE INDEX IF NOT EXISTS IdxRelease_RepoId ON Release(RepoId)"
SQL: index on Release.RepoId for fast per-repo filtering (future multi-repo mode).
const SQLCreateRepo = `` /* 486-byte string literal not displayed */
SQL: create Repo table (v15: singular + RepoId PK).
const SQLCreateRepoVersionHistory = `` /* 434-byte string literal not displayed */
SQL: create RepoVersionHistory table (v15: RepoVersionHistoryId PK). FK references v15 Repo(RepoId).
const SQLCreateScanFolder = `` /* 278-byte string literal not displayed */
SQL: create ScanFolder table.
const SQLCreateScanFolderPathIndex = "CREATE UNIQUE INDEX IF NOT EXISTS IdxScanFolder_AbsolutePath ON ScanFolder(AbsolutePath)"
SQL: unique index on AbsolutePath so EnsureScanFolder is idempotent.
const SQLCreateSetting = `CREATE TABLE IF NOT EXISTS Setting (
Key TEXT PRIMARY KEY,
Value TEXT NOT NULL
)`
SQL: create Setting table (v15).
const SQLCreateSshKey = `` /* 278-byte string literal not displayed */
SQL: create SshKey table (v15).
const SQLCreateTaskType = `CREATE TABLE IF NOT EXISTS TaskType (
TaskTypeId INTEGER PRIMARY KEY AUTOINCREMENT,
Name TEXT NOT NULL UNIQUE
)`
SQL: create TaskType table (v15: TaskTypeId PK).
const SQLCreateTempRelease = `` /* 357-byte string literal not displayed */
SQL: create TempRelease table (v15).
const SQLCreateVSCodeProject = `` /* 439-byte string literal not displayed */
const SQLCreateVSCodeProjectRootPathIndex = `CREATE UNIQUE INDEX IF NOT EXISTS UX_VSCodeProject_RootPath ON VSCodeProject(RootPath COLLATE NOCASE)`
COLLATE NOCASE so Windows path matching is case-insensitive while staying byte-exact on Unix when the user happens to use the same case.
const SQLCreateVersionProbe = `` /* 394-byte string literal not displayed */
SQL: create VersionProbe table (populated starting Phase 2.3).
const SQLCreateVersionProbeRepoIndex = "CREATE INDEX IF NOT EXISTS IdxVersionProbe_RepoId ON VersionProbe(RepoId, ProbedAt DESC)"
SQL: index for fast latest-probe lookups per repo.
const SQLCreateZipGroup = `` /* 196-byte string literal not displayed */
SQL: create ZipGroup table (v15: singular + ZipGroupId PK).
const SQLCreateZipGroupItem = `` /* 314-byte string literal not displayed */
SQL: create ZipGroupItem table (v15 singular). Composite PK retained.
const SQLDropLegacyAbsPathIndex = "DROP INDEX IF EXISTS idx_Repos_AbsolutePath"
SQL: drop the legacy index name from pre-v15 installs.
const SQLDropVSCodeProject = "DROP TABLE IF EXISTS VSCodeProject"
const SQLEnableFK = "PRAGMA foreign_keys = ON"
SQL: enable foreign keys.
const SQLImportInsertBookmark = `INSERT OR IGNORE INTO Bookmark (Name, Command, Args, Flags) VALUES (?, ?, ?, ?)`
SQL: import-side bookmark insert.
const SQLImportInsertGroup = `INSERT OR IGNORE INTO "Group" (Name, Description, Color) VALUES (?, ?, ?)`
SQL: import-side group insert (used by store/import.go to insert without conflict).
const SQLInsertVersionProbe = `INSERT INTO VersionProbe
(RepoId, NextVersionTag, NextVersionNum, Method, IsAvailable, Error)
VALUES (?, ?, ?, ?, ?, ?)`
SQL: insert a new probe row.
const SQLMigrateTRCommitSha = `ALTER TABLE TempReleases RENAME COLUMN "Commit" TO CommitSha`
SQL: migrate Commit → CommitSha column. Operates on legacy TempReleases — the v15 rebuild copies the already-renamed column into TempRelease.
const SQLSeedProjectTypes = `` /* 299-byte string literal not displayed */
SQL: seed project types.
const SQLSeedTaskTypes = `INSERT OR IGNORE INTO TaskType (Name)
VALUES ('Delete'), ('Remove'), ('Scan'), ('Clone'), ('Pull'), ('Exec')`
SQL: seed TaskType values.
const SQLSelectCsharpKeyFiles = `` /* 145-byte string literal not displayed */
SQL: query C# key files.
const SQLSelectCsharpMetadata = `` /* 152-byte string literal not displayed */
SQL: query C# metadata.
const SQLSelectCsharpProjectFiles = `` /* 200-byte string literal not displayed */
SQL: query C# project files.
const SQLSelectDetectedProjectID = `SELECT DetectedProjectId
FROM DetectedProject
WHERE RepoId = ? AND ProjectTypeId = ? AND RelativePath = ?`
SQL: query detected project ID by identity tuple.
const SQLSelectFindNext = `` /* 415-byte string literal not displayed */
SQL: every repo whose latest VersionProbe row has IsAvailable=1. Sort by NextVersionNum DESC so the freshest tags float to the top.
const SQLSelectFindNextByScanFolder = `` /* 440-byte string literal not displayed */
SQL: same as above, scoped to a specific ScanFolderId.
const SQLSelectGoMetadata = `` /* 143-byte string literal not displayed */
SQL: query Go metadata.
const SQLSelectGoRunnables = `` /* 143-byte string literal not displayed */
SQL: query Go runnables.
const SQLSelectLatestVersionProbe = `` /* 190-byte string literal not displayed */
SQL: latest probe per repo.
const SQLSelectProjectsByTypeKey = `` /* 337-byte string literal not displayed */
SQL: query projects by type key (v15: JOIN Repo on RepoId, ProjectType on ProjectTypeId).
const SQLSelectTaskTypeByName = `SELECT TaskTypeId FROM TaskType WHERE Name = ?`
SQL: task type lookup (v15: TaskTypeId PK).
const SQLTagReposByScanFolderTpl = `UPDATE Repo SET ScanFolderId = ? WHERE AbsolutePath IN (%s)`
SQL: bulk-tag every repo whose AbsolutePath was just scanned with the active ScanFolderId. Path list is interpolated as `?,?,?,...` because SQLite has no array binding.
const SQLUpsertCsharpKeyFile = `` /* 218-byte string literal not displayed */
SQL: upsert C# key file.
const SQLUpsertCsharpMetadata = `` /* 301-byte string literal not displayed */
SQL: upsert C# metadata.
const SQLUpsertCsharpProjectFile = `` /* 415-byte string literal not displayed */
SQL: upsert C# project file.
const SQLUpsertDetectedProject = `` /* 396-byte string literal not displayed */
SQL: upsert detected project.
const SQLUpsertGoMetadata = `` /* 294-byte string literal not displayed */
SQL: upsert Go metadata.
const SQLUpsertGoRunnable = `` /* 223-byte string literal not displayed */
SQL: upsert Go runnable file.
const SQLUpsertRepoByPath = `` /* 449-byte string literal not displayed */
SQL: upsert by AbsolutePath (spec requirement).
const SSHConfigHostEntry = `Host %s
HostName %s
User git
IdentityFile %s
IdentitiesOnly yes
`
SSH config host template.
const SchemaVersionCurrent = 20
SchemaVersionCurrent is the target schema version produced by the current build of Migrate(). Bump this integer whenever a NEW migration step is added to gitmap/store/store.go:Migrate (a new v15 phase, a new ALTER, a new seed table, etc.).
Migrate() short-circuits when Setting[schema_version] == this value, so every gitmap subcommand that calls openDB() pays only a single SELECT against Setting instead of re-running the full v15 phase pipeline.
Bump policy:
- Bump on ANY structural change to Migrate() — new CREATE TABLE, new ALTER TABLE, new v15 phase, new seed call, new ID rename.
- Do NOT bump for cosmetic changes (comments, log strings, code moves that produce identical SQL).
- The marker is cleared by `gitmap db-reset` and by migrateLegacyIDs() when it detects pre-integer-PK rows, so legacy databases will always re-run the full pipeline regardless of this number.
const TableAlias = "Alias"
Alias table name (v15: singular).
const TableAmendment = "Amendment"
Amendment table (v15: singular + AmendmentId PK).
const TableBookmark = "Bookmark"
Bookmark table name (v15: singular).
const TableCommandHistory = "CommandHistory"
History table name (v15: singular preserved; PK Id → CommandHistoryId).
const TableCommitTemplate = "CommitTemplate"
CommitTemplate table (v15: singular + CommitTemplateId PK).
const TableRepoVersionHistory = "RepoVersionHistory"
Table name for version history (v15: singular preserved; PK renamed).
const TableSetting = "Setting"
Settings table (v15: Setting singular). The PK is Key (TEXT) so no {Table}Id rename is needed.
const TableSshKey = "SshKey"
SshKey table (v15: singular + SshKeyId PK; abbreviation per v15: Ssh, not SSH).
const TableTempRelease = "TempRelease"
TempRelease table (v15: singular + TempReleaseId PK).
const TableVSCodeProject = "VSCodeProject"
const TasksFilePath = GitMapDir + "/" + TasksFileName
Task file path within .gitmap.
const TempReleaseBranchPrefix = "temp-release/"
Temp-release branch prefix.
const TempReleaseMaxCount = 50
Temp-release limits.
const TempReleasePlaceholder = "$$"
Temp-release placeholder.
const UsageHeaderFmt = "gitmap v%s\n\n"
Usage header.
const VerboseLogFileFmt = "gitmap-verbose-%s.log"
Verbose log file.
const Version = "3.43.2"
Version.
const (
WatchClearScreen = "\033[2J\033[H"
)
Watch ANSI control.
Variables ¶
var ( // GitMapSubdir is the SOURCE-REPO subdirectory name (<RepoRoot>/gitmap/...). GitMapSubdir string // GitMapCliSubdir is the DEPLOY-TARGET subdirectory name // (<DeployRoot>/gitmap-cli/gitmap.exe). Renamed from "gitmap" in v3.6.0. // Sourced from deploy-manifest.json — never hardcode this string. GitMapCliSubdir string // LegacyAppSubdirs lists deploy-folder names from prior schema versions. // Migration code uses this to detect and rename old layouts. LegacyAppSubdirs []string )
GitMapSubdir, GitMapCliSubdir are populated from Manifest at init(). They remain `var` (not `const`) so the manifest is the only edit point.
var AutoTagMarkers = map[string]string{ ".git": AutoTagGit, "package.json": AutoTagNode, "go.mod": AutoTagGo, "pyproject.toml": AutoTagPython, "requirements.txt": AutoTagPython, "Cargo.toml": AutoTagRust, "Dockerfile": AutoTagDocker, "compose.yaml": AutoTagDocker, "compose.yml": AutoTagDocker, "docker-compose.yml": AutoTagDocker, }
AutoTagMarkers maps a top-level filesystem entry name to the tag it implies. Both files and directories qualify (.git can be either).
var AutoTagOrder = []string{ AutoTagGit, AutoTagNode, AutoTagGo, AutoTagPython, AutoTagRust, AutoTagDocker, }
AutoTagOrder is the canonical emission order. Tags not listed here are dropped (the detector never invents tags outside this list).
var CsharpKeyFilePatterns = []string{
"global.json",
"nuget.config",
"Directory.Build.props",
"Directory.Build.targets",
"launchSettings.json",
"appsettings.json",
}
C# key file patterns.
var DefaultReleaseDir = GitMapDir + "/" + ReleaseDirName
DefaultReleaseDir is a var so tests can override it.
var GitStderrNoisePatterns = []string{
"LF will be replaced by CRLF the next time Git touches it",
}
GitStderrNoisePatterns lists substrings whose presence in a git stderr line marks the line as harmless cosmetic chatter that the release pipeline should suppress. Add ONLY substrings that are guaranteed to not appear in a real error — these lines are silently dropped.
var GoModExcludeDirs = []string{".git", "vendor", "node_modules"}
GoMod excluded directories during file walk.
var HelpGroupKeys = []string{
"scanning",
"cloning",
"gitops",
"navigation",
"release",
"release-info",
"data",
"history",
"amend",
"project",
"ssh",
"zip",
"environment",
"tasks",
"visualization",
"utilities",
}
HelpGroupKeys returns short keywords for tab-completion of group filtering.
var InstallToolCategories = map[string][]string{ ToolCategoryCore: { ToolVSCode, ToolNodeJS, ToolYarn, ToolBun, ToolPnpm, ToolPython, ToolGo, ToolGit, ToolGitLFS, ToolGHCLI, ToolGitHubDesktop, ToolCPP, ToolPHP, ToolPowerShell, ToolChocolatey, ToolWinget, ToolDbeaver, ToolOBS, ToolStickyNotes, ToolVSCodeCtx, ToolPwshCtx, ToolNpp, ToolNppSettings, ToolNppInstall, ToolVSCodeSync, ToolOBSSync, ToolWTSync, ToolScripts, ToolAllDevTools, }, ToolCategoryDatabase: { ToolMySQL, ToolMariaDB, ToolPostgreSQL, ToolSQLite, ToolMongoDB, ToolCouchDB, ToolRedis, ToolCassandra, ToolNeo4j, ToolElasticsearch, ToolDuckDB, ToolLiteDB, }, }
InstallToolCategories groups tools by category for display.
var InstallToolDescriptions = map[string]string{ ToolVSCode: "Visual Studio Code editor", ToolNodeJS: "Node.js JavaScript runtime", ToolYarn: "Yarn package manager", ToolBun: "Bun JavaScript runtime", ToolPnpm: "pnpm package manager", ToolPython: "Python programming language", ToolGo: "Go programming language", ToolGit: "Git version control", ToolGitLFS: "Git Large File Storage", ToolGHCLI: "GitHub CLI", ToolGitHubDesktop: "GitHub Desktop application", ToolCPP: "C++ compiler (MinGW/g++)", ToolPHP: "PHP programming language", ToolPowerShell: "PowerShell shell", ToolChocolatey: "Chocolatey package manager", ToolWinget: "Winget package manager", ToolMySQL: "MySQL relational database", ToolMariaDB: "MariaDB (MySQL-compatible fork)", ToolPostgreSQL: "PostgreSQL relational database", ToolSQLite: "SQLite embedded database", ToolMongoDB: "MongoDB document database", ToolCouchDB: "CouchDB document database (REST API)", ToolRedis: "Redis in-memory key-value store", ToolCassandra: "Apache Cassandra wide-column NoSQL", ToolNeo4j: "Neo4j graph database", ToolElasticsearch: "Elasticsearch search and analytics", ToolDuckDB: "DuckDB analytical columnar database", ToolDbeaver: "DBeaver database management tool", ToolStickyNotes: "Microsoft Sticky Notes", ToolLiteDB: "LiteDB embedded NoSQL database for .NET", ToolOBS: "OBS Studio screen recorder and streamer", ToolVSCodeCtx: "Add VS Code to Windows right-click context menu", ToolPwshCtx: "Add PowerShell to Windows right-click context menu", ToolAllDevTools: "Install all core developer tools at once", ToolNpp: "NPP + Settings -- Notepad++ with settings", ToolNppSettings: "NPP Settings -- Notepad++ settings sync only", ToolNppInstall: "Install NPP -- Notepad++ install only (no settings)", ToolVSCodeSync: "VS Code Settings -- sync VS Code settings and extensions", ToolOBSSync: "OBS Settings -- sync OBS Studio profiles and scenes", ToolWTSync: "WT Settings -- sync Windows Terminal settings.json", ToolScripts: "Clone gitmap scripts to local folder", }
Tool display names for --list output.
var LatestBranchCSVHeaders = []string{
"branch", "remote", "sha", "commitDate", "subject", "ref",
}
var LatestBranchTableColumns = []string{
"DATE", "BRANCH", "SHA", "SUBJECT",
}
Latest-branch terminal table header columns.
var ProjectExcludeDirs = []string{
"node_modules",
"vendor",
".git",
"dist",
"build",
"target",
"bin",
"obj",
"out",
"testdata",
"packages",
".venv",
".cache",
}
Project detection exclusion directories.
var ReactIndicatorDeps = []string{
"react",
"@types/react",
"react-scripts",
"next",
"gatsby",
"remix",
"@remix-run/react",
}
React indicator dependencies.
var RepoPath = ""
RepoPath is set at build time via -ldflags.
var ScanCSVHeaders = []string{
"repoName", "httpsUrl", "sshUrl", "branch",
"relativePath", "absolutePath", "cloneInstruction", "notes",
}
CSV headers.
var StatusTableColumns = []string{
"REPO", "STATUS", "SYNC", "BRANCH", "STASH", "FILES",
}
Status table column headers.
var WatchTableColumns = []string{
"REPO", "STATUS", "BRANCH", "AHEAD", "BEHIND", "STASH",
}
Watch table column headers.
Functions ¶
This section is empty.
Types ¶
type DeployManifest ¶
type DeployManifest struct {
SchemaVersion int `json:"schemaVersion"`
AppSubdir string `json:"appSubdir"`
LegacyAppSubdirs []string `json:"legacyAppSubdirs"`
BinaryName struct {
Windows string `json:"windows"`
Unix string `json:"unix"`
} `json:"binaryName"`
SourceRepoSubdir string `json:"sourceRepoSubdir"`
}
DeployManifest mirrors the on-disk JSON layout. Keep field names in sync with gitmap/constants/deploy-manifest.json.
var Manifest DeployManifest
Manifest is the parsed deploy manifest, loaded once at package init.
Source Files
¶
- constants.go
- constants_alias.go
- constants_amend.go
- constants_as.go
- constants_assets.go
- constants_autocommit.go
- constants_bookmark.go
- constants_cd.go
- constants_changelog.go
- constants_cleancode.go
- constants_cli.go
- constants_clone.go
- constants_clonenext.go
- constants_completion.go
- constants_compress.go
- constants_dashboard.go
- constants_dbmigrate.go
- constants_diff.go
- constants_diffprofile.go
- constants_doctor.go
- constants_env.go
- constants_export.go
- constants_find_next.go
- constants_git.go
- constants_globalflags.go
- constants_gomod.go
- constants_hau.go
- constants_helpdashboard.go
- constants_helpgroups.go
- constants_helpsections.go
- constants_hints.go
- constants_history.go
- constants_import.go
- constants_install.go
- constants_installedtools.go
- constants_llmdocs.go
- constants_lockcheck.go
- constants_messages.go
- constants_movemerge.go
- constants_multigroup.go
- constants_pathsnippet.go
- constants_pending_task.go
- constants_pending_task_msg.go
- constants_pending_task_sql.go
- constants_probe.go
- constants_profile.go
- constants_project.go
- constants_project_sql.go
- constants_prune.go
- constants_pull.go
- constants_release.go
- constants_releasealias.go
- constants_scan_folder.go
- constants_selfinstall.go
- constants_seo.go
- constants_settings.go
- constants_ssh.go
- constants_stats.go
- constants_store.go
- constants_task.go
- constants_temprelease.go
- constants_terminal.go
- constants_tui.go
- constants_update.go
- constants_v331.go
- constants_version_history.go
- constants_version_history_cmd.go
- constants_vscode.go
- constants_vscode_pm.go
- constants_vscode_pm_autotags.go
- constants_vscode_pm_sql.go
- constants_watch.go
- constants_zipgroup.go
- deploy_manifest.go