-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
39 lines (33 loc) · 1.04 KB
/
main.go
File metadata and controls
39 lines (33 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"fmt"
"os"
"github.com/deviantony/pctl/cmd/deploy"
initcmd "github.com/deviantony/pctl/cmd/init"
"github.com/deviantony/pctl/cmd/logs"
"github.com/deviantony/pctl/cmd/ps"
"github.com/deviantony/pctl/cmd/redeploy"
"github.com/deviantony/pctl/cmd/version"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "pctl",
Short: "Portainer Control CLI - Deploy and manage Docker Compose applications via Portainer",
Long: `pctl is a developer companion tool for deploying and managing Docker Compose
applications via Portainer. It streamlines the deployment workflow by providing
simple commands to create, deploy, and redeploy stacks through Portainer's API.`,
}
func main() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}
func init() {
rootCmd.AddCommand(initcmd.InitCmd)
rootCmd.AddCommand(deploy.DeployCmd)
rootCmd.AddCommand(logs.LogsCmd)
rootCmd.AddCommand(ps.PsCmd)
rootCmd.AddCommand(redeploy.RedeployCmd)
rootCmd.AddCommand(version.VersionCmd)
}