Skip to content
forked from cutbox/CutBox

CutBox makes your macOS pasteboard awesome.

License

Notifications You must be signed in to change notification settings

pakerwreah/CutBox

 
 

Repository files navigation

    

Make you macOS pasteboard awesome...

GitHub release (latest SemVer)

Sponsor

CutBox is a clipboard manager for MacOS, designed for developers. Search using fuzzy matching or regular expressios. Multiple clipboard items can be posted at once. You can also filter to a time limit, e.g. "10 min" will show items copied in the last 10 min, you can text search on just those items.


CutBox also has advanced JavaScript and Shell command features. Using require(javascript_file) and/or shellCommand(command_args) you can process text through any JS library or shell command before pasting it into your workflow.


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

CutBox Search is activated using a global hotkey, by default:

Cmd + Shift + V

Also Compact UI mode, which expands as above when searching.

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

(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
Cmd- Toggle join mode (paste multiple items, joined by newline or string: Set in preferences)
Cmd[ Toggle wrap mode (paste multiple items, wrapped by a pair of strings: Set in preferences)
Cmds Toggle search modes, fuzzy match, regexp/i or regexp
Cmdf Toggle search by favorites / everything (use the right click menu, to favorite)
Time limit filter
Cmdh Toggle search within time limit
Enter (in time limit input) Switch to text search input
In items list
Altup Move to top of items
Altdown Move to top of items
Hold Shift Expand single selection to new item, standard shift select
Hold Cmd Expand selection to new items, multiple selection groups, standard command select

Status bar menu

Use the status item to open Cutbox with the mouse, and access options:

Install via Homebrew Cask (recommended)

Install the compiled package.

brew tap cutbox/cutbox
brew install --cask cutbox

Install by downloading the release DMG

Visit https://github.com/cutbox/CutBox/releases/latest

Install via Homebrew formula

Builds the package from source, a full Xcode installation needed.

brew tap cutbox/cutbox
brew install cutbox

macOS Security Settings - 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. Donations are important to help keep it developed and improved.

Dmg/.app builds are produced by Github Workflow actions, so you can also inspect the entire test/deploy/delivery chain.

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 also has a CLI tool to access history via the terminal. Download the CLI command cutbox from releases. (From v1.5.8 onwards.)

Note the CLI only performs read-only actions on CutBox history.

OVERVIEW:
        CutBox history CLI

USAGE:  cutbox [options]

        Display items from CutBox history. Recent items first.

OPTIONS:
        -l or --limit <num>                Return first num items

        Search

        -f or --fuzzy <query>              Fuzzy match items
        -r or --regex <query>              Regexp match items
        -i or --regexi <query>             Regexp match items (case insensitive)

        --favorites                        Only favorites

        Filter by Date / time

        --before-date <ISO 8601 datetime>  e.g. 2023-06-05T09:21:59Z
        --since-date <ISO 8601 datetime>

        --before-seconds-ago <seconds>
        --since-seconds-ago <seconds>

        --before-minutes-ago <minutes>
        --since-minutes-ago <minutes>

        --before-hours-ago <hours>
        --since-hours-ago <hours>

        --before-days-ago <days>
        --since-days-ago <days>

        Misc

        --missing-date                     Display history items with no date (before CutBox v1.5.5)

        --version                          CutBox v1.5.8 - command line v0.0.75

        -h or --help show this message.

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/.

About

CutBox makes your macOS pasteboard awesome.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Swift 91.6%
  • Shell 7.0%
  • Other 1.4%