Skip to main content

SCCB – A customizable CLI tool for managing command shortcuts and clipboard snippets.

Project description

📋 SCCB – Shortcut Clipboard + Command Binder

SCCB is a customizable CLI tool that lets you save and run command shortcuts and clipboard snippets. It’s like a mix of a snippet manager, alias system, and Git helper, but fully configurable via a JSON file.

I built this project to save time in my daily workflow — instead of typing long Git commands or reusing the same text snippets, I can now run them instantly with sccb.


✨ Features

  • 🔖 Snippets → Save reusable text (like API keys, tokens, boilerplate) and copy it to your clipboard with one command.
  • ⚡ Commands → Save shell command macros and run them instantly.
  • 📝 Variable substitution → Use placeholders like {msg} or {key} and fill them at runtime.
  • 🛠 Defaults → Define default values for variables in your config or via sccb default.
  • 📂 Config file → All shortcuts are stored in ~/.sccb.json (easy to edit, share, or sync).
  • 🎨 Pretty output → Uses Rich for nice tables.
  • 🖥 Shell integration → Optionally push commands into your shell buffer (zsh).
  • 🧹 Simple management → Add, remove, list, set defaults, and edit shortcuts easily.

📦 Installation

From PyPI (recommended)

pip install sccb

From source

git clone https://github.com/Jinkuman/sccb.git
cd sccb
pip install -e .

🚀 Usage

Add a Command

sccb add gitall:"git add . && git commit -m '{msg}' && git push"
  • {msg} is a variable placeholder.

  • Run it with a custom message:

    sccb run gitall msg:"Initial commit" !
    

→ Executes git add . && git commit -m 'Initial commit' && git push

  • Or define a default:

    sccb default gitall msg:"quick commit"
    sccb run gitall !
    

→ Executes with "quick commit" as the default message.


Add a Snippet (API Key Example)

sccb add@ apikey:"sk-1234567890abcdef"
  • Copy it to clipboard:

    sccb run apikey
    

→ Copies sk-1234567890abcdef to clipboard.

  • With a variable (e.g., different environments):

    sccb add@ apikey:"{env}_sk-1234567890abcdef"
    sccb run apikey env:"dev"
    

→ Copies dev_sk-1234567890abcdef to clipboard.

  • With a default:

    sccb default apikey env:"prod"
    sccb run apikey
    

→ Copies prod_sk-1234567890abcdef to clipboard.


List Shortcuts

sccb ls

Remove a Shortcut

sccb rm apikey

Edit Config

sccb edit

Help

sccb help

Shell Integration (Optional)

You can install shell integration to push commands into your shell buffer (zsh only for now):

sccb install-shell
source ~/.zshrc

Then you can type:

sccb run gitall

and the command will appear in your terminal buffer, ready to run.


📌 Example Config (~/.sccb.json)

{
  "commands": {
    "gitall": {
      "type": "command",
      "value": "git add . && git commit -m '{msg}' && git push",
      "defaults": { "msg": "quick commit" }
    }
  },
  "snippets": {
    "apikey": {
      "type": "snippet",
      "value": "sk-1234567890abcdef",
      "defaults": {}
    }
  }
}

🛠 How I Built It

  • Language: Python

  • CLI Framework: Typer

  • Clipboard: Pyperclip

  • Pretty Output: Rich

  • Config: JSON file stored at ~/.sccb.json

  • Packaging: pyproject.toml + published to PyPI This project started as a way to save time typing repetitive Git commands and reusing text snippets. Over time, I added:

  • Variable substitution ({msg}, {env})

  • Defaults (sccb default)

  • Shell integration for buffer mode

  • A polished CLI with ls, rm, edit, and help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sccb-0.4.3.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sccb-0.4.3-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

Details for the file sccb-0.4.3.tar.gz.

File metadata

  • Download URL: sccb-0.4.3.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sccb-0.4.3.tar.gz
Algorithm Hash digest
SHA256 c194355c134968a0f0c6f85e4074c82cffff421c43d46652472dd0f9db0d1177
MD5 70957c92d097b2bfe0ffbcfbc7b29ca9
BLAKE2b-256 a54f81122f8030f9c1a2352b4c0b681cff4fe48bb322b7d5a152892eac3d782f

See more details on using hashes here.

File details

Details for the file sccb-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: sccb-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sccb-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5c0bca9d574205e2380fa1bdf67637d482fe01c6744484f4521b3fd7a5b2463b
MD5 667c5713e7b6ecd6faab664927424307
BLAKE2b-256 5b98ba491ca921292050b32dffd28db4c37541ea764484310944a05e0f87383b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page