on main help sign in
chore: improve examples in `crush --help`
commit79c3ffa3ae922655a025d7ce0b0a4b5ec3722d61 authorChristian Rocha <christian@rocha.is> dateFri 6 Mar 2026, 21:34 (7 months ago) parent7f2e9f8
2 files changed+17−17
internal/cmd/root.go+12−15 internal/cmd/run.go+5−2
internal/cmd/root.go+12−15
@@ -52,29 +52,26 @@ func init() {
5252
5353var rootCmd = &cobra.Command{
5454 Use: "crush",
55− Short: "An AI assistant for software development",
56− Long: "An AI assistant for software development and similar tasks with direct access to the terminal",
55+ Short: "A terminal-first AI assistant for software development",
56+ Long: "A glamorous, terminal-first AI assistant for software development and adjacent tasks",
5757 Example: `
5858# Run in interactive mode
5959crush
6060
61−# Run with debug logging
62−crush -d
61+# Run non-interactively
62+crush run "Guess my 5 favorite Pokémon"
6363
64−# Run with debug logging in a specific directory
65−crush -d -c /path/to/project
66−
67−# Run with custom data directory
68−crush -D /path/to/custom/.crush
64+# Run a non-interactively with pipes and redirection
65+cat README.md | crush run "make this more glamorous" > GLAMOROUS_README.md
6966
70−# Print version
71−crush -v
67+# Run with debug logging in a specific directory
68+crush --debug --cwd /path/to/project
7269
73−# Run a single non-interactive prompt
74−crush run "Explain the use of context in Go"
70+# Run in yolo mode (auto-accept all permissions; use with care)
71+crush --yolo
7572
76−# Run in dangerous mode (auto-accept all permissions)
77−crush -y
73+# Run with custom data directory
74+crush --data-dir /path/to/custom/.crush
7875 `,
7976 RunE: func(cmd *cobra.Command, args []string) error {
8077 app, err := setupAppWithProgressBar(cmd)
internal/cmd/run.go+5−2
@@ -20,7 +20,7 @@ var runCmd = &cobra.Command{
2020The prompt can be provided as arguments or piped from stdin.`,
2121 Example: `
2222# Run a simple prompt
23−crush run Explain the use of context in Go
23+crush run "Guess my 5 favorite Pokémon"
2424
2525# Pipe input from stdin
2626curl https://charm.land | crush run "Summarize this website"
@@ -28,10 +28,13 @@ curl https://charm.land | crush run "Summarize this website"
2828# Read from a file
2929crush run "What is this code doing?" <<< prrr.go
3030
31+# Redirect output to a file
32+crush run "Generate a hot README for this project" > MY_HOT_README.md
33+
3134# Run in quiet mode (hide the spinner)
3235crush run --quiet "Generate a README for this project"
3336
34−# Run in verbose mode
37+# Run in verbose mode (show logs)
3538crush run --verbose "Generate a README for this project"
3639 `,
3740 RunE: func(cmd *cobra.Command, args []string) error {