Skip to content

Commit 1d1e2c1

Browse files
committed
reformat argparse
1 parent 8e2d2b1 commit 1d1e2c1

2 files changed

Lines changed: 31 additions & 39 deletions

File tree

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Spellcaster is an open-source CLI tool that leverages AI agents to enhance the q
2323
To run Spellcaster:
2424
```bash
2525
pip install spellcaster
26-
spellcaster --url https://github.com/username/repo
26+
spellcaster -d /path/to/your/docs
2727
```
2828

2929

@@ -74,16 +74,16 @@ To run Spellcaster:
7474
- `-m`, `--max_files`: Maximum number of files to scan (default: MAX_FILES from config)
7575

7676
2. Examples:
77-
78-
Scan a GitHub repository:
79-
```bash
80-
spellcaster --url https://github.com/username/repo
81-
```
8277

8378
Scan a local directory with custom LLM provider:
8479
```bash
8580
spellcaster --directory /path/to/your/docs --llm_provider gpt4
8681
```
82+
83+
Scan a GitHub repository:
84+
```bash
85+
spellcaster --url https://github.com/username/repo
86+
```
8787

8888
3. Spellcaster will analyze the specified directory or repository and output any detected issues, along with suggestions for fixing them.
8989

spellcaster/cli.py

Lines changed: 25 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,31 @@ def main():
2020
parser = argparse.ArgumentParser(
2121
description="Scan a directory or GitHub repository and optionally specify an LLM provider."
2222
)
23-
parser.add_argument("-d", "--directory", type=str, help="The directory to scan")
24-
parser.add_argument(
25-
"-u", "--url", type=str, help="The GitHub repository URL to clone and scan"
26-
)
27-
parser.add_argument(
28-
"-l",
29-
"--llm_provider",
30-
type=str,
31-
default=MODEL,
32-
choices=["claude", "sonnet", "3.5", "gpt4o", "gpt4", "gpt3.5"],
33-
help="The LLM provider to use (optional)",
34-
)
35-
parser.add_argument(
36-
"-p",
37-
"--proper_nouns",
38-
type=str,
39-
default="* Llama3.1-70B \n * Cerebras \n * Cohere \n * OpenAI \n * AgentOps \n * Spellcaster",
40-
help="A string of proper nouns to include in the prompt (optional)",
41-
)
42-
parser.add_argument(
43-
"-f",
44-
"--file_types",
45-
nargs="+",
46-
default=FILE_TYPES,
47-
help="File types to scan (default: %(default)s)",
48-
)
49-
parser.add_argument(
50-
"-m",
51-
"--max_files",
52-
type=int,
53-
default=MAX_FILES,
54-
help="Maximum number of files to scan (default: %(default)s)",
55-
)
23+
parser.add_argument("-d", "--directory",
24+
type=str, help="The directory to scan")
25+
parser.add_argument("-u", "--url",
26+
type=str, help="The GitHub repository URL to clone and scan")
27+
parser.add_argument("-l", "--llm_provider",
28+
type=str,
29+
default=MODEL,
30+
choices=["claude", "sonnet", "3.5", "gpt4o", "gpt4", "gpt3.5"],
31+
help="The LLM provider to use (optional)",
32+
)
33+
parser.add_argument("-p", "--proper_nouns",
34+
type=str,
35+
default="* Llama3.1-70B \n * Cerebras \n * Cohere \n * OpenAI \n * AgentOps \n * Spellcaster",
36+
help="A string of proper nouns to include in the prompt (optional)",
37+
)
38+
parser.add_argument("-f", "--file_types",
39+
nargs="+",
40+
default=FILE_TYPES,
41+
help="File types to scan (default: %(default)s)",
42+
)
43+
parser.add_argument("-m", "--max_files",
44+
type=int,
45+
default=MAX_FILES,
46+
help="Maximum number of files to scan (default: %(default)s)",
47+
)
5648

5749
args = parser.parse_args()
5850

0 commit comments

Comments
 (0)