cobo (copy boilerplates) is a generic CLI for fetching boilerplate files from configurable git repositories
Project description
cobo: copy boilerplates from configurable git repositories
cobo (short for copy boilerplates) is a command-line tool for fetching boilerplate files from configurable git repositories. It ships with five sources baked in:
gitignore— GitHub'sgithub/gitignoretemplatesgitattributes— communitygitattributes/gitattributestemplateseditorconfig—vinibrsl/editorconfig-templatesmise—mise-cookbooksconfigslicenses— SPDX license texts fromspdx/license-list-data
You can add your own sources via a single TOML config file.
cobo is the successor to micoo, which is now deprecated.
Installation
uv tool install cobo
or
pipx install cobo
or
mise install pipx:cobo
Quick start
Fetch the baked sources once:
cobo update
List boilerplates in a source:
cobo gitignore list
cobo mise list
Dump one to stdout:
cobo mise dump python > mise.local.toml
cobo gitignore dump Python Node > .gitignore
cobo gitattributes dump Python > .gitattributes
cobo editorconfig dump Python > .editorconfig
Configuration
A user config file at the platform-specific config path (e.g.
~/.config/cobo/config.toml on Linux) can override baked sources or add
new ones.
Suppose you maintain a repo of reusable Dockerfile snippets laid out like this:
example/dockerfiles (https://example.invalid/you/dockerfiles)
└── templates/
├── python.Dockerfile
├── node.Dockerfile
└── rust.Dockerfile
The matching source entry:
[sources.dockerfiles]
description = "My Dockerfile snippets"
url = "https://example.invalid/you/dockerfiles"
branch = "main"
extension = ".Dockerfile"
subpath = "templates"
multi_dump = false
inject_header = true
comment_prefix = "#"
Field semantics:
extension— suffix used to discover boilerplates. A filetemplates/python.Dockerfileis exposed as the namepython.subpath— only scan this subdirectory of the clone (omit to scan the whole repo).branch— branch to track; pin to whatever the upstream default is.multi_dump— whentrue,dumpaccepts multiple names and concatenates them (used bygitignoreandgitattributes).inject_header/comment_prefix— prepend a provenance comment block on dump using the given line prefix.
Once added, the source becomes a first-class subcommand:
cobo dockerfiles list # python, node, rust
cobo dockerfiles dump python # contents of templates/python.Dockerfile
Trust boundary. The config file is a trust boundary:
urlandbranchvalues are passed directly togit. Only add sources you trust.
Branch drift. Baked-in sources pin the upstream default branch (some
main, othersmaster). If an upstream renames its default branch, override thebranchfield in your user config until the baked default is updated.
Disposable cache. Source clones under the cache root (
cobo root/cobo <source> root) are managed bycobo update, which performsfetch+ hard reset +clean -fdx. Any local edits, untracked files, or commits inside those clones are discarded on the next update — never use the cache as a working tree.
Command reference
cobo
├── update (clone/pull all sources)
├── version
├── info
├── list-sources
├── root (cache directory path)
├── config (resolved merged config)
├── config-path (user config file path)
└── <source> (one subcommand per configured source)
├── update
├── list
├── search <term>
├── dump <name>...
├── root (this source's clone path)
└── remote (this source's git URL)
Author
Maintained by Hasan Sezer Taşan.
License
MIT. See LICENSE.
Project details
Release history Release notifications | RSS feed
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 cobo-0.2.0.tar.gz.
File metadata
- Download URL: cobo-0.2.0.tar.gz
- Upload date:
- Size: 77.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4142bdc59b8741c5fcfc4a2141d7aa2681f8365881f02ec22d696fcdc7f3082e
|
|
| MD5 |
16c978d627965a375de7a0c18db25b0c
|
|
| BLAKE2b-256 |
15a6078e70256cd9e1c37d6da7677473dbc52da12a5efcb02b4dc8e365ec3bdf
|
File details
Details for the file cobo-0.2.0-py3-none-any.whl.
File metadata
- Download URL: cobo-0.2.0-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.23 {"installer":{"name":"uv","version":"0.11.23","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
410a4602fd77c98eefd8dd7bbddfcd43de51be5eb33118af3a72989ec506a17e
|
|
| MD5 |
a3f8e42b19bfbd3eac3a2be673aab633
|
|
| BLAKE2b-256 |
3c5466dd0fe464e26807eb64c9d4a5710c9b9ebf6f50fe72466ce1fd2479a511
|