git-project-manager/cmd/util_constants.go

84 lines
2.8 KiB
Go

package cmd
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"
// Viper config bindings
ViperAliasAddPID = "alias.add.projectID"
ViperCacheUnlockForce = "cache.unlock.force"
ViperCacheLoadOwnerOnly = "cache.load.ownerOnly"
ViperProjectListAll = "project.list.all"
ViperProjectShowCurrent = "project.show.current"
)
const (
defGitlabHost = "https://gitlab.com"
defLogLevel = "info"
defConfigPath = "~/.config/gitlab-project-manager.yaml"
)
const aliasCmdLong = `Manages project aliases, with options for
listing, adding, and deleting.`
const aliasListCmdLong = `Lists all aliases by project`
const aliasAddCmdLong = `Adds a project alias to a project
project ID can be provided, or will otherwise use fuzzy find`
const aliasDeleteCmdLong = `Deletes aliases from projects
project ID can be provided, or will otherwise use fuzzy find`
const cacheCmdLong = `Contains sub-commands for managing project cache.
The project cache keeps this speedy, without smashing against the GitLab
API every time a new project is added / searched for`
const rootCmdLong = `Finds GitLab projects using fuzzy-find, remembering
your chosen term for the project as an alias, and offers helpful
shortcuts for moving around in projects and opening your code`
const projCmdLong = `Switches to a GitLab project by name or alias
If not found, will enter fzf mode. If not cloned, will clone
the project locally.`
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 .)`
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`
const projShowCmdLong = `Shows detail for a particular project
Will always fuzzy find`
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.`
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`