# dflow apps:document

> Read or apply the dflow.json that is the record for one application.

Web page: /docs/cli/apps/apps-document/

`dflow.json` is the source of truth for one application. Write it in the repository, then apply it here. This command also prints the copy dFlow has stored. An application with nothing stored prints `{}`. That is still success. The printed copy leaves env values out. The file in the repository keeps the names, and you fill the values there before you apply it.

```bash
dflow apps:document NAME
dflow apps:document NAME --file dflow.json
dflow apps:document NAME --file dflow.json --yes
```

## Flags

`--file` compares a `dflow.json` with the stored document and prints the difference. `--yes` applies that file. Without `--yes` the command does not write. `--output`, `--api`, and `--context` still apply.

## What you see

The terminal prints the stored JSON on one line, or `{}`. With `--file`, it prints the difference between the stored document and the file. The same name rules as `apps:inspect`. Exit 0: including `{}` and a file that matches. Exit 1: the file differs and `--yes` was not passed.

## When it fails

Exit 1: bad name or missing context. Exit 2: auth. Exit 3: not found. Exit 10: unreachable.
