Custom Commands

Custom Commands for Developers

A professional-grade feature for developers to process and transform data effortlessly.

Why Custom Commands?

Ever found yourself searching for an online tool just to convert a timestamp or format a JSON string? Custom Commands bring those tools directly into your clipboard manager, keeping you in the flow.

Real-world Scenario

Imagine you're debugging logs and find a timestamp like 1735704110. You need to know the human-readable date but don't want to leave your terminal or IDE.

With a custom 'dt' command, you simply type:

Console
$
dt 1735704110
-> 2025-01-01 12:01:50

It works both ways! Type a date, get the timestamp. You have total control.

Stay in the Flow

  • Base64 encoders/decoders
  • JSON & XML formatters
  • URL shorteners or ID generators
  • Text casing & regex transformations

Pro Tip

Any executable can be a command. Node, Python, Bash, binaries—you name it.

How to Create Commands

Custom Commands are language-agnostic. You can use Python, Node.js, Ruby, C++, Go, or even compiled binaries.

1. Open the 'Custom Commands' manager from the system tray menu.
2. Click 'New' to create a new command definition.

Configuration Breakdown

Name

Name: A descriptive identifier for your script.

Prefix

Trigger Prefix: The short command you'll type to activate it.

Interpreter

Interpreter Path: Path to your language runtime (e.g., /usr/bin/python3). Leave empty for binaries.

Path

Script Path: The path to your script or executable file.

Click 'Save' and you're ready to go! Just type your prefix followed by a space in the search bar to trigger it.

Practical Code Example (Python)

The following Python script illustrates how easy it is to implement the 'dt' logic yourself. Simply save this to a file and point the 'Script Path' to it.

convert.py
#!/usr/bin/env python3
import sys
from datetime import datetime

DATE_FORMATS = [
    "%Y-%m-%d",
    "%Y-%m-%d %H:%M:%S",
    "%Y/%m/%d",
    "%Y/%m/%d %H:%M:%S"
]

def is_timestamp(s: str):
    try:
        float(s)
        return True
    except:
        return False

def parse_date(s: str):
    for fmt in DATE_FORMATS:
        try:
            return datetime.strptime(s, fmt)
        except:
            continue
    return None

def convert(s: str):
    if is_timestamp(s):
        ts = float(s)
        if ts > 1e12:
            ts = ts / 1000
        dt = datetime.fromtimestamp(ts)
        return dt.strftime("%Y-%m-%d %H:%M:%S")
    dt = parse_date(s)
    if dt:
        return int(dt.timestamp())

    return f"Unrecognized format: {s}"

if __name__ == "__main__":
    if len(sys.argv) < 2:
        print("Parameter error")
        sys.exit(1)

    value = sys.argv[1]
    print(convert(value))
CopyManager
© 2026 CopyManager. All rights reserved.