TUIDE (pronounced "too-ee-dee" or like "GUIDE" with a "T") aims to be a lightweight, extensible, and keyboard-centric terminal-based IDE or code editor, built using Python and the Textual TUI framework.
It's designed for developers who love the terminal but desire features typically found in graphical IDEs, such as LSP support, code navigation, and a more integrated project management experience than a simple editor + terminal setup.
- Terminal First: Embrace the terminal environment. Fast, efficient, and available everywhere.
- Keyboard Centric: Most operations should be achievable quickly via keyboard shortcuts and a command palette.
- Extensible: Allow users to add functionality through Python macros/plugins and custom configurations.
- LSP Powered: Leverage the Language Server Protocol for rich language features (completion, diagnostics, navigation).
- Python & Textual: Built with modern Python and the excellent Textual framework for a rich TUI.
- Resource Efficient: Aim to be lighter than many Electron-based IDEs.
- Configurable: Hierarchical configuration system (default, user, project) for easy customization.
TUIDE is a terminal-based IDE built with Python and Textual.
-
Prerequisites:
- Python 3.11 or newer.
pip(Python package installer).
-
Installation / Setup:
- Clone the repository:
git clone [Repository URL Placeholder] # Replace with actual URL later cd tuide
- Install dependencies:
pip install -r requirements.txt
-
Running TUIDE:
- From the root
tuidedirectory of the cloned repository, run:
python tuide/main.py [path_to_project_directory_or_file]
- If no path is provided, TUIDE will open in the current working directory from where you execute the command.
- Examples:
python tuide/main.py .(Opens current directory)python tuide/main.py /path/to/your/projectpython tuide/main.py /path/to/your/file.py(Opens the file and its directory in explorer)
- From the root
-
Configuration:
- TUIDE loads configurations in the following order (later files override earlier ones):
tuide/config/default.json(Ships with TUIDE)- User global:
~/.config/tuide/config.json(on Linux/macOS) or platform equivalent (exact path might vary based on OS standards, currentlyConfigManagerneeds explicit paths). - Project local:
[project_root]/.tuide/config.json
- The system-wide configuration (e.g.,
/etc/tuide/config.json) is planned but not yet implemented inConfigManager. - To customize, copy
tuide/config/default.jsonto your user or project location and modify it. - LSP Servers: For language features like auto-completion and diagnostics, you need to install the respective Language Server Protocol (LSP) servers. For Python,
pylspis recommended (pip install python-lsp-server[all]). Checkdefault.jsonforlsp_serversconfigurations and ensure thecommandis correct for your setup and the server isenabled: true.
- TUIDE loads configurations in the following order (later files override earlier ones):
-
Macros:
- Create a directory named
.tuide/macros/in your project's root. - Place Python files (
*.py) in this directory. Each file should contain a functionrun_macro(app_context)which will be callable from TUIDE (e.g., via command palette, planned).
- Create a directory named
- Project Configuration Cascade: ✅ Implemented. (Default, User, Project settings via
ConfigManager). - LSP Integration: 🟡 Initial stub implemented for LSP client communication. Full support for specific languages (e.g., Python via pylsp) is in progress.
- Syntax Highlighting & Folding: ✅ Textual's
TextAreaprovides syntax highlighting via Pygments if language is set. Tree-sitter integration for advanced highlighting and folding is planned. Basic folding is inherent toTextArea. - Python Macros: ✅ Implemented. (Macros loaded from
[project_root]/.tuide/macros/viaMacroRunner). - Debug/Run/Test Instructions: ✅ Implemented. (Custom commands via
CommandRunner, output inTerminalWidget). - Textual-based TUI Interface:
- Tabbed code editors (
EditorWidgetbased onTextArea): ✅ Implemented. - Dockable file explorer (
FileExplorerWidget): ✅ Implemented (defaults to left dock). - Integrated terminal output area (
TerminalWidget): ✅ Implemented (for command output, not yet a fully interactive user-toggleable panel). - Resizable panels: ✅ Provided by Textual's layout system.
- Command palette (
Ctrl+P): 🟡 Bound, but placeholder/planned. - Status bar and notifications: ✅ Basic status via Footer;
app.notifyfor notifications. - Themeable via config: ✅ Basic theming supported via
default.json(theme colors can be set).
- Tabbed code editors (
- Code Navigation and Refactoring: ⏳ LSP-powered (Planned).
- Build System Integration: ⏳ (Planned).
- Version Control (Git) Integration: ⏳ (Planned).
- Tooling and Templates: ⏳ (Planned - e.g., project creation from templates, common tasks).
tuide/
├── core/ # Core logic, state, configuration (ConfigManager, Workspace, CommandRunner, MacroRunner)
├── ui/ # Main Textual UI components (EditorWidget, FileExplorerWidget, TerminalWidget)
├── lsp/ # LSP client integration (LSPClient stub)
├── widgets/ # Shared custom widgets (e.g., WelcomeWidget)
├── macros/ # Example macros (directory for user project would be .tuide/macros/)
├── config/ # Default configurations (default.json)
├── plugins/ # Structure for optional external integrations (planned)
├── main.py # Application entry point
└── main.tcss # Main stylesheet for the applicationConfigManager: Loads and merges hierarchical JSON configurations (default, user, project) and resolves placeholders.EditorWidget: TextualTextArea-based widget for code editing, supports file I/O and language-specific syntax highlighting.TerminalWidget: Uses Textual'sRichLogto display output from shell commands executed asynchronously.CommandRunner: Resolves command strings with dynamic placeholders and executes them, typically via theTerminalWidget.MacroRunner: Discovers, loads, and executes Python macros (sync/async) from[project_root]/.tuide/macros/, providing an application context.LSPClient: Initial stub for managing Language Server Protocol communications (start/stop server, send/receive messages).Workspace: Manages the state of the current project, including root path, open files, and the active file.FileExplorerWidget: UI widget based on Textual'sDirectoryTreefor browsing and selecting files/directories.WelcomeWidget: A simple placeholder widget displayed in the editor area when no files are open.main.py (TUIDEApp): The main Textual application class, orchestrating UI and core components.
Ctrl+Q: Quit ApplicationCtrl+S: Save Active EditorCtrl+W: Close Active TabCtrl+P: Command Palette (Placeholder)- File selection in Explorer: Opens file in a new tab or focuses existing tab.
(More to be added as development progresses)
- Configuration: Most aspects will be configurable via JSON files.
- Macros: Users can write custom Python scripts (macros) to automate tasks or add simple features. These macros will have access to parts of the TUIDE application context.
- Plugin API (Planned): A more formal plugin API is planned to allow deeper integration of new functionalities, such as version control integration, debug adapters, custom panels, etc.
- [✅] Minimal TUI editor with file I/O and tabbing.
- [✅] Configuration loader and command runner.
- [🟡] LSP integration (Client stub implemented, full features in progress).
- [✅] Macros and basic UI panels (File Explorer, Editor Tabs, Welcome Screen, Terminal Output).
- [🔜] Plugin API design and initial implementation.
- [⏳] Debugger support (via DAP - Debug Adapter Protocol).
- [⏳] Advanced Tree-sitter integration for syntax highlighting and code intelligence.
- [⏳] Git integration.
- [⏳] More UI elements (fully interactive terminal panel, status bar enhancements, etc.).
- [⏳] Comprehensive test suite.
(✅ Implemented, 🟡 In Progress, 🔜 Planning, ⏳ Planned)
- Python 3.11+
- Dependencies (see
requirements.txt):textualpygls(for LSP types, and potentially server-side features if TUIDE ever hosts one)watchdog(planned for file system watching)jsonschema(planned for config validation)
Contributions are welcome! If you're interested in helping, please check out the open issues or propose new features. (Detailed contribution guidelines will be added later.)
This project is licensed under the MIT License - see the LICENSE file for details.