Skip to content

aarushisingh04/ClipDB

ClipDB - Clipboard History Manager

A lightning-fast, privacy-focused clipboard history manager with fuzzy search

License: MIT Python 3.8+

Features

  • Fuzzy Search: Lightning-fast search through your clipboard history
  • Privacy-First: Local storage only, optional encryption
  • Lightweight: Minimal resource usage
  • Beautiful TUI: Intuitive terminal interface
  • Cross-Platform: Works on Windows, macOS, and Linux
  • Smart Filters: Exclude sensitive patterns (passwords, tokens)
  • Statistics: Track your clipboard usage
  • Auto-Cleanup: Configurable retention policies

Installation

Using pip (Recommended)

pip install ClipDB

From Source

git clone https://github.com/aarushisingh04/ClipDB.git
cd ClipDB
pip install -e .

Quick Start

Start the daemon (runs in background)

ClipDB daemon start

Search clipboard history

ClipDB search

Stop the daemon

ClipDB daemon stop

Usage

Commands

# Start monitoring clipboard
ClipDB daemon start

# Stop monitoring
ClipDB daemon stop

# Check daemon status
ClipDB daemon status

# Search clipboard history (interactive)
ClipDB search

# Search with query
ClipDB search "python code"

# Show recent entries
ClipDB list --limit 20

# Show statistics
ClipDB stats

# Clear all history
ClipDB clear --confirm

# Export history
ClipDB export --output clipboard_backup.json

# Import history
ClipDB import --input clipboard_backup.json

Configuration

Create ~/.config/ClipDB/config.yaml:

database:
  path: ~/.local/share/ClipDB/history.db
  max_entries: 10000
  retention_days: 30

monitoring:
  interval_ms: 500
  max_size_kb: 1024
  deduplicate: true

filters:
  enabled: true
  patterns:
    - "password"
    - "api_key"
    - "token"
    - "secret"
    - "private_key"
  min_length: 3
  max_length: 100000

security:
  encryption_enabled: false
  encryption_key_path: ~/.config/ClipDB/key.enc

ui:
  theme: monokai
  max_preview_length: 200
  fuzzy_threshold: 0.6

Project Structure

ClipDB/
├── ClipDB/
│   ├── __init__.py
│   ├── __main__.py
│   ├── cli.py              # CLI interface
│   ├── daemon.py           # Background monitoring service
│   ├── database.py         # SQLite database handler
│   ├── clipboard.py        # Cross-platform clipboard abstraction
│   ├── search.py           # Fuzzy search engine
│   ├── tui.py              # Terminal UI
│   ├── config.py           # Configuration management
│   ├── filters.py          # Content filtering
│   ├── encryption.py       # Optional encryption
│   └── utils.py            # Utility functions
├── .pre-commit-config.yaml
├── setup.py
├── README.md
└── LICENSE

Development

Setup Development Environment

# Clone repository
git clone https://github.com/aarushisingh04/ClipDB.git
cd ClipDB

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install development dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Run Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=ClipDB --cov-report=html

# Run specific test
pytest tests/test_database.py -v

Code Quality

# Format code
black ClipDB/
isort ClipDB/

# Lint
flake8 ClipDB/
pylint ClipDB/

# Type checking
mypy ClipDB/

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Roadmap

  • Rust rewrite for better performance
  • Image clipboard support
  • Cloud sync (optional, encrypted)
  • Browser extension integration
  • GUI application
  • Vim/Emacs plugins
  • Custom hotkey support

Privacy & Security

ClipDB is designed with privacy in mind:

  • Local Storage Only: All data stays on your machine
  • Optional Encryption: AES-256 encryption for sensitive data
  • Smart Filters: Automatically exclude sensitive patterns
  • No Telemetry: Zero data collection or tracking

Security Best Practices

  1. Enable encryption for sensitive environments
  2. Configure appropriate filters for your use case
  3. Set reasonable retention policies
  4. Regularly audit stored content
  5. Use the exclude patterns feature

License

This project is licensed under the MIT License - see LICENSE file for details.

Acknowledgments

Support

Star History

If you find this project useful, please consider giving it a star!


Made with ❤️ by a developer

About

A lightning-fast, privacy-focused clipboard history manager with fuzzy search.

Topics

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages