An open API service indexing awesome lists of open source software.

https://github.com/zhd4/notesr-cli

NoteSR-Cli can process exports from NoteSR
https://github.com/zhd4/notesr-cli

aes aes-256 cli encryption notesr sqlite

Last synced: about 1 month ago
JSON representation

NoteSR-Cli can process exports from NoteSR

Awesome Lists containing this project

README

          

# NoteSR-Cli

**NoteSR-Cli** is a cross-platform command-line utility designed to process exports from [NoteSR](https://github.com/zHd4/NoteSR).

[![GitHub release](https://img.shields.io/github/v/release/zHd4/NoteSR-Cli)](https://github.com/zHd4/NoteSR-Cli/releases)
[![Java CI](https://github.com/zHd4/NoteSR-Cli/actions/workflows/ci.yml/badge.svg)](https://github.com/zHd4/NoteSR-Cli/actions/workflows/ci.yml)
[![Maintainability](https://qlty.sh/gh/zHd4/projects/NoteSR-Cli/maintainability.svg)](https://qlty.sh/gh/zHd4/projects/NoteSR-Cli)
[![Code Coverage](https://qlty.sh/gh/zHd4/projects/NoteSR-Cli/coverage.svg)](https://qlty.sh/gh/zHd4/projects/NoteSR-Cli)

## ๐Ÿš€ Quick Start

```bash
git clone https://github.com/zHd4/NoteSR-Cli.git
cd NoteSR-Cli
./gradlew build

# After build
cd build/notesr-cli/bin
./notesr-cli --help
```

Or download the [latest version](https://github.com/zHd4/NoteSR-Cli/releases/tag/v1.1.2) from the [Releases page](https://github.com/zHd4/NoteSR-Cli/releases).

---

## ๐ŸŽฏ What It Does

NoteSR-CLI allows you to:

* ๐Ÿ”“ Decrypt `.notesr.bak` backups from NoteSR (AES-256 encrypted)
* ๐Ÿง  Read notes and list files directly from the SQLite database
* ๐Ÿ“ฆ Compile a SQLite backup into a valid `.notesr.bak` file
* ๐Ÿ“Œ Attach and extract files from notes
* ๐Ÿ” Inspect and manage your encrypted notes via terminal

---

## โš™๏ธ Commands Overview

### ๐ŸŸข General Help

```bash
./notesr-cli --help
```

---

### ๐Ÿ”“ `decrypt`

Decrypts a NoteSR `.notesr.bak` file into a readable SQLite database.

```bash
./notesr-cli decrypt /path/to/backup.notesr.bak /path/to/crypto_key.txt -o output.notesr.db
```

* `file_path` โ€” path to the encrypted `.notesr.bak` file
* `key_path` โ€” path to the AES key file (text format)
* `-o` โ€” optional output path (defaults to `bak_file_name.notesr.db`)

---

### ๐Ÿ“ฆ `compile`

Compiles a SQLite NoteSR backup into an encrypted `.notesr.bak` file.

```bash
./notesr-cli compile notes.notesr.db crypto_key.txt -o backup.notesr.bak
```

* `db_path` โ€” SQLite database file
* `key_path` โ€” AES key file (text)
* `-o` โ€” output `.notesr.bak` file

---

### ๐Ÿ“„ `list-notes`

Lists all notes from the decrypted SQLite database.

```bash
./notesr-cli list-notes notes.notesr.db
```

---

### ๐Ÿง’ `read-note`

Displays the full content of a specific note.

```bash
./notesr-cli read-note notes.notesr.db NOTE_ID
```

---

### ๐Ÿ“ `list-files`

Lists all files attached to a specific note.

```bash
./notesr-cli list-files notes.notesr.db NOTE_ID
```

---

### ๐Ÿ“ฅ `get-file`

Extracts a file attached to a note and saves it to disk.

```bash
./notesr-cli get-file notes.notesr.db NOTE_ID FILE_ID -o ./output_dir
```

* `NOTE_ID` โ€” ID of the note
* `FILE_ID` โ€” ID of the file attachment
* `-o` โ€” output file or directory path (optional)

---

### ๐Ÿ“ค `put-file`

Attaches a local file to a specific note.

```bash
./notesr-cli put-file notes.notesr.db NOTE_ID /path/to/local/file.jpg
```

---

## ๐Ÿงช Run Tests

```bash
./gradlew test
```

---

## โš–๏ธ License
[MIT](https://raw.githubusercontent.com/zHd4/NoteSR-Cli/refs/heads/master/LICENSE)

---

## ๐Ÿ“œ Requirements

* Java 21+
* Gradle (optional โ€” project includes wrapper)

---

## ๐Ÿ“Œ Project Details

* Language: **Java**
* CLI Framework: **Picocli**
* DB Layer: **JDBI** (SQLite)
* Crypto: **AES-256**, compatible with NoteSR Android
* Logging: **SLF4J + SimpleLogger**