Pre-release. Until the official launch, content may change, including published files.
Skip to content

Source: https://datamodels.jp/en/toolkit/ · Text CC BY 4.0

Toolkit ​

datamodels-toolkit is an open-source command-line tool and GitHub Action. The command is datamodels. With it you can:

  • Publish your own data models with fixed URLs on a site of your own, a node. The site has catalog.json, the @context, JSON Schemas, a vocabulary, examples, and a page for every type and attribute. An example: models.gtt-project.org, the models of the GTT plugin for Redmine. Other sites: Data model sites.
  • Convert a CSV list into entities of a model of this catalog.
  • Export a model as files for a spreadsheet, an AI model or PostgreSQL.

Not sure yet whether you need a site of your own? See Your own data models.

Running it ​

You need Node.js 24 or later. The commands run a release of the npm package @geolonia/datamodels with npx; there is nothing to install. In a project of your own, npm install --save-dev @geolonia/datamodels@0.4.3 adds it, and npx datamodels … runs it. Releases before 0.3.8 are not on npm and run from GitHub.

bash
npx @geolonia/datamodels@0.4.3 --help

The first time, npx asks before it downloads the package (Need to install the following packages: … Ok to proceed? (y)): answer y.

The examples in this section use this release. This section explains them task by task. Every command and option is in --help and the Command reference.

Pages ​

Publish your site ​

  • Starting a site: start a node with init, and publish it on GitHub Pages and your own domain.
  • Your site's models: look for an existing model with search, add models with add and extend, and write their attributes.
  • Checking and building: check, build, and the GitHub Action that publishes.
  • Versions: change a published model with bump, and move to a newer toolkit with upgrade.
  • Other hosts: publish a node on Cloudflare Pages, Netlify or another static host.

Your data ​

  • Converting your data: convert a CSV list into entities of a model with convert, using a standard's mapping file, a mapping of your own made with mapping, or the CSV template.
  • Exporting to other tools: make a CSV template, a Table Schema, a structured output schema for AI and a PostgreSQL / PostGIS table from a model with export.

Reference ​

Agent skill ​

The toolkit has a skill for AI agents, skills/datamodels. It gives an agent the modelling rules of this catalog and the toolkit's way of working: look for a model before you define one, choose between an alias and a subclass, run bump before you change a published model, and more. It also has the steps to convert a list of your own with mapping and convert --check (With an AI agent). For the models themselves, it sends the agent to llms.txt.

The skill is in the toolkit's repository, not in the npm package. For Claude Code, copy the folder from a clone of the repository into your project's .claude/skills/, or into ~/.claude/skills/ for all your projects:

bash
mkdir -p .claude/skills
cp -R path/to/datamodels-toolkit/skills/datamodels .claude/skills/

Problems and questions ​