promptgarten ๐ŸŒฑ

Command reference ยท Aider

/ls

Lists all known files and marks which ones are currently in the chat.

/ls gives you a complete overview of all files Aider knows about in the current project, and marks which of them are currently actively added to the chat session. This is especially useful in larger repositories, where you can otherwise quickly lose track of which files Aider is currently allowed to edit and which ones only exist as repo context in the background. The command itself doesn't open or change anything โ€“ it's a pure display function. To actually add a file for editing, you still need /add <file>; for reference-only files without write access, /read-only <file>. /ls is therefore well suited as a quick stop before such commands, for example to check whether a file was accidentally added twice or has since been removed again with /drop.

โœ… WHEN TO USE IT?

Get an overview before /add

Call /ls to see whether a file is already in the chat before adding it again with /add.

Check chat files after a long session

Use /ls to track which files are actually still in context after several /add and /drop commands.

โ›” WHEN NOT TO?

Wanting to view file contents

/ls only lists file names and chat status, not contents.

Better: Actually bring the file into the chat with /add or /read-only, or open it directly in the editor.

SOURCES

MORE COMMANDS ยท Aider

/map/map-refresh/model/models/multiline-mode/ok/paste/quit/read-only/reasoning-effort/report/reset

All commands ยท Aider โ†’

Share:๐•in๐Ÿ’ฌ