mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 10:14:59 +00:00
allow main() w/o args
This commit is contained in:
parent
00b0369282
commit
490a6999fb
1 changed files with 6 additions and 5 deletions
|
@ -5,12 +5,10 @@ from dotenv import load_dotenv
|
||||||
from aider.coder import Coder
|
from aider.coder import Coder
|
||||||
|
|
||||||
|
|
||||||
def main(argv):
|
def main(argv=[]):
|
||||||
load_dotenv()
|
load_dotenv()
|
||||||
env_prefix = "AIDER_"
|
env_prefix = "AIDER_"
|
||||||
parser = argparse.ArgumentParser(
|
parser = argparse.ArgumentParser(description="aider - chat with GPT about your code")
|
||||||
description="aider - chat with GPT about your code"
|
|
||||||
)
|
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"files",
|
"files",
|
||||||
metavar="FILE",
|
metavar="FILE",
|
||||||
|
@ -21,7 +19,10 @@ def main(argv):
|
||||||
"--history-file",
|
"--history-file",
|
||||||
metavar="HISTORY_FILE",
|
metavar="HISTORY_FILE",
|
||||||
default=os.environ.get(f"{env_prefix}HISTORY_FILE", ".aider.history"),
|
default=os.environ.get(f"{env_prefix}HISTORY_FILE", ".aider.history"),
|
||||||
help=f"Specify the chat input history file (default: .aider.history, ${env_prefix}HISTORY_FILE)",
|
help=(
|
||||||
|
"Specify the chat input history file (default: .aider.history,"
|
||||||
|
f" ${env_prefix}HISTORY_FILE)"
|
||||||
|
),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--model",
|
"--model",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue