R. S. Doiel, rsdoiel@caltech.edu
Caltech Library, Digital Library Development
2025-07-07
CMTools provides tools to scaffold and maintain a project using a CodeMeta file and the metadata provided by the Git repository.
cme
cmt
cme
and
cmt
macOS, Linux
curl -L https://caltechlibrary.github.io/CMTools/installer.sh | sh
Windows
irm https://caltechlibrary.github.io/CMTools/installer.ps1 | iex
In your Terminal or Powershell session skim the docs.
cme --help | more
cmt --help | more
Steps
codemeta.json
using cme
cmt
Our project is going to be called “foo”.
mkdir foo
cd foo
Example uses Caltech Library’s software license.
macOS and Linux
curl -L -O https://raw.githubusercontent.com/caltechlibrary/template/refs/heads/main/LICENSE
Windows
irm https://raw.githubusercontent.com/caltechlibrary/template/refs/heads/main/LICENSE -OutFile LICENSE
NOTE: license is required to create “version.py”.
codemeta.json
fileUse cme
.
cme codemeta.json -e
Follow the prompts.
NOTE: Complex fields require YAML notation. The -e
option says to invoke a text editor for complex fields like authors and
contributors. It is much easier to type YAML in a text editor.
Some attributes need to be entered as YAML.
-e
optioncmt
supports an --init
option identifying
projects by their primary programming language. Currently supported are
Python, Go, JavaScript and TypeScript. In our example we’re setting up
for a Deno+TypeScript project.
cmt codemeta.json --init typescript
cmt codemeta.json --init typescript
yields the following
files.
version, dateModified, datePublished and releaseNotes
cme codemeta.json version dateModified datePublished releaseNotes -e
NOTE: I recommend the -e
option since our releaseNotes
maybe more than a single line of text.
Set version to “1.0.1” and releaseNotes to “Bug fixes”.
cme codemeta.json version=1.0.1 releaseNotes='Bug fixes'
Update the artifacts by explicitly passing their names on the command line.
On macOS and Linux
cmt codemeta.json version.ts CITATION.cff \\
INSTALL.md installer.sh installer.ps1 about.md
On Windows
cmt codemeta.json version.ts CITATION.cff `
INSTALL.md installer.sh installer.ps1 about.md
Software lives longer than expected, long lived software requires maintenance.
CMTools helps with maintenance.
Thank you!