@@ -45,6 +45,9 @@ to assist developers in writing, debugging, and understanding code directly from
46 # Run a single non-interactive prompt with JSON output format
46 # Run a single non-interactive prompt with JSON output format
47 crush -p "Explain the use of context in Go" -f json
47 crush -p "Explain the use of context in Go" -f json
49+ # Run in dangerous mode (auto-accept all permissions)
49 RunE: func(cmd *cobra.Command, args []string) error {
52 RunE: func(cmd *cobra.Command, args []string) error {
50 // Load the config
53 // Load the config
@@ -52,6 +55,7 @@ to assist developers in writing, debugging, and understanding code directly from
52 cwd, _ := cmd.Flags().GetString("cwd")
55 cwd, _ := cmd.Flags().GetString("cwd")
53 prompt, _ := cmd.Flags().GetString("prompt")
56 prompt, _ := cmd.Flags().GetString("prompt")
54 quiet, _ := cmd.Flags().GetBool("quiet")
57 quiet, _ := cmd.Flags().GetBool("quiet")
58+ yolo, _ := cmd.Flags().GetBool("yolo")
56 if cwd != "" {
60 if cwd != "" {
57 err := os.Chdir(cwd)
61 err := os.Chdir(cwd)
@@ -71,6 +75,7 @@ to assist developers in writing, debugging, and understanding code directly from
71 if err != nil {
75 if err != nil {
72 return err
76 return err
78+ cfg.Options.SkipPermissionsRequests = yolo
75 ctx := cmd.Context()
80 ctx := cmd.Context()
@@ -152,6 +157,7 @@ func init() {
152 rootCmd.Flags().BoolP("help", "h", false, "Help")
157 rootCmd.Flags().BoolP("help", "h", false, "Help")
153 rootCmd.Flags().BoolP("debug", "d", false, "Debug")
158 rootCmd.Flags().BoolP("debug", "d", false, "Debug")
154 rootCmd.Flags().StringP("prompt", "p", "", "Prompt to run in non-interactive mode")
159 rootCmd.Flags().StringP("prompt", "p", "", "Prompt to run in non-interactive mode")
160+ rootCmd.Flags().BoolP("yolo", "y", false, "Automatically accept all permissions (dangerous mode)")
156 // Add quiet flag to hide spinner in non-interactive mode
162 // Add quiet flag to hide spinner in non-interactive mode
157 rootCmd.Flags().BoolP("quiet", "q", false, "Hide spinner in non-interactive mode")
163 rootCmd.Flags().BoolP("quiet", "q", false, "Hide spinner in non-interactive mode")