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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sccb-0.4.0.tar.gz.
File metadata
- Download URL: sccb-0.4.0.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42ac55ad3d7f8b79d00daf112628cc9ec48086e08fa10e6ab32250b2c041c966
|
|
| MD5 |
375267c7bf974b3db2bd39754c52f3b7
|
|
| BLAKE2b-256 |
cbd3b0feee1a5cab4ecd31669e749c29606c5818f32c2241b5be4c2261cc8de9
|
File details
Details for the file sccb-0.4.0-py3-none-any.whl.
File metadata
- Download URL: sccb-0.4.0-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a399aa800857918df20e5df3d53461a7225c5c9bf6583c038a19de704f3ee5f1
|
|
| MD5 |
5db6c42f36ceea9b74a96ffbe97a7a1f
|
|
| BLAKE2b-256 |
b956bf73c142cec6fcaaa98631d707cd4e3da15ffa1c0571960d2c433d356757
|