---
slug: moon-v1.3
title: moon v1.3 - Advanced run targeting and an official proto plugin
authors: [milesj]
tags: [query, lang, proto, schema, toml, target]
image: ./img/moon/v1.3.png
---

After many months of design and development, we're finally introducing MQL, our own unique query
language!

<!--truncate-->

## Run targets based on a query

Our [`moon run`](/docs/commands/run) command is pretty powerful. It allows you to run targets in
one, many, or all projects. It also supports running multiple targets in parallel. However, it
wasn't powerful enough, as it couldn't run the following types of scenarios:

- Run a target in projects of a specific language.
- Run a target in libraries or applications.
- Run a target based on project file system path.
- Run a target in projects with a matching tag.
- Run a target in projects that match a keyword.
- Run a target in projects based on AND or OR conditions.
- Or a combination of these.
- And many more!

Supporting all of these scenarios through CLI arguments just feels like bad design, and would result
in a poor developer experience. There had to be a better way to support this! So we set out to solve
this problem, and after much thought, we're stoked to introduce
[MQL, a query language unique to moon](/docs/concepts/query-lang).

With MQL, you can now run scenarios like "I want to build all Node.js libraries", or "I want to lint
and test all Rust projects". Simply pass an unscoped target and a query to the `run` command:

```shell
$ moon run :build --query "taskPlatform=node && projectType=library"

$ moon run :lint :test --query "language=rust"
```

This is only the first iteration of MQL and it's already quite powerful. Expect additional fields,
features, and functionality in the future!

## Plugin support for proto

Earlier this week we announced [plugin support for proto](./proto-v0.7), starting with a TOML based
plugin. This is great as it allows _any_ kind of versioned tool to be managed in proto's toolchain,
so why not moon? Starting with this release, you can now install and manage moon _from_ proto, using
our officially maintained TOML plugin.

In your `.prototools` or `~/.proto/config.toml` file, add the following snippet:

```toml title=".prototools"
[plugins]
moon = "source:https://raw.githubusercontent.com/moonrepo/moon/master/proto-plugin.toml"
```

And as easy as that, you can now use `moon` as a tool within any `proto` command. For example:

```shell
$ proto install moon 1.3.0
$ proto list-remote moon
$ proto bin moon
```

Furthermore, with proto, we can now pin the version of moon on a per-project basis. Perfect for
enforcing the same version for all developers on your team!

```toml title=".prototools"
moon = "1.3.0"
```

> When using this approach, be sure `~/proto/.bin` is in your `PATH`, and takes precedence over
> `~/.moon/bin`.

## Other changes

View the [official release](https://github.com/moonrepo/moon/releases/tag/v1.3.0) for a full list of
changes.

- Upgraded to proto v0.7.
- Improved accuracy of our globbing utilities, especially around dotfiles/dotfolders.
- Updated config loading to be strict and error on unknown fields for non-root fields.
