-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat #202: Added CLI to the documentation
- Loading branch information
Showing
29 changed files
with
958 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package cmd | ||
|
||
import ( | ||
"github.com/spf13/cobra/doc" | ||
|
||
"github.com/rs/zerolog/log" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
// docsCmd represents the docs command | ||
var docsCmd = &cobra.Command{ | ||
Use: "docs [OUTPUT_PATH]", | ||
Short: "Generate Process Compose markdown documentation", | ||
Args: cobra.ExactArgs(1), | ||
Run: func(cmd *cobra.Command, args []string) { | ||
outPath := args[0] | ||
err := doc.GenMarkdownTree(rootCmd, outPath) | ||
if err != nil { | ||
log.Fatal().Err(err).Msg("Failed to generate docs") | ||
} | ||
}, | ||
Hidden: true, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(docsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## process-compose | ||
|
||
Processes scheduler and orchestrator | ||
|
||
``` | ||
process-compose [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-f, --config stringArray path to config files to load (env: PC_CONFIG_FILES) | ||
--disable-dotenv disable .env file loading (env: PC_DISABLE_DOTENV=1) | ||
-h, --help help for process-compose | ||
-d, --hide-disabled hide disabled processes | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
-n, --namespace stringArray run only specified namespaces (default all) | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-r, --ref-rate duration TUI refresh rate in seconds or as a Go duration string (e.g. 1s) (default 1) | ||
-R, --reverse sort in reverse order | ||
-S, --sort string sort column name. legal values (case insensitive): [AGE, EXIT, HEALTH, MEM, NAME, NAMESPACE, PID, RESTARTS, STATUS] (default "NAME") | ||
--theme string select process compose theme (default "Default") | ||
-t, --tui enable TUI (disable with -t=false) (env: PC_DISABLE_TUI) (default true) | ||
--tui-fs enable TUI full screen (env: PC_TUI_FULL_SCREEN=1) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose attach](process-compose_attach.md) - Attach the Process Compose TUI Remotely to a Running Process Compose Server | ||
* [process-compose completion](process-compose_completion.md) - Generate the autocompletion script for the specified shell | ||
* [process-compose down](process-compose_down.md) - Stops all the running processes and terminates the Process Compose | ||
* [process-compose info](process-compose_info.md) - Print configuration info | ||
* [process-compose process](process-compose_process.md) - Execute operations on the available processes | ||
* [process-compose project](process-compose_project.md) - Execute operations on a running Process Compose project | ||
* [process-compose run](process-compose_run.md) - Run PROCESS in the foreground, and its dependencies in the background | ||
* [process-compose up](process-compose_up.md) - Run process compose project | ||
* [process-compose version](process-compose_version.md) - Print version and build info | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## process-compose attach | ||
|
||
Attach the Process Compose TUI Remotely to a Running Process Compose Server | ||
|
||
``` | ||
process-compose attach [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-a, --address string address of the target process compose server (default "localhost") | ||
-h, --help help for attach | ||
-l, --log-length int log length to display in TUI (default 1000) | ||
-r, --ref-rate duration TUI refresh rate in seconds or as a Go duration string (e.g. 1s) (default 1) | ||
-R, --reverse sort in reverse order | ||
-S, --sort string sort column name. legal values (case insensitive): [AGE, EXIT, HEALTH, MEM, NAME, NAMESPACE, PID, RESTARTS, STATUS] (default "NAME") | ||
--theme string select process compose theme (default "Default") | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose](process-compose.md) - Processes scheduler and orchestrator | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
## process-compose completion | ||
|
||
Generate the autocompletion script for the specified shell | ||
|
||
### Synopsis | ||
|
||
Generate the autocompletion script for process-compose for the specified shell. | ||
See each sub-command's help for details on how to use the generated script. | ||
|
||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for completion | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose](process-compose.md) - Processes scheduler and orchestrator | ||
* [process-compose completion bash](process-compose_completion_bash.md) - Generate the autocompletion script for bash | ||
* [process-compose completion fish](process-compose_completion_fish.md) - Generate the autocompletion script for fish | ||
* [process-compose completion powershell](process-compose_completion_powershell.md) - Generate the autocompletion script for powershell | ||
* [process-compose completion zsh](process-compose_completion_zsh.md) - Generate the autocompletion script for zsh | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
## process-compose completion bash | ||
|
||
Generate the autocompletion script for bash | ||
|
||
### Synopsis | ||
|
||
Generate the autocompletion script for the bash shell. | ||
|
||
This script depends on the 'bash-completion' package. | ||
If it is not installed already, you can install it via your OS's package manager. | ||
|
||
To load completions in your current shell session: | ||
|
||
source <(process-compose completion bash) | ||
|
||
To load completions for every new session, execute once: | ||
|
||
#### Linux: | ||
|
||
process-compose completion bash > /etc/bash_completion.d/process-compose | ||
|
||
#### macOS: | ||
|
||
process-compose completion bash > $(brew --prefix)/etc/bash_completion.d/process-compose | ||
|
||
You will need to start a new shell for this setup to take effect. | ||
|
||
|
||
``` | ||
process-compose completion bash | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for bash | ||
--no-descriptions disable completion descriptions | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose completion](process-compose_completion.md) - Generate the autocompletion script for the specified shell | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## process-compose completion fish | ||
|
||
Generate the autocompletion script for fish | ||
|
||
### Synopsis | ||
|
||
Generate the autocompletion script for the fish shell. | ||
|
||
To load completions in your current shell session: | ||
|
||
process-compose completion fish | source | ||
|
||
To load completions for every new session, execute once: | ||
|
||
process-compose completion fish > ~/.config/fish/completions/process-compose.fish | ||
|
||
You will need to start a new shell for this setup to take effect. | ||
|
||
|
||
``` | ||
process-compose completion fish [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for fish | ||
--no-descriptions disable completion descriptions | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose completion](process-compose_completion.md) - Generate the autocompletion script for the specified shell | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
## process-compose completion powershell | ||
|
||
Generate the autocompletion script for powershell | ||
|
||
### Synopsis | ||
|
||
Generate the autocompletion script for powershell. | ||
|
||
To load completions in your current shell session: | ||
|
||
process-compose completion powershell | Out-String | Invoke-Expression | ||
|
||
To load completions for every new session, add the output of the above command | ||
to your powershell profile. | ||
|
||
|
||
``` | ||
process-compose completion powershell [flags] | ||
``` | ||
|
||
### Options | ||
|
||
``` | ||
-h, --help help for powershell | ||
--no-descriptions disable completion descriptions | ||
``` | ||
|
||
### Options inherited from parent commands | ||
|
||
``` | ||
--keep-tui keep TUI running even after all processes exit | ||
-L, --log-file string Specify the log file path (env: PC_LOG_FILE) (default "/tmp/process-compose-<user>.log") | ||
--no-server disable HTTP server (env: PC_NO_SERVER) | ||
--ordered-shutdown shut down processes in reverse dependency order | ||
-p, --port int port number (env: PC_PORT_NUM) (default 8080) | ||
--read-only enable read-only mode (env: PC_READ_ONLY) | ||
-u, --unix-socket string path to unix socket (env: PC_SOCKET_PATH) (default "/tmp/process-compose-<pid>.sock") | ||
-U, --use-uds use unix domain sockets instead of tcp | ||
``` | ||
|
||
### SEE ALSO | ||
|
||
* [process-compose completion](process-compose_completion.md) - Generate the autocompletion script for the specified shell | ||
|
||
###### Auto generated by spf13/cobra on 27-Jul-2024 |
Oops, something went wrong.