devgrid.yml

Documentation for the 'in repo' YAML file to configure and sync your git project with DevGrid.

The devgrid.yml file in your repository root tells the DevGrid CLI how to sync your project with the DevGrid platform. Commands like lint, dry_run, and sync read this file.

Run devgrid-cli init to scaffold a starter file, or create one manually using the reference below.

Example

# devgrid.yml
project:
  appId: my-app-short-id          # optional — string or integer
  components:
    - name: my-cool-api
      shortId: api-001            # required — string or integer
      api: swagger.yml            # optional — path to OpenAPI/Swagger spec
      manifest: package.json      # optional — path to package manifest
      attributes:
        custom_id: xyz456
        team: platform
      dependencies:               # shorthand — type is component-has-dependency
        - to: some-component-id
          attributes:
            note: primary database
        - to: another-component-id
      relationships:              # advanced — explicit relationship types
        - type: component-has-dependency
          to: legacy-service-id
          attributes:
            env: prod

    - name: my-cool-db
      shortId: db-001

configuration:
  dryRunOutput: file              # file (default) or stdout

Top-level structure

FieldRequiredDescription
projectYesApplication and component definitions
configurationNoCLI behavior settings

Unknown top-level keys are rejected by devgrid lint.

project

FieldTypeRequiredDescription
appIdstring or integerNoApplication short ID on DevGrid. When omitted, component updates still work, but application-level relationships are skipped
componentsarrayYesList of components to sync

project.components[]

Each component describes a service, library, datastore, or other entity in your system.

FieldTypeRequiredDescription
namestringYesDisplay name
shortIdstring or integerYesUnique short identifier used to match remote state
attributesobjectNoFree-form key-value metadata synced to DevGrid
apistringNoPath to an API definition file (e.g. swagger.yml)
manifeststringNoPath to a manifest file (e.g. package.json, pom.xml)
dependenciesarrayNoShorthand dependency list (see below)
relationshipsarrayNoExplicit relationships with custom types (see below)

Flexible short IDs: appId, shortId, and relationship/dependency to values accept either strings ("my-app") or integers (10005).

dependencies (shorthand)

Each item requires to (target component short ID). The CLI automatically creates a component-has-dependency relationship.

FieldTypeRequiredDescription
tostring or integerYesTarget component shortId
attributesobjectNoMetadata on the relationship

relationships (advanced)

Use when you need a relationship type other than the dependency shorthand.

FieldTypeRequiredDescription
typestringYesRelationship type (e.g. component-has-dependency)
tostring or integerYesTarget component shortId
attributesobjectNoMetadata on the relationship

If the target component does not exist on DevGrid, the sync planner adds a WARN_MISSING_TARGET action instead of failing immediately.

configuration

CLI settings that do not affect DevGrid platform state.

FieldTypeRequiredDefaultDescription
dryRunOutputstringNofileWhere dry_run writes its plan: file or stdout

When dryRunOutput is file (default), the plan is written to devgrid_dry_run_plan.json in the current directory.

Optional appId workflow

You can manage components and component-to-component relationships without an application context:

project:
  components:
    - name: standalone-service
      shortId: svc-001
      dependencies:
        - to: other-svc

Application-level relationships (application_has_component) are skipped when appId is omitted.

Not supported

The following patterns appear in older documentation or examples but are not valid in current CLI versions:

PatternWhy it fails
technologies: on a componentNot in the schema — devgrid lint will reject it
{{ .ENV_VAR }} template syntax in attributesNo template processing; values are stored literally
Extra fields such as type: on componentsSchema uses additionalProperties: false — unknown keys fail lint

Attribute values must be static YAML. Set dynamic values through your CI environment before generating the file, or use plain string values.

Validate your file

devgrid-cli lint

This validates devgrid.yml against the JSON schema used by the CLI. Fix any reported errors before running sync.

Related pages