TUI-Journal
TUI-Journal is a terminal-based application written in Rust that allows you to write and manage your journal/notes from within the comfort of your terminal. It provides a simple and efficient interface for creating and organizing your thoughts, ideas, and reflections. TUI-Journal supports two different local back-ends: a plain text back-end in JSON format and a database back-end using SQLite.
Demo
Table of Contents
- Features
- Roadmap
- Installation
- Usage
- Configuration
- Documentation
- Acknowledgments
- Contributing
- License
Features
- Write and manage journal/notes entries from the terminal.
- Store your entries in either a plain text file using the JSON format or a SQLite database.
- Intuitive, responsive and user-friendly text-based user interface (TUI).
- Create, edit, and delete entries easily.
- Edit journal content with the built-in editor or use your favourite terminal text editor from within the app.
- Add custom tags to the journals and use them in the built-in filter.
- Fuzzy Finder: Locate your desired journal with lightning-fast speed.
- Search functions for journals title and content in the built-in filter.
- Sort the journals based on their date, priority and title.
- Control many journals at once via the multi-select mode
- Keybindings is a combination of VIM and Emacs motions (VIM for navigation and Emacs for editing texts in edit-mode).
- Utilize Editor's Visual Mode for VIM-style text selection, copying, and deletion.
- Export and Import journals between different back-end files.
- Export the current journal's content to a predefined export path or the current directory
- Transfer text between the built-in editor and the system clipboard using Cut, Copy, and Paste.
- Optionally sync the clipboard between the built-in editor and the operating system, with vim and emacs keybindings.
- Sorting and full-screen preferences in the App State will be retained.
- See the keybindings from inside the app
- Cross-platform compatibility (Windows, macOS, Linux, NetBSD).
Roadmap
Back-ends:
- Plain text JSON back-end.
- Database back-end using SQLite.
- RESTful back-end server with a client in the app.
Application:
- Edit journals content with external text editor from within the app.
- Filter & Search functionalities.
- Add mouse support
- Preview mode for journals supporting Mark Down highlighting and word wrapping.
- Improve app input and rending cycle using app events to support real concurrency within the app.
- Customize themes and keybindings.
Installation
Grab the most recent pre-built binaries for your platform from the Releases page, or utilize the available package managers.
Arch Linux
On Arch Linux, you can install TUI-Journal by using pacman:
Alpine Linux
TUI-Journal is available for Alpine Edge. It can be installed via apk after enabling the testing repository.
NetBSD
On NetBSD a pre-compiled binary built with default features is available from the official repositories. To install it, simply run:
Build & Install via Cargo
Ensure you have Rust installed on your system.
The minimum required Rust version is 1.75.0
Linux Dependencies:
Make sure the OpenSSL development package is installed on your system.
- Ubuntu/Debian:
- Fedora:
Install with default features:
To install TUI-Journal with default features (SQLite and JSON), you can use cargo to install directly from crates.io:
Install nightly version:
To use the current nightly version, you can install it directly from the GitHub repository
Install with Specific Features:
You can choose to install TUI-Journal with specific features enabled or disabled by customizing the cargo installation command. To install TUI-Journal with only the JSON back-end feature, use the following command:
To install TUI-Journal with only the SQLite back-end feature, use the following command:
Usage
Once installed, you can run TUI-Journal by typing tjournal in your terminal:
To view the available arguments and commands, you can use the --help or -h flag:
)
)
()
Configuration
The configuration for TUI-Journal can be found in the config.toml file located in the configuration folder within the TUI-Journal directory.
Here is a sample of the settings in the config.toml file:
= "Sqlite" # Available options: Json, Sqlite. Default value: Sqlite.
= 3 # Sets the suggested priority while creating a new journal
= 5 # Sets how many journals will be scrolled when using page up/down commands
= false # Syncs editor clipboard actions with operating system clipboard
[]
= "<Absolute_path_to_export_directory>" # Optional default path to export multiple journals or a single journal's content. Falls back to the current directory if not specified.
= true # Show confirmation after successful export.
= 5 # Sets how many journals will be scrolled using Page-Up and Page-Down command
[]
# Set the external terminal editor to use from within the app.
# If the value isn't set the app will try to retrieve the editor from git global configurations then It'll try with the environment variables VISUAL, EDITOR then it'll fallback to vi.
= "nvim"
# Enabling this save the journal content automatically after closing the external editor
= false
# Note: external_editor can still be configured in one line to set the command. In that case, the default values for the other fields will be used
# external_editor = "nvim"
[]
= "<Documents-folder>/tui-journal/entries.json"
[]
= "<Documents-folder>/tui-journal/entries.db"
Documentation
For detailed information about the TUI Journal app, including usage guide, keymaps, and configuration details, please refer to the Wiki.
Acknowledgments
TUI-Journal would not have been possible without the following open-source crates:
-
tui-rs and its revival ratatui: TUI-Journal utilizes the
tui-rsandratatuicrates, which provide a framework for building terminal user interfaces in Rust. They offer a wide range of components and utilities to create interactive and responsive TUI applications. -
tui-texteditor: TUI-Journal leverages the
tui-texteditorcrate, which offers a text editor widget specifically designed for terminal-based applications. It provides functionalities such as text manipulation, cursor movement, and scrolling within the TUI environment. -
sqlx: TUI-Journal benefits from the
sqlxcrate, which is a Rust library for interacting with databases. It enables seamless integration with SQLite, allowing TUI-Journal to store journal entries and notes in a reliable and efficient manner.
These crates have greatly contributed to the development of TUI-Journal, and the project extends its gratitude to the maintainers and contributors of these fantastic open-source libraries.
Contributing
As the author of TUI-Journal and being new to the open-source community, I would greatly appreciate any contributions from experienced developers. Your contributions can help enhance the functionality, usability, and overall quality of TUI-Journal.
If you have any ideas, bug reports, or feature requests, please don't hesitate to open an issue on the TUI-Journal. Your feedback and input are invaluable in improving the application.
If you would like to contribute code, documentation, or any other form of assistance, I am open to collaboration. Please reach out through the GitHub repository and let's discuss how you can contribute to TUI-Journal.
Thank you for considering contributing to TUI-Journal. Your support is highly appreciated!