git-project-manager/cmd/util/util_constants.go

87 lines
2.9 KiB
Go
Raw Normal View History

2024-12-30 19:54:32 +00:00
package util
2023-12-08 21:52:26 +00:00
2024-10-01 18:29:14 +00:00
const (
// Cobra Flags
FlagRemote = "remote"
FlagConfig = "config"
FlagPath = "projectPath"
FlagLogLevel = "logLevel"
FlagProjectID = "projectID"
FlagCacheForce = "force"
FlagOwnerOnly = "ownerOnly"
FlagAll = "all"
FlagCurrent = "current"
FlagPrompt = "prompt"
FlagWrite = "write"
FlagSensitive = "sensitive"
2024-12-19 19:51:26 +00:00
FlagDocsPath = "docsPath"
2024-10-01 18:29:14 +00:00
// Viper config bindings
ViperAliasAddPID = "alias.add.projectID"
ViperCacheUnlockForce = "cache.unlock.force"
ViperCacheLoadOwnerOnly = "cache.load.ownerOnly"
ViperProjectListAll = "project.list.all"
ViperProjectShowCurrent = "project.show.current"
)
2023-12-08 21:52:26 +00:00
const (
2024-12-30 19:54:32 +00:00
DefGitlabHost = "https://gitlab.com"
DefLogLevel = "info"
DefConfigPath = "~/.config/git-project-manager.yaml"
ConfigName = "git-project-manager"
LegacyConfigName = "gitlab-project-manager"
2023-12-08 21:52:26 +00:00
)
2024-12-30 19:54:32 +00:00
const AliasCmdLong = `Manages project aliases, with options for
2023-12-08 21:52:26 +00:00
listing, adding, and deleting.`
2024-12-30 19:54:32 +00:00
const AliasListCmdLong = `Lists all aliases by project`
2023-12-09 04:13:17 +00:00
2024-12-30 19:54:32 +00:00
const AliasAddCmdLong = `Adds a project alias to a project
2023-12-08 21:52:26 +00:00
project ID can be provided, or will otherwise use fuzzy find`
2024-12-30 19:54:32 +00:00
const AliasDeleteCmdLong = `Deletes aliases from projects
2023-12-08 22:06:09 +00:00
project ID can be provided, or will otherwise use fuzzy find`
2024-12-30 19:54:32 +00:00
const CacheCmdLong = `Contains sub-commands for managing project cache.
2024-12-27 22:42:44 +00:00
The project cache keeps this speedy, without smashing against the Git
2023-12-08 21:52:26 +00:00
API every time a new project is added / searched for`
2024-12-30 19:54:32 +00:00
const RootCmdLong = `Finds Git projects using fuzzy-find, remembering
2023-12-08 21:52:26 +00:00
your chosen term for the project as an alias, and offers helpful
shortcuts for moving around in projects and opening your code`
2024-12-30 19:54:32 +00:00
const ProjCmdLong = `Switches to a Git project by name or alias
2023-12-08 21:52:26 +00:00
If not found, will enter fzf mode. If not cloned, will clone
the project locally.`
2024-12-30 19:54:32 +00:00
const ProjGoCmdLong = `Go to a project, searching by alias
2023-12-09 04:13:17 +00:00
If project is not already cloned, its path will be built and it
will be cloned from source control.
If conf.projects.alwaysPull, a git pull will be ran automatically`
2024-12-30 19:54:32 +00:00
const ProjRunCmdLong = `Runs the current project. Tries to detect
the language and runs accordingly (e.g. go run .)`
2024-12-30 19:54:32 +00:00
const ProjListCmdLong = `List locally cloned projects. Optionally
2023-12-10 04:19:19 +00:00
lists all projects in project cache`
2024-12-30 19:54:32 +00:00
const ProjAddCmdLong = `Adds a new project to the local project path
2023-12-10 04:19:19 +00:00
uses fuzzy find to locate the project`
2024-12-30 19:54:32 +00:00
const ProjShowCmdLong = `Shows detail for a particular project
2023-12-08 21:52:26 +00:00
Will always fuzzy find`
2023-12-10 15:10:46 +00:00
2024-12-30 19:54:32 +00:00
const ProjOpenCmdLong = `Opens the given project directory in the editor
2023-12-12 21:30:33 +00:00
of your choice. Will find certain well-known entrypoints (e.g. main.go).
If your editor is set in your config file, it will be used, otherwise
one will be found in your path from a list of known defaults.`
2024-12-30 19:54:32 +00:00
const ConfigCmdLong = `Commands for managing configuration, particulary
2023-12-10 15:10:46 +00:00
useful for seeding a new config file`
2024-12-30 19:54:32 +00:00
const ConfigGenCmdLong = `Produces yaml to stdout that can be used
2023-12-10 15:10:46 +00:00
to seed the configuration file`