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
- Host: GitHub
- URL: https://github.com/zhd4/notesr-cli
- Owner: zHd4
- License: mit
- Created: 2024-10-20T15:30:36.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2026-02-23T17:40:43.000Z (about 1 month ago)
- Last Synced: 2026-02-23T17:57:13.181Z (about 1 month ago)
- Topics: aes, aes-256, cli, encryption, notesr, sqlite
- Language: Java
- Homepage:
- Size: 1.51 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).
[](https://github.com/zHd4/NoteSR-Cli/releases)
[](https://github.com/zHd4/NoteSR-Cli/actions/workflows/ci.yml)
[](https://qlty.sh/gh/zHd4/projects/NoteSR-Cli)
[](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**