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

https://github.com/ricardoliveira5ro/clipvault

Clipboard manager for the terminal built with Node.js. Easily store, search, pin, remove, and interact with clipboard history
https://github.com/ricardoliveira5ro/clipvault

cli-tool coverage jest nodejs

Last synced: 10 months ago
JSON representation

Clipboard manager for the terminal built with Node.js. Easily store, search, pin, remove, and interact with clipboard history

Awesome Lists containing this project

README

          

# ClipVault

A powerful and flexible clipboard manager for the terminal, built with Node.js.
Easily store, search, pin, remove, and interact with clipboard history โ€” all from your command line.

### โšก Features

- ๐Ÿ“ฅ Automatically watch and save clipboard contents
- ๐Ÿ” Multiple query search
- ๐Ÿ“Œ Pin and unpin entries
- ๐Ÿงน Clear old or unwanted clipboard entries
- ๐Ÿงพ Easily copy previous entries back to clipboard
- ๐Ÿ’พ Persistent history saved locally in JSON format


### ๐Ÿ“ฆ Installation

```
git clone https://github.com/ricardoliveira5ro/ClipVault.git
cd clipvault
npm install
```

Globally CLI usage

```
npm link
```


### ๐Ÿš€ Usage

##### ๐ŸŸข Start Watching Clipboard

```bash
clipvault watch
```
Continuously monitors clipboard changes and saves them

##### ๐Ÿ“„ List All Entries

```bash
clipvault list
```

##### ๐Ÿ” Search Clipboard History

```bash
clipvault search --query "password"
clipvault search --date "2025-07-01"
clipvault search --pinned
clipvault search --min-size 10 --max-size 1000
```

##### ๐Ÿ“Œ Pin/Unpin an Entry

```bash
clipvault pin
clipvault unpin
```

##### โŒ Remove an Entry

```bash
clipvault remove
clipvault remove --force # Remove pinned
```

##### ๐Ÿงน Clear Entries

```bash
clipvault clear
clipvault clear --days 7 # Clears entries older than 7 days
clipvault clear --days 7 --force
```

##### ๐Ÿ“‹ Copy an Entry

```bash
clipvault copy
```
Copies the clipboard entry with given ID back into the system clipboard.


### ๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป Developer Guide

๐Ÿงช Running Tests
```
npm run test
```
Mocks are created using `jest.unstable_mockModule` for ESM compatibility

โœ… Coverage
```
npm run coverage
```
Current code coverage: 97.93%

![Coverage Report](./__tests__/coverage.png)


### ๐Ÿ“ File Structure

```python
โ”œโ”€โ”€ ๐Ÿ“‚ bin/
โ”‚ โ”œโ”€โ”€ ๐Ÿ“„ index.js/ # CLI entry point
โ”œโ”€โ”€ ๐Ÿ“‚ commands/ # CLI commands
โ”œโ”€โ”€ ๐Ÿ“‚ lib/ # Shared utility modules
โ”œโ”€โ”€ ๐Ÿ“‚ __tests__/ # Unit tests
โ”œโ”€โ”€ ๐Ÿ“„ jest.config.cjs
โ”œโ”€โ”€ ๐Ÿ“„ package.json
โ””โ”€โ”€ ๐Ÿ“„ README.md
```