easyclip
Version, currently 0.2.05 versions
github.com/kojix2/easyclip
Easy copy and paste for Crystal
Installation
# Add this to your shard.yml
dependencies:
easyclip:
github: kojix2/easyclip
version: ~> 0.2.0Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- MIT
- Author
- kojix2
Dependencies
This version declares no dependencies.
README
EasyClip
Crystal module for clipboard interaction.
Installation
Add to shard.yml:
dependencies:
easyclip:
github: kojix2/easyclip
Run shards install
Usage
require "easyclip"
# Copy 'text' to clipboard
EasyClip.copy("text")
# Paste text from the clipboard
str = EasyClip.paste
Linux
Detects the current session and available tools at runtime:
- Wayland:
wl-copy/wl-paste, then X11/XWayland fallbacks - X11 copy:
xsel - X11 paste:
xclip, thenxsel - WSL:
clip.exe(copy),powershell.exe(paste) - Termux:
termux-clipboard-set/termux-clipboard-get
Install what fits your session, e.g. sudo apt install wl-clipboard xclip xsel.
Commands come from a fixed allowlist, run without a shell, and receive text via stdin.
macOS
Uses the native NSPasteboard API directly. It does not spawn pbcopy or
pbpaste.
Windows
Uses the native Win32 clipboard API (CF_UNICODETEXT): no child process, no
trailing-newline quirk. WSL runs as a Linux binary and uses the Linux fallbacks
above instead.
Contributing
- Fork (https://github.com/kojix2/easyclip/fork)
- Feature branch (
git checkout -b new-feature) - Commit (
git commit -am 'Add feature') - Push (
git push origin new-feature) - Pull request
License
MIT
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.2.0- Tagged
- Jun 12, 2026
- Commit
9a788503c4ee- Indexed
- yes
Dependents
Repository
github.com/kojix2/easyclip
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 22, 2026
- Synced
- Sep 22, 2026
- Versions
- 5