From 334eed56ab0d2fb7dbf47fda35c92065f187abe5 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Apr 2026 14:23:50 +0000 Subject: [PATCH 1/2] rename CLI binary from monolinie to ml for shorter typing https://claude.ai/code/session_01MK4HtKzWUgbLhrVSTC4JV8 --- .gitignore | 2 +- cmd/config.go | 2 +- cmd/delete.go | 4 ++-- cmd/env.go | 2 +- cmd/new.go | 2 +- cmd/root.go | 2 +- internal/config/config.go | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index 66774e1..074679d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -monolinie +ml diff --git a/cmd/config.go b/cmd/config.go index 3c28e2c..c035c13 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -12,7 +12,7 @@ import ( var configCmd = &cobra.Command{ Use: "config", Short: "Manage configuration", - Long: "Set, get, and list configuration values stored in ~/.monolinie/config.yaml", + Long: "Set, get, and list configuration values stored in ~/.ml/config.yaml", } var configSetCmd = &cobra.Command{ diff --git a/cmd/delete.go b/cmd/delete.go index d5b8a74..e6900cc 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -25,8 +25,8 @@ var deleteCmd = &cobra.Command{ Long: `Tear down a project: remove Dokploy services, DNS record, and GitHub repo. Use --all to delete all projects matching a prefix: - monolinie delete test --all # deletes all projects starting with "test" - monolinie delete test --all -f # skip confirmation`, + ml delete test --all # deletes all projects starting with "test" + ml delete test --all -f # skip confirmation`, Args: cobra.ExactArgs(1), RunE: runDelete, } diff --git a/cmd/env.go b/cmd/env.go index 65899b8..0d4b2f9 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -162,7 +162,7 @@ func runEnvSet(cmd *cobra.Command, args []string) error { green := color.New(color.FgGreen) green.Printf("✓ Updated environment variables for %s\n", name) - color.Yellow(" Run `monolinie redeploy %s` to apply changes.\n", name) + color.Yellow(" Run `ml redeploy %s` to apply changes.\n", name) return nil } diff --git a/cmd/new.go b/cmd/new.go index 705a115..69c55f5 100644 --- a/cmd/new.go +++ b/cmd/new.go @@ -190,7 +190,7 @@ func runNew(cmd *cobra.Command, args []string) error { // Step 10: Wait for DNS propagation, then configure domain + certificate fmt.Printf(" Waiting for DNS propagation...") if err := waitForDNS(previewHost, serverIP, 3*time.Minute); err != nil { - return fmt.Errorf("DNS propagation failed: %w — try again later with: monolinie domain %s", err, name) + return fmt.Errorf("DNS propagation failed: %w — try again later with: ml domain %s", err, name) } green.Println(" ✓") diff --git a/cmd/root.go b/cmd/root.go index 6da5b81..a1fa672 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -8,7 +8,7 @@ import ( ) var rootCmd = &cobra.Command{ - Use: "monolinie", + Use: "ml", Short: "Monolinie studio CLI", Long: "CLI tool for automating project setup in the Monolinie studio.", } diff --git a/internal/config/config.go b/internal/config/config.go index ea0fa7a..b777784 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -23,7 +23,7 @@ func Init() error { return fmt.Errorf("get home dir: %w", err) } - configDir := filepath.Join(home, ".monolinie") + configDir := filepath.Join(home, ".ml") if err := os.MkdirAll(configDir, 0755); err != nil { return fmt.Errorf("create config dir: %w", err) } From 6b14b0cb40501a32963d0f61cd8c306211dca52b Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 16 Apr 2026 14:25:56 +0000 Subject: [PATCH 2/2] support both ml and monolinie as binary names Detect the invoked binary name at runtime so help text adapts accordingly. Config dir and internal references stay as monolinie. https://claude.ai/code/session_01MK4HtKzWUgbLhrVSTC4JV8 --- .gitignore | 1 + cmd/config.go | 2 +- cmd/delete.go | 4 ++-- cmd/env.go | 2 +- cmd/new.go | 2 +- cmd/root.go | 8 +++++++- internal/config/config.go | 2 +- 7 files changed, 14 insertions(+), 7 deletions(-) diff --git a/.gitignore b/.gitignore index 074679d..4a2e898 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +monolinie ml diff --git a/cmd/config.go b/cmd/config.go index c035c13..3c28e2c 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -12,7 +12,7 @@ import ( var configCmd = &cobra.Command{ Use: "config", Short: "Manage configuration", - Long: "Set, get, and list configuration values stored in ~/.ml/config.yaml", + Long: "Set, get, and list configuration values stored in ~/.monolinie/config.yaml", } var configSetCmd = &cobra.Command{ diff --git a/cmd/delete.go b/cmd/delete.go index e6900cc..d5b8a74 100644 --- a/cmd/delete.go +++ b/cmd/delete.go @@ -25,8 +25,8 @@ var deleteCmd = &cobra.Command{ Long: `Tear down a project: remove Dokploy services, DNS record, and GitHub repo. Use --all to delete all projects matching a prefix: - ml delete test --all # deletes all projects starting with "test" - ml delete test --all -f # skip confirmation`, + monolinie delete test --all # deletes all projects starting with "test" + monolinie delete test --all -f # skip confirmation`, Args: cobra.ExactArgs(1), RunE: runDelete, } diff --git a/cmd/env.go b/cmd/env.go index 0d4b2f9..65899b8 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -162,7 +162,7 @@ func runEnvSet(cmd *cobra.Command, args []string) error { green := color.New(color.FgGreen) green.Printf("✓ Updated environment variables for %s\n", name) - color.Yellow(" Run `ml redeploy %s` to apply changes.\n", name) + color.Yellow(" Run `monolinie redeploy %s` to apply changes.\n", name) return nil } diff --git a/cmd/new.go b/cmd/new.go index 69c55f5..705a115 100644 --- a/cmd/new.go +++ b/cmd/new.go @@ -190,7 +190,7 @@ func runNew(cmd *cobra.Command, args []string) error { // Step 10: Wait for DNS propagation, then configure domain + certificate fmt.Printf(" Waiting for DNS propagation...") if err := waitForDNS(previewHost, serverIP, 3*time.Minute); err != nil { - return fmt.Errorf("DNS propagation failed: %w — try again later with: ml domain %s", err, name) + return fmt.Errorf("DNS propagation failed: %w — try again later with: monolinie domain %s", err, name) } green.Println(" ✓") diff --git a/cmd/root.go b/cmd/root.go index a1fa672..4a8dca9 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -3,17 +3,23 @@ package cmd import ( "fmt" "os" + "path/filepath" "github.com/spf13/cobra" ) var rootCmd = &cobra.Command{ - Use: "ml", + Use: "monolinie", Short: "Monolinie studio CLI", Long: "CLI tool for automating project setup in the Monolinie studio.", } func Execute() { + // Allow invoking as "ml" (short alias) or "monolinie" + if name := filepath.Base(os.Args[0]); name == "ml" { + rootCmd.Use = "ml" + } + if err := rootCmd.Execute(); err != nil { fmt.Fprintln(os.Stderr, err) os.Exit(1) diff --git a/internal/config/config.go b/internal/config/config.go index b777784..ea0fa7a 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -23,7 +23,7 @@ func Init() error { return fmt.Errorf("get home dir: %w", err) } - configDir := filepath.Join(home, ".ml") + configDir := filepath.Join(home, ".monolinie") if err := os.MkdirAll(configDir, 0755); err != nil { return fmt.Errorf("create config dir: %w", err) }