1.1.3 • Published 12 months ago

secret-journal v1.1.3

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

Demo

Table of contents

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

Initial tutorial upon first login

Essential Commands for Post Creation

Here are essential commands to quickly get you up to speed with creating posts using your preferred text editor:

EditorCommandDescription
VimiEnter insert mode
EscExit insert mode
:wqSave and quit
uUndo the last change
NeovimiEnter insert mode
EscExit insert mode
:wqSave and quit
uUndo the last change
ViiEnter insert mode
EscExit insert mode
:wqSave and quit
uUndo the last change
NanoCtrl + OSave the file
Ctrl + XExit nano
EmacsCtrl + X Ctrl + SSave the file
Ctrl + X Ctrl + CExit emacs

Post Viewing Commands

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

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

ParamTypeDescription
--new-userbooleanRegister as a new user for managing separate journals or in case you forget your credentials
--create-postbooleanCreate a new post in your journal
--view-postbooleanSearch for posts by keyword and view a specific post
--edit-postbooleanSearch for posts by keyword and edit or delete a specific post
--set-editorbooleanSelect a default text editor from the available options on your system to avoid repeated prompts to choose an editor
--yearstringHierarchical 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
--monthstringHierarchical view of posts from a specific month and year
--helpstringPass 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:

EditorCommandAvailable for
VimvimLinux, macOS, Windows
NeovimnvimLinux, macOS, Windows
ViviLinux, macOS (preinstalled)
NanonanoLinux, macOS
EmacsemacsLinux, 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:

  1. Open your terminal.
  2. Navigate to the .secret-journal directory by running:
cd ~/.secret-journal
  1. Open the config.json file in your preferred text editor. For example, to open it with nano, run:
nano config.json

Windows:

  1. Open Command Prompt or PowerShell.
  2. Navigate to the .secret-journal directory by running:
cd $env:USERPROFILE\.secret-journal
  1. 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.

1.1.3

12 months ago

1.1.2

12 months ago

1.1.1

12 months ago

1.1.0

12 months ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago