name: fs.write_json
description: Write JSON to a file relative to a repository or workspace root.
source:
  type: cli-tool
  command: node
  args:
    - ./run.mjs
inputs:
  path:
    type: string
    required: true
    description: Path to the file relative to repo_root or fixture.
  data:
    type: json
    required: true
    description: JSON value to write.
  indent:
    type: string
    required: false
    description: Number of spaces to indent; defaults to 2.
  repo_root:
    type: string
    required: false
    description: Repository or workspace root; defaults to fixture, RUNX_CWD, or the current working directory.
scopes:
  - fs.write
mutating: true
runx:
  artifacts:
    wrap_as: file_write
