https://github.com/szktkfm/clipy
clipy: Manage Your Clipboard History
https://github.com/szktkfm/clipy
cli clipboard clipboard-manager fzf go golang sqlite
Last synced: 5 months ago
JSON representation
clipy: Manage Your Clipboard History
- Host: GitHub
- URL: https://github.com/szktkfm/clipy
- Owner: szktkfm
- License: mit
- Created: 2024-12-08T09:40:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-01-10T14:44:59.000Z (over 1 year ago)
- Last Synced: 2025-03-10T18:39:07.407Z (about 1 year ago)
- Topics: cli, clipboard, clipboard-manager, fzf, go, golang, sqlite
- Language: Go
- Homepage:
- Size: 332 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: history.go
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - clipy - Manage clipboard history. (<a name="copy-paste"></a>Copy/paste and clipboard)
- awesome-cli-apps - clipy - Manage clipboard history. (<a name="copy-paste"></a>Copy/paste and clipboard)
README
# 📋clipy: Manage Your Clipboard History
clipy is a simple tool that saves your clipboard history to a local sqlite database and lets you browse and select entries using an fzf-like interface.

## How to install
To install clipy using Go, run:
```sh
$ go install github.com/szktkfm/clipy/cmd/clipy@latest
```
Or, download it:
[GitHub Releases](https://github.com/szktkfm/clipy/releases)
## How to use
Run `clipy shell` to generate a shell script, and then add it to your zshrc or bashrc file for seamless integration.
```sh
$ clipy shell zsh | tee -a ~/.zshrc
# https://github.com/szktkfm/clipy
# Run daemon
clipy
__clipy_history() {
BUFFER="${BUFFER}"$(clipy history --tmux)
CURSOR=${#BUFFER}
zle redisplay
}
zle -N __clipy_history
# Bind the function to Ctrl+j
bindkey "^j" __clipy_history
```
```sh
$ source ~/.zshrc
```
Use the `clipy` command to start a background daemon. This daemon monitors your clipboard for new entries and saves them to the local sqlite database.
```sh
$ clipy
```
Access your clipboard history with the `clipy history` command. If you've set up the shell integration, you can invoke this with Ctrl + J for quick access.
```sh
$ clipy history
```
Use the `--limit` option to specify the maximum number of entries to display initially.
```sh
$ clipy history --limit 100
```
If you're using tmux, you can display the history in a popup using `tmux display-popup`.
That's it! 🚀
## Future Work or Idea
Sync Across Machines: Integrate with Litestream to sync clipboard history between machines seamlessly.
Clipboard Server: Run clipy as a centralized clipboard server to share and manage history across multiple devices.
## License
[MIT](LICENSE)