MDK Logo

Install the CLI

[⏱️ ~3 min] Get `mdk` installed and verified from a source checkout

TL;DR

  • Operate the stack from your terminal
  • Install mdk on your PATH with npm install -g @tetherto/mdk-cli
  • Confirm it with mdk --version

Overview

mdk is MDK's command-line tool for standing up and operating a stack from your terminal. It scaffolds a stack (mdk create), boots it (mdk run), and reports its health (mdk status), all driven by the mdk.yaml spec mdk onboard writes for you.

Prerequisites

Install

Install the published CLI from npm. A source checkout is only needed to work on the CLI itself.

Put mdk on your PATH

If mdk --version already prints a version, skip to verifying your install.

A Install from npm

npm install -g @tetherto/mdk-cli

npx @tetherto/mdk-cli@latest <command> runs a single command without installing anything globally, which suits CI and one-off scaffolding.

B Install from a source checkout

Contributors who are changing the CLI's own source build it and link that build onto their PATH instead.

git clone https://github.com/tetherto/mdk.git && cd mdk/packages
npm install
cd cli && npm run build && npm link

To pin a tagged release, pick a tag from mdk tags and check it out before installing, for example git checkout -b local/v0.12.1 v0.12.1.

Verify the install

mdk --version

Run project commands from your project

Commands such as mdk skill add and mdk onboard write into your current directory, so run them from the app or UI project you are working in. Only mdk --version is global.

Command groups

A selection of commands you can run today:

GroupCommands
Onboardingmdk onboard
Scaffoldmdk create worker|app|dashboard
Add & validatemdk add app|worker <source>, mdk validate app|worker <name>
Run & managemdk run [target], mdk status
Agent enablementmdk skill add
Metamdk version

The CLI's command surface documents the full flag reference.

Update

npm install -g @tetherto/mdk-cli@latest

Updating a source checkout (option B above) instead: git pull && npm install && npm run build.

Uninstall

npm rm -g @tetherto/mdk-cli

Next steps

On this page