Generate documentation

Use the CLI to upload a snapshot of a local project and start documentation generation in DocuWriter.

Select your project folder

Run this from the project you want to document:

npx docuwriter

To document a specific folder, use:

npx docuwriter --cwd ./packages/api

Check the displayed folder and confirm Document this folder? If needed, sign in and approve access in your browser. See Get started.

The snapshot includes the current files on disk, including local edits and untracked files after exclusions. You do not need to commit changes first. Non-Git project folders are supported too.

Describe the documentation you need

Choose Generate documentation, then complete the setup prompts:

  1. Who is this documentation for? Choose the audience offered by DocuWriter.
  2. Company or project name: Confirm or edit the suggested name, or skip it.
  3. Sector: Choose a sector, enter your own, or skip it.
  4. What should your documentation help with? Optionally describe your goal, such as helping a new developer understand the architecture. This accepts up to 500 characters.
  5. Timezone: Confirm a timezone such as Europe/Madrid, or clear it to skip.

Audience and goal help tailor the generated documentation. Generation uses your account's access and available credits.

Upload and follow progress

The CLI packages eligible files and displays a file count and compressed snapshot size. It then uploads the snapshot and starts your Space.

Keep the terminal open until Snapshot accepted appears. The CLI prints and opens your Space URL; you can then close the terminal and follow progress in DocuWriter.

The upload is a point-in-time snapshot. Subsequent local edits are not automatically uploaded or synchronized by this CLI run.

Choose a suitable folder

Use --cwd to narrow a large project to the folder you intend to document. Applicable .gitignore rules, built-in exclusions, and platform exclusions determine which files are packaged.

Free-plan ZIP uploads support up to 1 GB. Paid accounts have a 20 GB technical upload ceiling. A project may still need to be reduced if its uncompressed contents exceed the technical limit.

For an interrupted upload, rerun the command and choose whether to resume the approved snapshot or discard it and start again. See Troubleshooting.

Related: Privacy and file exclusions and Import existing documentation.