diff --git a/internal/cmd/root.go b/internal/cmd/root.go index 16598f98765b321e6c7e5c9d8e51133800f57aa1..52ffda3fb09a0e6fdfb88084b80f7bdd261fb3c2 100644 --- a/internal/cmd/root.go +++ b/internal/cmd/root.go @@ -52,29 +52,26 @@ func init() { var rootCmd = &cobra.Command{ Use: "crush", - Short: "An AI assistant for software development", - Long: "An AI assistant for software development and similar tasks with direct access to the terminal", + Short: "A terminal-first AI assistant for software development", + Long: "A glamorous, terminal-first AI assistant for software development and adjacent tasks", Example: ` # Run in interactive mode crush -# Run with debug logging -crush -d +# Run non-interactively +crush run "Guess my 5 favorite Pokémon" -# Run with debug logging in a specific directory -crush -d -c /path/to/project - -# Run with custom data directory -crush -D /path/to/custom/.crush +# Run a non-interactively with pipes and redirection +cat README.md | crush run "make this more glamorous" > GLAMOROUS_README.md -# Print version -crush -v +# Run with debug logging in a specific directory +crush --debug --cwd /path/to/project -# Run a single non-interactive prompt -crush run "Explain the use of context in Go" +# Run in yolo mode (auto-accept all permissions; use with care) +crush --yolo -# Run in dangerous mode (auto-accept all permissions) -crush -y +# Run with custom data directory +crush --data-dir /path/to/custom/.crush `, RunE: func(cmd *cobra.Command, args []string) error { app, err := setupAppWithProgressBar(cmd) diff --git a/internal/cmd/run.go b/internal/cmd/run.go index 50005a548bad0308bdca3a2afbe17503c1f86c56..c823692d242b4028fc59a48912c056a5207567d5 100644 --- a/internal/cmd/run.go +++ b/internal/cmd/run.go @@ -20,7 +20,7 @@ var runCmd = &cobra.Command{ The prompt can be provided as arguments or piped from stdin.`, Example: ` # Run a simple prompt -crush run Explain the use of context in Go +crush run "Guess my 5 favorite Pokémon" # Pipe input from stdin curl https://charm.land | crush run "Summarize this website" @@ -28,10 +28,13 @@ curl https://charm.land | crush run "Summarize this website" # Read from a file crush run "What is this code doing?" <<< prrr.go +# Redirect output to a file +crush run "Generate a hot README for this project" > MY_HOT_README.md + # Run in quiet mode (hide the spinner) crush run --quiet "Generate a README for this project" -# Run in verbose mode +# Run in verbose mode (show logs) crush run --verbose "Generate a README for this project" `, RunE: func(cmd *cobra.Command, args []string) error {