on main help sign in
chore: improve examples in `crush --help`
79c3ffaChristian Rocha
internal/cmd/root.go+12−15
@@ -52,29 +52,26 @@ func init() {
52
52
53var rootCmd = &cobra.Command{
53var rootCmd = &cobra.Command{
54 Use: "crush",
54 Use: "crush",
55− Short: "An AI assistant for software development",
55+ Short: "A terminal-first AI assistant for software development",
56− Long: "An AI assistant for software development and similar tasks with direct access to the terminal",
56+ Long: "A glamorous, terminal-first AI assistant for software development and adjacent tasks",
57 Example: `
57 Example: `
58# Run in interactive mode
58# Run in interactive mode
59crush
59crush
60
60
61−# Run with debug logging
61+# Run non-interactively
62−crush -d
62+crush run "Guess my 5 favorite Pokémon"
63
63
64−# Run with debug logging in a specific directory
64+# Run a non-interactively with pipes and redirection
65−crush -d -c /path/to/project
65+cat README.md | crush run "make this more glamorous" > GLAMOROUS_README.md
66−
67−# Run with custom data directory
68−crush -D /path/to/custom/.crush
69
66
70−# Print version
67+# Run with debug logging in a specific directory
71−crush -v
68+crush --debug --cwd /path/to/project
72
69
73−# Run a single non-interactive prompt
70+# Run in yolo mode (auto-accept all permissions; use with care)
74−crush run "Explain the use of context in Go"
71+crush --yolo
75
72
76−# Run in dangerous mode (auto-accept all permissions)
73+# Run with custom data directory
77−crush -y
74+crush --data-dir /path/to/custom/.crush
78 `,
75 `,
79 RunE: func(cmd *cobra.Command, args []string) error {
76 RunE: func(cmd *cobra.Command, args []string) error {
80 app, err := setupAppWithProgressBar(cmd)
77 app, err := setupAppWithProgressBar(cmd)
internal/cmd/run.go+5−2
@@ -20,7 +20,7 @@ var runCmd = &cobra.Command{
20The prompt can be provided as arguments or piped from stdin.`,
20The prompt can be provided as arguments or piped from stdin.`,
21 Example: `
21 Example: `
22# Run a simple prompt
22# Run a simple prompt
23−crush run Explain the use of context in Go
23+crush run "Guess my 5 favorite Pokémon"
24
24
25# Pipe input from stdin
25# Pipe input from stdin
26curl https://charm.land | crush run "Summarize this website"
26curl https://charm.land | crush run "Summarize this website"
@@ -28,10 +28,13 @@ curl https://charm.land | crush run "Summarize this website"
28# Read from a file
28# Read from a file
29crush run "What is this code doing?" <<< prrr.go
29crush run "What is this code doing?" <<< prrr.go
30
30
31+# Redirect output to a file
32+crush run "Generate a hot README for this project" > MY_HOT_README.md
33+
31# Run in quiet mode (hide the spinner)
34# Run in quiet mode (hide the spinner)
32crush run --quiet "Generate a README for this project"
35crush run --quiet "Generate a README for this project"
33
36
34−# Run in verbose mode
37+# Run in verbose mode (show logs)
35crush run --verbose "Generate a README for this project"
38crush run --verbose "Generate a README for this project"
36 `,
39 `,
37 RunE: func(cmd *cobra.Command, args []string) error {
40 RunE: func(cmd *cobra.Command, args []string) error {