callstack / ai-cli

AI assistant in your terminal.
https://callstack.github.io/ai-cli/
MIT License
21 stars 0 forks source link

feat: make interactive mode default #30

Closed mdjastrzebski closed 5 months ago

mdjastrzebski commented 6 months ago

Is your feature request related to a problem? Please describe. Currently entering interactive mode requires using -i (--interactive) CLI option, or not passing query in CLI params.

In 95% case I want to enter interactive mode to be able to ask follow-up questions but sometimes forget to add -i. This is annoying, since exiting interactive mode is relatively effortless with a simple Ctrl+C.

Describe the solution you'd like

  1. Make interactive mode default
  2. Remove -i / --interactive CLI option
  3. Add a new --batch CLI option. This should behave somewhat similar to --non-interactive mode with following changes: a. in batch mode there is a single question to be asked to AI (in CLI params, not read during the session, there is no session) b. users question is not repeated as is in interactive mode c. the only thing outputted is the AI answer. No costs, no stats, not event "ai: " prefix.
  4. Batch mode should be auto-detected by usingprocess.stdout.isTTY (enable batch if output is not a TTY=terminal)

Describe alternatives you've considered Current solution.

Additional context Updated the related documentation and examples.