A Template to Clipboard Utility
Templates to your clipboard: because sometimes you just can't be bothered to
type it again. While this utility was created as an exercise to relearn typer
(which is great, though really all CLI tools should be "rewritten in Rust") and
a few other tools (and whack this out as quickly as possible), but hopefully
it's at least of some use to some folks. Eventually, the idea is to also
leverage template strings once those become
available, because really that is a great idea.
Installation
The recommended installation path is via the uv tool interface, installing via
the GH link or PyPI, as you please:
uv tool install tmplcl
uv tool install git+https://github.com/delfanbaum/tmplcl
Usage
This package provides two executable commands: tmplcl and tcl. tmplcl is
the "app" version of the tool, allowing you to perform all the expected CRUD
tasks such as creating, listing, deleting, and updating your various templates.
tcl is essentially just a shortcut for tmplcl copy TEMPLATE_ID, because who
wants to do all that typing.
The usage for each is as follows:
tmplcl --help
Usage: tmplcl [OPTIONS] COMMAND [ARGS]...
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --install-completion Install completion for the current shell. │
│ --show-completion Show completion for the current shell, to │
│ copy it or customize the installation. │
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ─────────────────────────────────────────────────────────────────╮
│ copy Copies the requested template to your clipboard │
│ delete Deletes the template with the provided identifier │
│ add Adds a template with the provided identifier and string │
│ list Lists all available templates, including a preview of each │
│ show Displays the full text of a given template │
│ update Updates a given template with a new string │
╰────────────────────────────────────────────────────────────────────────────╯
tcl --help
Usage: tcl [OPTIONS] TEMPLATE
Finds a template by its id and copies the resultant string to the clipboard
╭─ Arguments ────────────────────────────────────────────────────────────────╮
│ * template TEXT [default: None] [required] │
╰────────────────────────────────────────────────────────────────────────────╯
╭─ Options ──────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰────────────────────────────────────────────────────────────────────────────╯
Data Storage
Following the XDG Base Directory
Specification,
data will stored in $XDG_DATA_HOME/tmplcl.
If you would like to define your templates manually, it's all just JSON, so open
up $XDG_DATA_HOME/tmplcl/data.json and have at it. The schema is roughly
as follows:
{
"description": "The model for the templates copied over to the clipboard. Contains the\ntemplate identifier as well as the template string.\n\nNote that the id may contain only alphanumeric characters or `-` and `_`",
"properties": {
"identifier": {
"minLength": 1,
"pattern": "^[a-zA-Z0-9_-]+$",
"title": "Identifier",
"type": "string"
},
"template": {
"minLength": 1,
"title": "Template",
"type": "string"
}
},
"required": [
"identifier",
"template"
],
"title": "Template",
"type": "object"
}
Development
To get started, run uv sync.
The Future
Eventually, the goal is to support these "templates" as actual... templates.
Like, being able to run tcl my_template foo where my_template is "My favorite food is {} and "My favorite food is foo" gets put on your clipboard.
But that'll be a 0.1.2 thing.
Metadata
Release files for tmplcl 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| tmplcl-0.1.1.tar.gz | 4.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tmplcl-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.6 kB
Release files / tmplcl-0.1.1.tar.gz
| Download URL | tmplcl-0.1.1.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dd32d20f53575fc2c9598fa36c6fef5ed8c0defb13920542cab6451b38a49076
|
|
BLAKE2b-256 checksum How to use checksums |
c53b1ebc45b867300ba67671d79df3172a6d454c46f97967b3e128801c3268c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.
Transparency logRelease files / tmplcl-0.1.1-py3-none-any.whl
| Download URL | tmplcl-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd7765d7103ce7d11cda7059eb541733e0fcfff31ee1322d7f2471901e00f50c
|
|
BLAKE2b-256 checksum How to use checksums |
709378b3a16fb369f806e0c06b5611481b5c48def8a13d894f6107ecdcfe5d00
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 31, 2025.
Transparency log