# Install dmog

Install the dmog command with npm, Go, or Cargo, and check that it runs.

dmog has three builds, one for each of Node.js, Go, and Rust. They take the same options and print the same output, so install the one whose runtime you already have.

## Install with npm

You need Node.js 24 or later. Install the package globally:

```sh
npm install -g @tabnas/dmog
```

The package is `@tabnas/dmog`, and the command it installs is `dmog`.

## Install with Go

You need Go 1.24 or later. Install the command into your Go bin directory:

```sh
go install github.com/tabnas/dmog/go/cmd/dmog@latest
```

The command lands in `$(go env GOPATH)/bin`, which must be on your `PATH`.

## Install with Cargo

You need Rust 1.85 or later. Install the crate:

```sh
cargo install --locked tabnas-dmog
```

The crate is `tabnas-dmog`, and the binary it installs is `dmog`. `--locked` builds with the versions the release was tested with.

## Check that it runs

Ask dmog to translate a line of JSON:

```console
$ printf '{"ok":true}' | dmog translate --from json --to yaml -
"ok": true
```

If the shell cannot find `dmog`, the directory it was installed into is not on your `PATH`.

All three builds are published together, at one version. For what each build needs and how they differ, see [The three builds](https://dmog.tabnas.dev/reference/builds.html). To call dmog from a program of your own, add its package to the program's project instead, as [Use the TypeScript library](https://dmog.tabnas.dev/how-to/use-the-typescript-library.html), [Use the Go library](https://dmog.tabnas.dev/how-to/use-the-go-library.html), and [Use the Rust library](https://dmog.tabnas.dev/how-to/use-the-rust-library.html) show.
