secret-journal
v1.1.3
Published
A private journaling CLI application with AES encryption, designed for fast and secure journaling @ the speed of thought.
Downloads
18
Maintainers
Readme
Table of contents
- Features
- Installation
- Quick Start
- Essential Commands for Post Creation
- Post Viewing Commands
- Command line Options
- Editor Options
Features
- Secure Encryption: Protects your posts using AES-256 encryption
- User Authentication: Ensures only authorized users can access the journal
- Cross-Platform Compatibility: Works on Linux, macOS, and Windows
- Post Management: Create, view, edit, and delete journal entries
- Search Functionality: Easily find posts by keywords or dates
- Interactive Editor: Supports terminal-based text editors for seamless writing
- Hierarchical Post Viewing: View posts by year and month for easy navigation.
- Command Line Arguments: Perform specific actions directly from the terminal
Installation
Before installing, ensure you have downloaded and installed Node.js version 18 or higher. Additionally, make sure you have at least one of the following text editors listed here.
You can install the Secret Journal CLI globally using npm:
npm install -g secret-journal
Quick Start
To use the CLI, just type journal
in your terminal. If it’s your first time using it, an interactive tutorial will start automatically:
journal
Essential Commands for Post Creation
Here are essential commands to quickly get you up to speed with creating posts using your preferred text editor:
| Editor | Command | Description |
| ------ | --------------------- | -------------------- |
| Vim | i
| Enter insert mode |
| | Esc
| Exit insert mode |
| | :wq
| Save and quit |
| | u
| Undo the last change |
| Neovim | i
| Enter insert mode |
| | Esc
| Exit insert mode |
| | :wq
| Save and quit |
| | u
| Undo the last change |
| Vi | i
| Enter insert mode |
| | Esc
| Exit insert mode |
| | :wq
| Save and quit |
| | u
| Undo the last change |
| Nano | Ctrl + O
| Save the file |
| | Ctrl + X
| Exit nano |
| Emacs | Ctrl + X
Ctrl + S
| Save the file |
| | Ctrl + X
Ctrl + C
| Exit emacs |
Post Viewing Commands
Use these commands while viewing a specific post:
j
goes one line downk
goes one line upd
goes one half page downu
goes one half page up/<term>
will search for a termn
goes to the next search termN
goes to the previous search term
Command Line Options
It’s also possible to provide command-line arguments to perform specific actions and then exit the program. For example, journal --create-post
| Param | Type | Description |
| ------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| --new-user | boolean | Register as a new user for managing separate journals or in case you forget your credentials |
| --create-post | boolean | Create a new post in your journal |
| --view-post | boolean | Search for posts by keyword and view a specific post |
| --edit-post | boolean | Search for posts by keyword and edit or delete a specific post |
| --set-editor | boolean | Select a default text editor from the available options on your system to avoid repeated prompts to choose an editor |
| --year | string | Hierarchical view of posts from a specific month and year. For instance, --month=7 --year=2024
shows posts from July 2024. Omitting the --year
flag displays posts from the entered month of the current year |
| --month | string | Hierarchical view of posts from a specific month and year |
| --help | string | Pass a flag such as --help new-user
to learn about specific options, or use --help
to view all available help options |
Editor Options
The following terminal-based editors are compatible with Secret Journal. Ensure at least one of these is installed on your system for detection:
| Editor | Command | Available for |
| ------ | ------- | ------------------------------------------------------------------------------------------- |
| Vim | vim
| Linux, macOS, Windows |
| Neovim | nvim
| Linux, macOS, Windows |
| Vi | vi
| Linux, macOS (preinstalled) |
| Nano | nano
| Linux, macOS |
| Emacs | emacs
| Linux, macOS, Windows |
You can also edit the config.json
file to reset or change your default editor. This file is located in the .secret-journal
directory in your home folder.
Navigating to the config.json
File
Unix, Linux, and macOS:
- Open your terminal.
- Navigate to the
.secret-journal
directory by running:
cd ~/.secret-journal
- Open the config.json file in your preferred text editor. For example, to open it with nano, run:
nano config.json
Windows:
- Open Command Prompt or PowerShell.
- Navigate to the
.secret-journal
directory by running:
cd $env:USERPROFILE\.secret-journal
- Open the
config.json
file in your preferred text editor. For example, to open it with notepad, run:
notepad config.json
Editing the config.json File
The config.json file will contain a JSON object with the defaultEditor
key if a default editor has been set; otherwise, it will be empty.
{
"defaultEditor": "vim"
}
To reset or change your default editor, update the value of the defaultEditor key to one of the listed commands, provided the editor is installed on your operating system. Save the file and close your text editor.