No Description

jasonm23 232fcce0a5 Resync web [release] 11 months ago
.github cb21d64c7c Add comment to workflow to show release trigger 11 months ago
CutBox 2309c8cf88 CutBox Release: pre-release 1.5.6-11258 11 months ago
bin 7c7ed14053 Remove dependency on xcbeautify 11 months ago
cutbox.github.io @ 539dd60a02 232fcce0a5 Resync web [release] 11 months ago
cutbox.wiki @ c7223597c7 99cc6d8207 1.4.21 1 year ago
cutbox_command a4e6159949 Fix issues for Codacy.com 11 months ago
.codeclimate.yml 7adbdc5701 Specs excluded from codeclimate 3 years ago
.gitignore 1152bf23ad Add cutbox shell command 1 year ago
.gitmodules 9f0c5c80ab unlink cutbox homebrew 1 year ago
.swiftlint.yml 6e50cbfe87 Fix linting to ignore pods 1 year ago
Brewfile c34cea00cf Add ripgrep 1 year ago
LICENSE be22e9a32f License under GNU GPL3 6 years ago
README.md 3a14fa28f4 Update README.md [release] 1 year ago
package-lock.json 9b84725399 Fix npm dev dependencies 1 year ago
package.json 9b84725399 Fix npm dev dependencies 1 year ago
release-notes.md 8991da1427 Update release notes 6 years ago

README.md

  

CutBox

Text Clipboard Manager for MacOS

GitHub release (latest SemVer)

Sponsor

CutBox is a clipboard manager for MacOS, designed for developers. It is used to manage and organize text copied from various sources. Some of its features include fuzzy matching, regular expression search, favorites, and the ability to transform text by pasting multiple clipboard entries at once. CutBox works by saving any text copied on MacOS to its history, which can be accessed using a global hotkey. The program supports shortcuts for exiting the search, pasting selected items, and opening the preferences. CutBox can be installed using Homebrew Cask or Homebrew.


CutBox has JavaScript features that allow you to process text before pasting it. To use this feature, you need to have a file named ~/.cutbox.js in your home directory. This file can contain custom JavaScript code that will be executed when you paste text using CutBox.

You can access this feature by selecting an item from the CutBox clipboard history and then pressing CmdEnter. This will open the JavaScript processing dialog where you can enter or modify the JavaScript code to process the text. When you're done, press Enter to apply the processing and paste the modified text.

The JavaScript parser will recognize require(javascript_file) and shellCommand(command_args) to give you complete flexibility, and lets you process text through any js library or shell command before pasting it at your cursor.

Note that the JavaScript code should be safe and not contain any malicious code. Always be careful when running code from untrusted sources.


Cutbox also has a command-line interface called cutbox. It allows you to fetch items from history, filter by search, and get n entries from the most recent or searched items. See below


Originally Inspired by JumpCut & Flycut

Using CutBox

Any text you copy on MacOS is saved to CutBox's history.

CutBox Search is activated using a global hotkey:

Cmd + Shift + V

(This can be customized in preferences.)

Searching and pasting

With the CutBox window open, search for anything you copied.

Press Enter and the selected item will paste into your current app.

To exit press Esc.

Shortcuts / Key commands:

Shortcut Keys Action
Esc exit search
Ctrlg exit search
Enter Paste selected
CmdEnter Paste through JavaScript Functions selected (you'll need ~/.cutbox.js set up)
CmdComma open preferences
CmdDelete Delete selected item(s)
CmdComma open preferences
Cmdt toggle color themes
Cmdp toggle preview
CmdShift= zoom/scale up text
CmdShift- zoom/scale down text
CmdShift0 reset text scale/zoom
Cmds toggle search modes, fuzzy match, regexp/i or regexp
Cmdf toggle search favorites / everything (use the right click menu, to favorite)

Status bar menu

Install via Homebrew Cask

Install the compiled package.

brew tap cutbox/cutbox
brew install --cask cutbox

Install via Homebrew

For advanced users. Builds the package from source, full Xcode installation needed.

brew tap cutbox/cutbox
brew install cutbox

First run

When you first run CutBox Macos will prompt you that the developer cannot be identified.

Please read this post from Apple.

If you prefer to install open source software that isn't notarized (such as CutBox, or Chromium) on your Mac, you can do this in the terminal.

sudo spctl --master-disable

I only recommend this if you feel comfortable using free software that you can code audit. CutBox is code audited by Codacy. However it doesn't participate in Apple's anti opensource gatekeeper / notarisation system or any other parts of Apple's Walled Garden.

CutBox will be free and open forever, and is licensed under GNU/GPL3, so the source is always available.

Dmg/.app builds are produced by Github Workflow actions, so you can also inspect the entire test/deploy/delivery chain. (as of Sept 2022)

Enable automatic paste.

Before CutBox can paste for you (when you select something and hit enter that is.) You have to enable it to control the keyboard.

Go to System Preferences -> Security & Privacy -> Privacy -> Accessibility

Unlock and add CutBox to the list of apps (also switch on the check box next to its icon).

Do the same for input monitoring...:

Go to System Preferences -> Security & Privacy -> Privacy -> Input Monitoring

Make sure CutBox is in the list and its checkbox is on.

These work best before CutBox is run. (Macos will suggest restarting CutBox anyway, wait for the CutBox icon to appear before changing a checkbox in security preferences.)

FYI If you're upgrading, you'll need to remove and re-add the new CutBox.app.

Command line access

The CutBox repo includes a command line tool to access history.

Usage:

cutbox [-f query] [limit]

History items can be filtered by Query (string contained in a history item)

Limit will show the top n items (after filtering if used.)

The command line tool must be compiled at the moment, from the cutbox_command folder you can run:

swift build -c release; cp .build/release/cutbox /usr/local/bin/

This will build and install the command to /usr/local/bin

The command will fail to run if CutBox is not installed and has history.

Would you like to know more?

More information is in the wiki

Found something wrong?

If you find a bug, click here to tell me what happened.

Contributing

  • Pull requests must have test cover, existing tests should not break.
  • Open an issue if tests are already failing, so I know I need to fix them.
  • Code must pass the quality checks as used by Codacy.

Clone and setup dependencies

git clone git@github.com:CutBox/CutBox

Compilation setup / tooling

gem install cocoapods
cd CutBox
pod install
cd ..

To build CutBox.app:

bin/build
open CutBox/build/

Run the local CutBox.app with terminal logging...

CutBox/build/CutBox.app/Contents/MacOS/CutBox

Troubleshooting

There's a Gitter channel if you have problems getting up and running (https://gitter.im/CutBox)

Licence

CutBox is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

CutBox is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.