You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Codegpt
2
2
3
-
## 0.2.10
3
+
## 0.2.15
4
4
5
5
A tool for using GPT just a little quicker. A nearly truly automated footgun. Learn how to revert with git before trying please.
6
6
@@ -27,10 +27,10 @@ Usage
27
27
To try Codegpt, you can run the following command:
28
28
29
29
```bash
30
-
codegpt do<instructions (quoted)><filenames>
30
+
codegpt do<instructions (quoted)>-f readme.md
31
31
```
32
32
33
-
It will prompt you for directions to follow, and it'll do whatever you want. Write new docs, add comments to code, just make sure to ask it to "edit" or "comment" or whatever so it knows to change files or not.
33
+
It can do basically anything. Try handing in some files for context and telling it to generate something new - SQL queries, new features, documentation, whatever.
34
34
35
35
Or use the quick command to do some neat stuff, like:
..., help="Instruction to edit the file(s). Keep it short! Wrap with quotes.",
23
-
),
24
-
filenames: List[Path] =typer.Argument(
25
-
[], help="List of filenames to edit. If not provided, will prompt for input.",
25
+
...,
26
+
help="Instruction to edit the file(s). Keep it short! Wrap with quotes.",
26
27
),
27
28
backup: bool=typer.Option(
28
-
False, "--backup", "-b", help="Whether to create a backup of the original file(s).",
29
+
False,
30
+
"--backup",
31
+
"-b",
32
+
help="Whether to create a backup of the original file(s).",
33
+
),
34
+
yes: bool=typer.Option(
35
+
False,
36
+
"--yes",
37
+
"-y",
38
+
help="Don't ask for confirmation.",
39
+
),
40
+
raw_code: str=typer.Option(
41
+
None,
42
+
"--raw-code",
43
+
"-c",
44
+
help="Raw code to edit. Overrides filenames. Use quotes to wrap the code.",
45
+
),
46
+
json_out: bool=typer.Option(
47
+
False, "--json-out", "-j", help="Output the response in raw json format."
29
48
),
30
-
yes: bool=typer.Option(False, "--yes", "-y", help="Don't ask for confirmation.",),
31
-
raw_code: str=typer.Option(None, "--raw-code", "-c", help="Raw code to edit. Overrides filenames"),
32
-
json_out: bool=typer.Option(False, "--json-out", "-j", help="Output to raw json."),
49
+
raw_out: bool=typer.Option(
50
+
False,
51
+
"--raw-out",
52
+
"-r",
53
+
help="Output the raw 'code' from the response and exit the function.",
54
+
),
55
+
filenames: Optional[List[Path]] =typer.Argument(None, help="File(s) to edit or for context."),
33
56
):
34
57
"""
35
58
Do something given some code for context. Asking for documents, queries, etc. should work okay. Edits are iffy, but work a lot of the time.
36
-
37
-
Your code better be in git before you use this.
59
+
60
+
Your code better be in git before you use this. If the instruction is one of the quick prompt options (like 'comment' or 'docs'), it will do that prompt automatically. For more info, run 'codegpt quick --help'.
38
61
39
62
FILENAMES: list of filenames to edit. If not provided, will prompt for input.
40
63
INSTRUCTION: the instruction to edit the file(s). Keep it short!
41
64
"""
65
+
66
+
ifraw_outorjson_out:
67
+
logging.basicConfig(level=logging.CRITICAL)
42
68
43
69
ifnotfilenamesandnotraw_code:
44
-
raisetyper.BadParameter("Either FILENAMES or --raw-code (-c) must be provided.")
70
+
raisetyper.BadParameter(
71
+
"Either --filenames (-f) or --raw-code (-c) must be provided."
0 commit comments