Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Terminal to ClipboardNew to Visual Studio Code? Get it now.
Terminal to Clipboard

Terminal to Clipboard

ayung

|
84 installs
| (0) | Free
Pipe Terminal Output to Clipboard (Cody)
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Terminal to Clipboard (cody)

Extension Icon

ℹ️ Forked from Copy/Pipe From Terminal

ℹ️ Major changes to v0.1.0, fixing multi-window copying issues, moving notifications to status bar, and more! See Change log for details!

Copy from vscode's integrated terminal to clipboard on any POSIX-compliant system, even over remote-ssh sessions!

Capture

Use cody

This is simply done by piping the output of any shell command to the cody like:

ls ~ | cody

Copy data to local clipboard

To copy data from the integrated terminal into your local machine's system clipboard, follow these steps:

  1. Open a new integrated terminal (Ctrl+`).

  2. Prepare the output stream you'd like to copy and pipe into to cody. For example something like this:

    ls -1 / | sort | cody
    

Flashing code executed on terminal startup

[!NOTE] You may see an unknown command (something like _bp=...) flashing in a newly opened terminal window.

It's just the definition of a shell function named cody, which writes the piped output into a temporary file, triggering VSCode's File System Watcher.

ℹ️ You can inspect the code in init.sh 🍏

[!NOTE] I tried to hide the command using some ANSI terminal control codes, but it is not the most portable solution in the world

Toggle ON/OFF

You can toggle ON/OFF the extension via the Terminal to Clipboard: Toggle (Enable/Disable) command. You can also do this via the settings UI or JSON file (terminal-to-clipboard.enabled).

Change alias name

ℹ️ You can change the alias to something other than cody, with the following: Capture

Build it yourself

  1. Download the required packages In the cody repository, assuming you have npm installed, run the following

    npm install
    
  2. Generate the out files

    vsce package
    
  3. Press F5 in VSCode with extension.ts open in editor, and choose VSCode Extension Development

⚠️ For now, this extension is just available for UNIX-compatible systems (Linux & macOS).

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft