tui-journal

Your journal app if you live in a terminal

https://github.com/ammarabouzor/tui-journal

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.3%) to scientific vocabulary

Keywords

command-line-interface command-line-tool journal rust terminal terminal-app tui
Last synced: 6 months ago · JSON representation ·

Repository

Your journal app if you live in a terminal

Basic Info
Statistics
  • Stars: 597
  • Watchers: 10
  • Forks: 18
  • Open Issues: 14
  • Releases: 30
Topics
command-line-interface command-line-tool journal rust terminal terminal-app tui
Created almost 3 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation Codeowners

README.md

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

Fuzzy Finder

Table of Contents

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 colored tags to the journals and use them in the built-in filter.
  • Fuzzy Finder: Locate your desired journal with lightning-fast speed using smart-case search.
  • Smart 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
  • History management with Undo and Redo actions to easily revert or reapply changes in your entries
  • 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.
  • Easily cycle through tags in the main view with a single command <Ctrl-t>, applying the current filter for quick navigation.
  • See the keybindings from inside the app
  • Cross-platform compatibility (Windows, macOS, Linux, NetBSD).

Roadmap

Back-ends:

  • [x] Plain text JSON back-end.
  • [x] Database back-end using SQLite.
  • [ ] RESTful back-end server with a client in the app. #### Application:
  • [x] Edit journals content with external text editor from within the app.
  • [x] Filter & Search functionalities.
  • [x] Customize themes.
  • [ ] Preview mode for journals supporting Mark Down highlighting and word wrapping.
  • [ ] Add mouse support
  • [ ] Improve app input and rending cycle using app events to support real concurrency within the app.

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:

bash pacman -S tui-journal

Alpine Linux

TUI-Journal is available for Alpine Edge. It can be installed via apk after enabling the testing repository.

bash apk add tui-journal

FreeBSD

On FreeBSD, you can install TUI-Journal by using pkg:

bash pkg install -y tui-journal

NetBSD

On NetBSD a pre-compiled binary built with default features is available from the official repositories. To install it, simply run:

bash pkgin install tui-journal

Nix

TUI-Journal is available on the Nix package manager. You can install it using the following commands:

```bash

On NixOS:

nix-env -iA nixos.tui-journal

On Non NixOS:

nix-env -iA nixpkgs.tui-journal ``` For more information, visit the TUI-Journal package page on Nix.

Homebrew (macOS and Linux)

For macOS and Linux users, TUI-Journal can be installed via Homebrew using a direct installation method:

bash brew install AmmarAbouZor/homebrew-tui-journal/tui-journal

Build & Install via Cargo

Ensure you have Rust installed on your system.

Install with default features:

To install TUI-Journal with default features (SQLite and JSON), you can use cargo to install directly from crates.io:

bash cargo install tui-journal --locked

Install nightly version:

To use the current nightly version, you can install it directly from the GitHub repository

bash cargo install --git https://github.com/ammarabouzor/tui-journal

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:

bash cargo install tui-journal --locked --no-default-features --features json

To install TUI-Journal with only the SQLite back-end feature, use the following command:

bash cargo install tui-journal --locked --no-default-features --features sqlite

Usage

Once installed, you can run TUI-Journal by typing tjournal in your terminal:

bash $ tjournal

To view the available arguments and commands, you can use the --help or -h flag:

```bash $ tjournal --help

Usage: tjournal [OPTIONS] [COMMAND]

Commands: print-config Print the current settings including the paths for the backend files [aliases: pc] import-journals Import journals from the given transfer JSON file to the current back-end file [aliases: imj] assign-priority Assign priority for all the entries with empty priority field [aliases: ap] theme Provides commands regarding changing themes and styles of the app [aliases: style] help Print this message or the help of the given subcommand(s)

Options: -j, --json-file-path Sets the entries Json file path and starts using it -s, --sqlite-file-path Sets the entries sqlite file path and starts using it -b, --backend-type Sets the backend type and starts using it [possible values: json, sqlite] -c, --config

Specifies the path for the configuration directory. Configuration files is considered as root for themes file too. It still accepts the path for configuration file for backward compatibility. (default path: /tui-journal/) -v, --verbose... Increases logging verbosity each use for up to 3 times -l, --log Specifies a file to use for logging (default file: /tui-journal/tui-journal.log) -h, --help Print help -V, --version Print version ```

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:

```toml backend_type = "Sqlite" # Available options: Json, Sqlite. Default value: Sqlite.

defaultjournalpriority = 3 # Sets the suggested priority while creating a new journal

scrollperpage = 5 # Sets how many journals will be scrolled when using page up/down commands

syncosclipboard = false # Syncs editor clipboard actions with operating system clipboard

history_limit = 10 # Sets the maximum changes limit for the undo & redo stacks. Use 0 to disable it.

colored_tags = true # Sets if automatically coloring for tags is enabled.

Sets the visibility option for the datum of journals. Available options:

- show: Render datum in journals list.

- hide: Hide datum without providing an extra empty line for journal without priority value.

- empty_line: Hide datum providing an extra empty line for journal without priority value.

datum_visibility = "show"

Sets the directory where the application persists its state between sessions.

Default are "~//.local/state/tui-journal/" on Linux and "C:\Users\Alice\AppData\Roaming\tui-journal\" on Windows

appstatedir = "/tui-journal/"

[export] defaultpath = "<Absolutepathtoexportdirectory>" # Optional default path to export multiple journals or a single journal's content. Falls back to the current directory if not specified. showconfirmation = true # Show confirmation after successful export. scrollperpage = 5 # Sets how many journals will be scrolled using Page-Up and Page-Down command

[external_editor]

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.

command = "nvim"

Enabling this save the journal content automatically after closing the external editor

auto_save = false

Set the extension of the temporary file used with the external editor.

This influences syntax highlighting in external editor (e.g., "md" for Markdown support).

tempfileextension = "txt"

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"

[jsonbackend] filepath = "/tui-journal/entries.json"

[sqlitebackend] filepath = "/tui-journal/entries.db" ```

Themes

Please refer to the Themes Page for a detailed guide on customizing colors and styles within the app.

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-rs and ratatui crates, 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-texteditor crate, 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 sqlx crate, 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!

License

MIT

Owner

  • Name: Ammar Abou Zor
  • Login: ammarabouzor
  • Kind: user
  • Location: Germany

Trying to make my way into the Rust world after 5 years of C++, C#, WPF

Citation (CITATION.cff)

# Parser settings.
cff-version: 1.2.0
message: Please cite this software using these information.

# Version information.
date-released: 2025-07-28
version: 0.16.1

# Project information.
abstract: Your journal app if you live in a terminal
authors:
  - alias: AmmarAbouZor
    family-names: Abou Zor
    given-names: Ammar
license: MIT
repository-artifact: https://crates.io/crates/tui-journal
repository-code: https://github.com/AmmarAbouZor/tui-journal
title: TUI-Journal
url: https://docs.rs/tui-journal

GitHub Events

Total
  • Create event: 80
  • Release event: 5
  • Issues event: 20
  • Watch event: 216
  • Delete event: 70
  • Issue comment event: 76
  • Push event: 108
  • Pull request review event: 18
  • Pull request event: 142
  • Fork event: 4
Last Year
  • Create event: 80
  • Release event: 5
  • Issues event: 20
  • Watch event: 216
  • Delete event: 70
  • Issue comment event: 76
  • Push event: 108
  • Pull request review event: 18
  • Pull request event: 142
  • Fork event: 4

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 39
  • Total pull requests: 249
  • Average time to close issues: 20 days
  • Average time to close pull requests: 6 days
  • Total issue authors: 21
  • Total pull request authors: 12
  • Average comments per issue: 1.31
  • Average comments per pull request: 0.28
  • Merged pull requests: 156
  • Bot issues: 1
  • Bot pull requests: 195
Past Year
  • Issues: 13
  • Pull requests: 96
  • Average time to close issues: 6 days
  • Average time to close pull requests: 12 days
  • Issue authors: 9
  • Pull request authors: 9
  • Average comments per issue: 1.08
  • Average comments per pull request: 0.34
  • Merged pull requests: 37
  • Bot issues: 1
  • Bot pull requests: 70
Top Authors
Issue Authors
  • AmmarAbouZor (12)
  • orhun (6)
  • itbaby (2)
  • yonas (2)
  • donovanglover (1)
  • qijimrc (1)
  • Arqamz (1)
  • ixzh (1)
  • dependabot[bot] (1)
  • 173brian (1)
  • kevinmatthes (1)
  • RyaIsCoding (1)
  • 0323pin (1)
  • mike-ward (1)
  • HalanoSiblee (1)
Pull Request Authors
  • dependabot[bot] (182)
  • AmmarAbouZor (38)
  • github-actions[bot] (13)
  • orhun (4)
  • kevinmatthes (3)
  • dupgit (2)
  • HalanoSiblee (1)
  • yonas (1)
  • piersolenski (1)
  • kianmeng (1)
  • hedesandxlii (1)
  • Arqamz (1)
Top Labels
Issue Labels
dependencies (1) rust (1)
Pull Request Labels
dependencies (182) rust (148) github_actions (34) documentation (13)

Packages

  • Total packages: 5
  • Total downloads:
    • cargo 40,148 total
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 109
  • Total maintainers: 2
proxy.golang.org: github.com/AmmarAbouZor/tui-journal
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
proxy.golang.org: github.com/ammarabouzor/tui-journal
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 6.5%
Average: 6.7%
Dependent repos count: 6.9%
Last synced: 6 months ago
alpine-edge: tui-journal-doc

Write and manage journals/notes from the terminal (documentation)

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 12.4%
Average: 16.2%
Stargazers count: 21.8%
Forks count: 30.7%
Maintainers (1)
Last synced: 6 months ago
alpine-edge: tui-journal

Write and manage journals/notes from the terminal

  • Versions: 9
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Dependent packages count: 12.4%
Average: 16.2%
Stargazers count: 21.8%
Forks count: 30.7%
Maintainers (1)
Last synced: 6 months ago
crates.io: tui-journal

Tui app allows writing and managing journals/notes from within the terminal With different local back-ends

  • Versions: 33
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 40,148 Total
Rankings
Stargazers count: 20.6%
Dependent repos count: 28.7%
Forks count: 30.9%
Dependent packages count: 33.6%
Average: 41.9%
Downloads: 95.9%
Maintainers (1)
Last synced: 6 months ago