Confidential Journaling @ the Speed of Thought
- Features
- Installation
- Quick Start
- Essential Commands for Post Creation
- Post Viewing Commands
- Command line Options
- Editor Options
- 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
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
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
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 |
Use these commands while viewing a specific post:
-
j
goes one line down -
k
goes one line up -
d
goes one half page down -
u
goes one half page up -
/<term>
will search for a term -
n
goes to the next search term -
N
goes to the previous search term
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 |
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.
- 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
- 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
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.