R. S. Doiel, rsdoiel@caltech.edu
Caltech Library, Digital Library Development
2025-02-11
CMTools provides a means of generating and maintain various software artifacts based on the contents of your CodeMeta file.
cme
cmt
You can follow along using Terminal (macOS, Linux) or Powershell (Windows).
NOTE: requires curl or irm.
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
codemeta.json
fileOur 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.ts”.
codemeta.json
fileUse cme
.
cme codemeta.json
Follow the prompts. Complex attributes will require YAML notation.
Some attributes need to be entered as YAML.
cmt
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
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.
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!