|
| 1 | +# Slash Commands |
| 2 | + |
| 3 | +Amazon Q CLI provides several slash commands that allow you to interact with the system and manage your workflow without sending messages to the AI model. These commands are prefixed with `/` and provide direct access to various features. |
| 4 | + |
| 5 | +## Available Commands |
| 6 | + |
| 7 | +### `/todos` - To-Do List Management |
| 8 | + |
| 9 | +The `/todos` command provides comprehensive management of to-do lists created by Amazon Q. When Q breaks down complex tasks into manageable steps, you can use these commands to view, resume, and manage your to-do lists. |
| 10 | + |
| 11 | +#### `/todos resume` |
| 12 | + |
| 13 | +Resume working on a selected to-do list. This command presents a fuzzy-searchable list of all incomplete to-do lists and allows you to select one to continue working on. |
| 14 | + |
| 15 | +**Usage:** |
| 16 | +``` |
| 17 | +/todos resume |
| 18 | +``` |
| 19 | + |
| 20 | +**Behavior:** |
| 21 | +- Displays all incomplete to-do lists with progress indicators |
| 22 | +- Allows fuzzy search to quickly find specific lists |
| 23 | +- Automatically loads the selected to-do list and prompts Q to continue working |
| 24 | +- Shows completion status (e.g., "3/7 tasks completed") |
| 25 | + |
| 26 | +#### `/todos view` |
| 27 | + |
| 28 | +View the details of a selected to-do list without resuming work on it. |
| 29 | + |
| 30 | +**Usage:** |
| 31 | +``` |
| 32 | +/todos view |
| 33 | +``` |
| 34 | + |
| 35 | +**Features:** |
| 36 | +- Browse all to-do lists (both complete and incomplete) |
| 37 | +- View full task lists with completion status |
| 38 | +- See task descriptions and context |
| 39 | +- Non-destructive viewing (doesn't change current session state) |
| 40 | + |
| 41 | +#### `/todos delete` |
| 42 | + |
| 43 | +Delete one or more to-do lists. |
| 44 | + |
| 45 | +**Usage:** |
| 46 | +``` |
| 47 | +/todos delete # Delete a single selected list |
| 48 | +/todos delete --all # Delete all to-do lists |
| 49 | +``` |
| 50 | + |
| 51 | +**Options:** |
| 52 | +- Without `--all`: Presents a selection interface to choose which list to delete |
| 53 | +- With `--all`: Deletes all to-do lists after confirmation |
| 54 | +- Deletion is permanent and cannot be undone |
| 55 | + |
| 56 | +#### `/todos clear-finished` |
| 57 | + |
| 58 | +Remove all completed to-do lists while preserving incomplete ones. |
| 59 | + |
| 60 | +**Usage:** |
| 61 | +``` |
| 62 | +/todos clear-finished |
| 63 | +``` |
| 64 | + |
| 65 | +**Behavior:** |
| 66 | +- Automatically identifies to-do lists where all tasks are marked complete |
| 67 | +- Removes only fully completed lists |
| 68 | +- Preserves any lists with remaining tasks |
| 69 | +- Provides feedback on how many lists were cleared |
| 70 | + |
| 71 | +### `/knowledge` - Knowledge Base Management |
| 72 | + |
| 73 | +The `/knowledge` command provides persistent knowledge base functionality with semantic search capabilities. For complete documentation, see the [Knowledge Management guide](./knowledge-management.md). |
| 74 | + |
| 75 | +#### Quick Reference |
| 76 | + |
| 77 | +| Command | Purpose | |
| 78 | +|---------|---------| |
| 79 | +| `/knowledge show` | Display all knowledge base entries | |
| 80 | +| `/knowledge add <name> <path>` | Add files/directories to knowledge base | |
| 81 | +| `/knowledge remove <identifier>` | Remove entries by name, path, or ID | |
| 82 | +| `/knowledge update <path>` | Update existing entry with new content | |
| 83 | +| `/knowledge clear` | Remove all entries (with confirmation) | |
| 84 | +| `/knowledge status` | View indexing operation status | |
| 85 | +| `/knowledge cancel [id]` | Cancel background operations | |
| 86 | + |
| 87 | +**Example Usage:** |
| 88 | +``` |
| 89 | +/knowledge add "project-docs" ./docs --include "**/*.md" |
| 90 | +/knowledge show |
| 91 | +/knowledge remove "old-project" |
| 92 | +``` |
| 93 | + |
| 94 | +### Other Slash Commands |
| 95 | + |
| 96 | +Additional slash commands are available for various system functions: |
| 97 | + |
| 98 | +- `/save` - Save current conversation |
| 99 | +- `/load` - Load a saved conversation |
| 100 | +- `/subscribe` - Manage subscription settings |
| 101 | + |
| 102 | +## To-Do List Display Format |
| 103 | + |
| 104 | +When viewing to-do lists, they are displayed with clear visual indicators: |
| 105 | + |
| 106 | +- **Incomplete tasks**: `☐ Task description` |
| 107 | +- **Completed tasks**: `■ Task description` (green, italicized) |
| 108 | +- **Progress indicators**: `(3/7)` showing completed vs total tasks |
| 109 | +- **Status symbols**: |
| 110 | + - `✗` (red) for incomplete lists |
| 111 | + - `✓` (green) for completed lists |
| 112 | + |
| 113 | +## Integration with Chat Sessions |
| 114 | + |
| 115 | +### Automatic Creation |
| 116 | +When you give Amazon Q a complex, multi-step task, it will automatically: |
| 117 | +1. Create a to-do list using the `todo_list` tool |
| 118 | +2. Display the list to you |
| 119 | +3. Begin working through tasks sequentially |
| 120 | +4. Mark tasks as complete as it finishes them |
| 121 | + |
| 122 | +### Session Persistence |
| 123 | +To-do lists persist across chat sessions: |
| 124 | +- Lists are saved locally in `.amazonq/cli-todo-lists/` |
| 125 | +- You can resume work on incomplete lists in new sessions |
| 126 | +- Context and progress are preserved between sessions |
| 127 | +- Conversation summaries include to-do list IDs for continuity |
| 128 | + |
| 129 | +### Resume Workflow |
| 130 | +When resuming a to-do list: |
| 131 | +1. Use `/todos resume` to select a list |
| 132 | +2. Q automatically loads the list context |
| 133 | +3. Q reviews completed tasks and remaining work |
| 134 | +4. Q continues from where it left off |
| 135 | + |
| 136 | +## Best Practices |
| 137 | + |
| 138 | +### For Users |
| 139 | +- **Use descriptive task requests**: Clear, detailed requests help Q create better to-do lists |
| 140 | +- **Let Q manage the lists**: Avoid manually editing to-do list files |
| 141 | +- **Regular cleanup**: Use `/todos clear-finished` to remove completed lists |
| 142 | +- **Resume incomplete work**: Check for incomplete lists when starting new sessions |
| 143 | + |
| 144 | +### For Complex Projects |
| 145 | +- **Break down large tasks**: Give Q specific, focused objectives for better to-do list creation |
| 146 | +- **Provide context**: Include relevant background information when requesting complex tasks |
| 147 | +- **Review progress**: Use `/todos view` to check progress without disrupting current work |
| 148 | +- **Organize by project**: Consider using separate chat sessions for different projects |
| 149 | + |
| 150 | +## Storage and File Management |
| 151 | + |
| 152 | +### Local Storage |
| 153 | +- **Location**: `.amazonq/cli-todo-lists/` in your current working directory |
| 154 | +- **Format**: JSON files with timestamp-based IDs |
| 155 | +- **Automatic creation**: Directory is created automatically when needed |
| 156 | + |
| 157 | +### File Structure |
| 158 | +Each to-do list contains: |
| 159 | +- Task descriptions and completion status |
| 160 | +- Context updates from completed tasks |
| 161 | +- List of modified files |
| 162 | +- Unique identifier and creation metadata |
| 163 | + |
| 164 | +### Cleanup |
| 165 | +- Use slash commands rather than manually deleting files |
| 166 | +- The system handles file management automatically |
| 167 | +- Backup important project directories if needed |
| 168 | + |
| 169 | +## Troubleshooting |
| 170 | + |
| 171 | +### Common Issues |
| 172 | + |
| 173 | +**"No to-do lists to resume"** |
| 174 | +- This means no incomplete to-do lists exist |
| 175 | +- Create new tasks by giving Q complex, multi-step requests |
| 176 | +- Check if lists were accidentally deleted |
| 177 | + |
| 178 | +**Lists not appearing** |
| 179 | +- Ensure you're in the correct working directory |
| 180 | +- To-do lists are stored relative to where they were created |
| 181 | +- Check `.amazonq/cli-todo-lists/` exists and contains files |
| 182 | + |
| 183 | +**Cannot resume a list** |
| 184 | +- The to-do list file may be corrupted |
| 185 | +- Try `/todos view` to see if the list displays correctly |
| 186 | +- Consider deleting corrupted lists and recreating tasks |
| 187 | + |
| 188 | +**Performance with many lists** |
| 189 | +- Use `/todos clear-finished` regularly to remove completed lists |
| 190 | +- Consider organizing work into separate project directories |
| 191 | +- Delete old, irrelevant lists to improve performance |
| 192 | + |
| 193 | +### Getting Help |
| 194 | + |
| 195 | +If you encounter issues with to-do list functionality: |
| 196 | +1. Check that the `.amazonq/cli-todo-lists/` directory exists and is writable |
| 197 | +2. Verify you're in the correct working directory |
| 198 | +3. Try creating a simple test to-do list to verify functionality |
| 199 | +4. Use `/todos view` to inspect existing lists for corruption |
0 commit comments