Enable passing commands for batch mode as cli args
- Dominant language
- Rust
- Stars
- 1
- Forks
- 8
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 16
Description
Currently commands for the `--commands` batch mode are read from a file. Some use cases may require only a single/few simple commands and creating a file for that can be overkill. In particular when sharing recipes with users:
- now: *first* create a file with `command1 command2 ...` and *then* execute
- `./miden-debug --commands cmds.txt ...`
- goal: pass commands directly as cli args
- `./miden-debug -ex command1 -ex command2 ...`
This corresponds to:
- `--one-line` in lldb [docs](https://lldb.llvm.org/man/lldb.html#cmdoption-lldb-one-line)
- `--eval-command` in gdb [docs](https://www.man7.org/linux/man-pages/man1/gdb.1.html)
Contributor guide
Research direction
Look at the existing batch mode implementation that reads commands from a file, likely in the CLI argument parsing logic (e.g., using clap). Add a new command-line argument (like `-ex`) that accepts multiple command strings. Integrate this with the command execution flow so that these arguments are processed similarly to file-based commands. Test by running the debugger with the new flag and verifying the commands execute.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 75/100