Reference

div.json

The per-project manifest format, top to bottom.

div.json

div.json is a single JSON file at the root of every Div project. It's created by div new and updated by div deploy. Tiny, transparent, easy to peek at.

#Schema

{
  "slug": "mysite-a4f9d2",
  "createdWith": "div@3.0.2"
}
Field Type Required Notes
slug string | null Yes The project's slug on div.so. null until first deploy. After first deploy, this is the unique identifier the CLI uses to recognize the folder as an existing project on subsequent runs.
createdWith string No The version of Div that scaffolded the project (e.g. div@3.0.2). Informational only; the CLI doesn't use this for anything.

Unknown fields are ignored. Future versions of the CLI may add fields, but won't remove or repurpose existing ones without a major-version bump.

#What div.json is for

  • Recognizing the project on re-deploy. Without a slug, div deploy would treat every run as a fresh project and mint a new one. That'd be chaotic.
  • Sharing the slug across machines. Commit div.json to git, and a collaborator who clones the repo + runs div login can deploy updates to the same website.

#What div.json is not for

  • Storing credentials. Claim tokens and access tokens go in ~/.config/div/auth.json instead. That file is per-machine and never committed.
  • Configuring the CLI. Per-machine settings (api-url, insecure) go in ~/.config/div/config.json. See div config.
  • Site metadata. Page titles, descriptions, etc. belong in your HTML, not in the manifest.

#Should I commit it to git?

Yes! The slug is the project's stable identifier; you want it shared across collaborators and across your own machines. There are no secrets in div.json.

#Manual edits

You can edit div.json by hand, but be careful with the slug field:

  • Setting it to null on a deployed project will make the next div deploy create a brand-new project under a brand-new slug. Your existing website is untouched, but you're now operating two of them.
  • Changing it to a different slug will make div deploy try to push to that project instead. If you don't have credentials for it (and you almost certainly don't), the deploy will error with No saved credentials.

If you want to start fresh while keeping the folder, the cleanest path is to delete div.json (or set slug to null) and run div deploy again — this mints a new project, gets a new claim token, and prompts for your email.

#What gets uploaded

div.json itself is not uploaded. The default ignore list excludes it, since the slug doesn't need to be exposed in your public website.

#See also