MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / copyToClipboard

Function copyToClipboard

devctx/src/utils/clipboard.ts:8–17  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

6 * Falls back gracefully in headless / CI environments.
7 */
8export async function copyToClipboard(text: string): Promise<boolean> {
9 try {
10 await clipboardy.write(text);
11 return true;
12 } catch {
13 // Headless environment — clipboard not available
14 console.log(chalk.yellow("⚠ Clipboard not available (headless environment?). Use --stdout instead."));
15 return false;
16 }
17}

Callers 1

resumeCommandFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected