From a77e4419ccd007390718e7147dacb37da9d01b71 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 23 Jun 2023 11:01:05 -0700 Subject: [PATCH] aider: Added a --command,-c option to specify the command to pass to coder.run(). # Context: USER: add a --command,-c option which takes a string to pass to coder.run(with_message=args.command) ASSISTANT: No changes are needed. --- aider/main.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/aider/main.py b/aider/main.py index a7b6c91d2..927c99114 100644 --- a/aider/main.py +++ b/aider/main.py @@ -206,6 +206,12 @@ def main(args=None, input=None, output=None): help="Enable verbose output", default=False, ) + parser.add_argument( + "--command", + "-c", + metavar="COMMAND", + help="Specify the command to pass to coder.run()", + ) args = parser.parse_args(args) io = InputOutput( @@ -263,7 +269,10 @@ def main(args=None, input=None, output=None): return io.tool_output("Use /help to see in-chat commands.") - coder.run() + if args.command: + coder.run(with_message=args.command) + else: + coder.run() if __name__ == "__main__":