AskDocs provides a rich terminal interface using the Textual framework, offering a full-screen interactive experience.
- Full-screen interactive terminal interface
- Keyboard shortcuts for quick navigation
- Dark mode toggle
- Integrated knowledge base management
- Real-time status indicators
- Cross-platform compatibility
# Launch the TUI application
askdocs tui- Text input field for entering questions
- Model selection dropdown
- Template selection dropdown
- Ask button
- Preview button
- Renders the answer with rich formatting
- Shows source documents used to generate the answer
- Displays confidence metrics
- Shows knowledge base statistics
- Provides option to rebuild knowledge base
- Indicates whether embeddings are being used
- Toggle dark mode
- Change model settings
- Adjust document retrieval parameters
| Key | Action |
|---|---|
Tab |
Navigate between input fields |
Enter |
Submit current form |
Ctrl+Q |
Quit the application |
Ctrl+D |
Toggle dark mode |
Ctrl+R |
Rebuild knowledge base |
Ctrl+P |
Preview document matches |
F1 |
Show help |
The TUI interface can be customized by modifying the CSS in askdocs/tui/style.css. This allows you to change colors, layout, and other visual aspects.
Example modifications:
/* Change the background color in light mode */
Screen {
background: #f5f5f5;
}
/* Change the header text color */
Header {
color: #2d79c7;
}The TUI uses the same configuration system as the rest of AskDocs. You can adjust settings through config.json or environment variables:
{
"tui": {
"dark_mode": true,
"show_status_bar": true
}
}The TUI is designed to be responsive and will adapt to the size of your terminal window. For the best experience, use a terminal with at least 80x24 characters.
You can create custom color schemes by modifying the CSS variables in style.css:
:root {
--primary: #2d79c7;
--secondary: #6c757d;
--success: #28a745;
--warning: #ffc107;
--error: #dc3545;
}The TUI works in most modern terminal emulators, including:
- iTerm2
- Windows Terminal
- GNOME Terminal
- Alacritty
- Kitty
Some terminals may have better support for rich text features and colors than others.