mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-30 01:04:59 +00:00
Add docs for commands and prompt-toolkit defaults
This commit is contained in:
parent
691c013272
commit
53de30c1ac
2 changed files with 40 additions and 0 deletions
|
@ -97,6 +97,7 @@ Aider also has many
|
||||||
additional command-line options, environment variables or configuration file
|
additional command-line options, environment variables or configuration file
|
||||||
to set many options. See `aider --help` for details.
|
to set many options. See `aider --help` for details.
|
||||||
|
|
||||||
|
|
||||||
## In-chat commands
|
## In-chat commands
|
||||||
|
|
||||||
Aider supports commands from within the chat, which all start with `/`. Here are some of the most useful in-chat commands:
|
Aider supports commands from within the chat, which all start with `/`. Here are some of the most useful in-chat commands:
|
||||||
|
@ -108,6 +109,8 @@ Aider supports commands from within the chat, which all start with `/`. Here are
|
||||||
* `/run <command>`: Run a shell command and optionally add the output to the chat.
|
* `/run <command>`: Run a shell command and optionally add the output to the chat.
|
||||||
* `/help`: Show help about all commands.
|
* `/help`: Show help about all commands.
|
||||||
|
|
||||||
|
See the [full command docs](https://aider.chat/docs/commands.html) for more information.
|
||||||
|
|
||||||
|
|
||||||
## Tips
|
## Tips
|
||||||
|
|
||||||
|
|
37
docs/commands.md
Normal file
37
docs/commands.md
Normal file
|
@ -0,0 +1,37 @@
|
||||||
|
# Commands
|
||||||
|
|
||||||
|
- `/help <command>`: Show help about all commands
|
||||||
|
- `/exit`: Exit the application
|
||||||
|
|
||||||
|
## token/context management
|
||||||
|
- `/add <file>`: Add matching files to the chat session using glob patterns
|
||||||
|
- `/drop <file>`: Remove matching files from the chat session
|
||||||
|
- `/clear`: Clear the chat history
|
||||||
|
- `/ls`: List all known files and those included in the chat session
|
||||||
|
- `/tokens`: Report on the number of tokens used by the current chat context
|
||||||
|
- `/run <command>`: Run a shell command and optionally add the output to the chat
|
||||||
|
|
||||||
|
## git
|
||||||
|
- `/undo`: Undo the last git commit if it was done by aider
|
||||||
|
- `/diff`: Display the diff of the last aider commit
|
||||||
|
- `/commit <message>`: Commit edits to the repo made outside the chat (commit message optional)
|
||||||
|
- `/git <command>`: Run a git command
|
||||||
|
|
||||||
|
# Prompt Toolkit defaults
|
||||||
|
|
||||||
|
The interactive prompt is built with [prompt-toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) which provides a lot of Emacs and Vi-style keyboard. Some emacs bindings you may find useful are
|
||||||
|
|
||||||
|
- `Ctrl-A` : Move cursor to the start of the line.
|
||||||
|
- `Ctrl-B` : Move cursor back one character.
|
||||||
|
- `Ctrl-D` : Delete the character under the cursor.
|
||||||
|
- `Ctrl-E` : Move cursor to the end of the line.
|
||||||
|
- `Ctrl-F` : Move cursor forward one character.
|
||||||
|
- `Ctrl-K` : Delete from the cursor to the end of the line.
|
||||||
|
- `Ctrl-L` : Clear the screen.
|
||||||
|
- `Ctrl-N` : Move down to the next history entry.
|
||||||
|
- `Ctrl-P` : Move up to the previous history entry.
|
||||||
|
- `Ctrl-R` : Reverse search in command history.
|
||||||
|
|
||||||
|
Note: aider currently exits vi normal mode after a single command, (maybe something to do with the esc keybinding?). Feel free to investigate and make a PR if you would like to see it fully supported.
|
||||||
|
|
||||||
|
Prompt toolkit also does not provide clear documentation on the bindings they support - maybe you can take aider and help them out with that and we can then link to the authoritative docs.
|
Loading…
Add table
Add a link
Reference in a new issue