PHPackages                             jalsoedesign/cli-clipboard - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [CLI &amp; Console](/categories/cli)
4. /
5. jalsoedesign/cli-clipboard

ActiveLibrary[CLI &amp; Console](/categories/cli)

jalsoedesign/cli-clipboard
==========================

Enables a clipboard API to get/set and clear the clipboard on various platforms

1.1.0(6y ago)0366↓100%MITPHP

Since Jul 18Pushed 6y ago1 watchersCompare

[ Source](https://github.com/h2ooooooo/php-cli-clipboard)[ Packagist](https://packagist.org/packages/jalsoedesign/cli-clipboard)[ RSS](/packages/jalsoedesign-cli-clipboard/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

php-cli-clipboard
=================

[](#php-cli-clipboard)

Enables a clipboard API to get, set and clear the clipboard on various platforms ([currently Windows and OSX](https://github.com/h2ooooooo/php-cli-clipboard#platform-support)).

Platform Support
----------------

[](#platform-support)

PlatformSupportReads withWrites withWindowsYes ✅[Powershell script](https://gist.github.com/luser/da5ce7e12c6a9591f1a7e9d111743036)[`clip.exe`](https://ss64.com/nt/clip.html)OSXYes ✅[`pbpaste`](https://ss64.com/osx/pbpaste.html)[`pbcopy`](https://ss64.com/osx/pbcopy.html)Linux*NO* ❎Unsupported platforms will use a MockClipboardApi api, that will mimick the clipboard, but won't actually get/set/clear anything apart from its local state.

Installation
------------

[](#installation)

```
composer require jalsoedesign/cli-clipboard

```

Usage
-----

[](#usage)

### Get the current clipboard contents

[](#get-the-current-clipboard-contents)

```
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();

// Get the current contents of the clipboard
$contents = $clipboard->get();

// Print the content
echo $contents;
```

### Set the current clipboard contents

[](#set-the-current-clipboard-contents)

```
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();

// Set the current contents of the clipboard to "foobar"
$clipboard->set('foobar');
```

### Clears the current clipboard contents

[](#clears-the-current-clipboard-contents)

```
// Instantiate the clipboard class
$clipboard = \jalsoedesign\CliClipboard\Clipboard::instance();

// Clear the current clipboard contents
$clipboard->clear();
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

2487d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9b21c12f271f981851aa9e0190050713165d2eef8c4fad0c919628e2834a3c06?d=identicon)[jalsoedesign](/maintainers/jalsoedesign)

---

Top Contributors

[![h2ooooooo](https://avatars.githubusercontent.com/u/1726275?v=4)](https://github.com/h2ooooooo "h2ooooooo (7 commits)")

### Embed Badge

![Health badge](/badges/jalsoedesign-cli-clipboard/health.svg)

```
[![Health](https://phpackages.com/badges/jalsoedesign-cli-clipboard/health.svg)](https://phpackages.com/packages/jalsoedesign-cli-clipboard)
```

###  Alternatives

[wp-cli/wp-cli

WP-CLI framework

5.0k17.2M319](/packages/wp-cli-wp-cli)[consolidation/annotated-command

Initialize Symfony Console commands from annotated command class methods.

22569.8M18](/packages/consolidation-annotated-command)[chi-teck/drupal-code-generator

Drupal code generator

26947.8M5](/packages/chi-teck-drupal-code-generator)[seld/cli-prompt

Allows you to prompt for user input on the command line, and optionally hide the characters they type

24725.8M17](/packages/seld-cli-prompt)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[php-tui/php-tui

Comprehensive TUI library heavily influenced by Ratatui

589747.0k6](/packages/php-tui-php-tui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
