Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions docs/git-draft.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@ git draft [options] --templates [--json | [--edit] TEMPLATE]

`git-draft` is a git-centric way to edit code with AI.

Its workhorse command is `git draft --new` (and its shorthand, `git draft`) which suggests code changes using LLMs.
Its workhorse command is `git draft` (shorthand for `git draft --new`) which suggests code changes using LLMs.
Prompts can be specified inline or via customizable templates.
Prompt templates can get augmented with information about the files in the repository, and give the LLM access to tools for reading and writing files.
Prompt templates can be augmented with information about the files in the repository, and give the LLM access to tools for reading and writing files.
Once the response has been received and changes applied, a commit is created in a dedicated draft branch.
The `--new` step can be repeated as many times as needed.
This command can be repeated as many times as needed within a draft branch to iterate on the changes.
Manual changes can of course be included.

Once satisfied with the changes, run `git draft --quit` to return to the original branch.
This keeps the working directory's current state.
Once satisfied with the changes, run `git draft --quit` to return to the original branch, keeping the working directory's current state.


== Options
Expand Down Expand Up @@ -91,10 +91,6 @@ Go back to the draft's origin branch, keeping the working directory's current st
This will delete the draft branch and its upstream.
Generated commits and the draft branch's final state remain available via `ref/drafts`.

--root::
Repository search root.
Defaults to the current working directory.

-T::
--templates::
With no argument, lists available templates.
Expand Down
2 changes: 1 addition & 1 deletion src/git_draft/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def new_parser() -> optparse.OptionParser:
)
parser.add_option(
"--root",
help="path used to locate repository root",
help=optparse.SUPPRESS_HELP, # Not needed when invoked via git
dest="root",
)

Expand Down