Skip to main content
The moon project [id] (or moon p) command displays comprehensive information about a project that has been configured and exists within the graph. If a project does not exist, the program will return with a 1 exit code.
$ moon project web
This command is useful for inspecting project metadata, configuration, dependencies, tasks, file groups, and other project-specific details.

Synopsis

moon project [id] [OPTIONS]

Arguments

  • [id] - ID or alias of a project, as defined in projects. If not provided, you’ll be prompted to select from available projects.

Options

OptionTypeDescription
--jsonbooleanPrint the project and its configuration as JSON
--no-tasksbooleanDo not include tasks in output

Example output

The following output is an example of what this command prints, using a sample project:
$ moon project runtime
RUNTIME

Package for running tasks in a distributed system.

About:

  Project: runtime
  Alias: @moonrepo/runtime
  Source: packages/runtime
  Root: ~/Projects/moon/packages/runtime
  Toolchain: node
  Language: typescript
  Stack: frontend
  Layer: library
  Depends on:
    - types (production)

Configuration:

  Inherits from:
    - .moon/tasks/node.yml
  Tags:
    - node
    - typescript
  Environment variables:
    NODE_ENV: production

File groups:

  configs:
    - *.{js,json}
  sources:
    - src/**/*
    - types/**/*
  tests:
    - tests/**/*

Tasks:

  build:
    › packemon build --addFiles --addExports --declaration
  format:
    › prettier --check --config ../../prettier.config.js .
  lint:
    › eslint --cache --color --ext .js,.ts,.tsx .
  test:
    › jest --cache --color --passWithNoTests
  typecheck:
    › tsc --build

JSON output

Use the --json flag to output the full project configuration as JSON:
$ moon project runtime --json
{
  "id": "runtime",
  "aliases": ["@moonrepo/runtime"],
  "source": "packages/runtime",
  "root": "/Users/name/Projects/moon/packages/runtime",
  "language": "typescript",
  "stack": "frontend",
  "layer": "library",
  "toolchains": ["node"],
  "config": {
    "project": {
      "title": "Runtime",
      "description": "Package for running tasks in a distributed system."
    },
    "tags": ["node", "typescript"],
    "tasks": { ... }
  }
}

Usage examples

Inspect a project by ID

$ moon project web

Inspect a project by alias

$ moon project @company/web

View project without tasks

$ moon project web --no-tasks

Export project configuration as JSON

$ moon project web --json > web-config.json

Configuration

Build docs developers (and LLMs) love