git-project-manager/cmd/util_constants.go

87 lines
2.9 KiB
Go
Raw Permalink Normal View History

2023-12-08 21:52:26 +00:00
package cmd
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-27 22:42:44 +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
)
const aliasCmdLong = `Manages project aliases, with options for
listing, adding, and deleting.`
2023-12-09 04:13:17 +00:00
const aliasListCmdLong = `Lists all aliases by project`
2023-12-08 21:52:26 +00:00
const aliasAddCmdLong = `Adds a project alias to a project
project ID can be provided, or will otherwise use fuzzy find`
2023-12-08 22:06:09 +00:00
const aliasDeleteCmdLong = `Deletes aliases from projects
project ID can be provided, or will otherwise use fuzzy find`
2023-12-08 21:52:26 +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-27 22:42:44 +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-27 22:42:44 +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.`
2023-12-09 04:13:17 +00:00
const projGoCmdLong = `Go to a project, searching by alias
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`
const projRunCmdLong = `Runs the current project. Tries to detect
the language and runs accordingly (e.g. go run .)`
2023-12-10 04:19:19 +00:00
const projListCmdLong = `List locally cloned projects. Optionally
lists all projects in project cache`
const projAddCmdLong = `Adds a new project to the local project path
uses fuzzy find to locate the project`
2023-12-08 21:52:26 +00:00
const projShowCmdLong = `Shows detail for a particular project
Will always fuzzy find`
2023-12-10 15:10:46 +00:00
2023-12-12 21:30:33 +00:00
const projOpenCmdLong = `Opens the given project directory in the editor
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.`
2023-12-10 15:10:46 +00:00
const configCmdLong = `Commands for managing configuration, particulary
useful for seeding a new config file`
const configGenCmdLong = `Produces yaml to stdout that can be used
to seed the configuration file`