Dial
Dial is a code snippet manager built using rust and ratatui.
Features
-
Terminal-First Workflow: Manage all your code snippets without leaving the command line.
-
Search & Syntax Highlighting: Quickly find the code you need and review it with clear syntax highlighting.
-
Responsive Text Editing: Make quick modifications using a gap buffer based editor.
-
Cross-Platform: Runs on Linux, macOS, and Windows, storing data in the appropriate system-native directories.
Installation
To get started with Dial, you need to have the Rust toolchain installed on your system.
-
Clone the repository:
-
Navigate into the project directory:
-
Build and run the application:
The application will automatically create a configuration directory and a
snippets.json
file if they don't exist.
Roadmap
- Navigate Snippet List
- Display Snippets in Editor Panel
- Syntax Highlighting for Code
- Responsive Text Editing with Gap Buffer
- Persist Snippets to Disk
- Live Search by Snippet Title
- Add Snippets from within the TUI
- Remove Snippets from within the TUI
- Implement Command-Line Interface (CLI)
- Add Snippets from the Command Line
- Remove Snippets from the Command Line
- Add Snippets from Clipboard via CLI
- Implement Smooth Scrolling for Snippet List
- Add Vertical Cursor Navigation in Editor
- Implement Fuzzy Finder for Advanced Search
- Tag and Filter Snippets
- Customizable UI and Editor Theming
Configuration
Dial stores its data in a simple JSON file located in your system's standard config directory.
- Linux:
~/.config/dial/snippets.json
- macOS:
~/Library/Application Support/com.mouhamadalmounayar.dial/snippets.json
- Windows:
C:\Users\{YourUser}\AppData\Roaming\mouhamadalmounayar\dial\data\snippets.json
You can manually add or edit snippets in this file. The expected format for each snippet is:
Technology Stack
- Core Application: Rust
- TUI Framework: ratatui
- JSON Handling: serde_json
- Cross-Platform Directories: directories-rs
- Error Handling: anyhow
Contributing
Contributions are welcome! If you have ideas for new features or have found a bug, please open an issue or submit a pull request.