# solidity-docgen

> Documentation generator for Solidity smart contracts.

Latest version **0.6.0-beta.36** (published 2023-08-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install solidity-docgen
pnpm add solidity-docgen
yarn add solidity-docgen
bun add solidity-docgen
```

## Health

**Score 40/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.6.0-beta.36 |
| Published | 2023-08-25 |
| First published | 2018-04-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 146.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 460 |
| Author | Francisco Giordano |
| Maintainers | frangio, spalladino |
| Keywords | solidity, documentation |

## Links

- npm: https://www.npmjs.com/package/solidity-docgen
- Repository: https://github.com/OpenZeppelin/solidity-docgen
- Homepage: https://github.com/OpenZeppelin/solidity-docgen#readme
- Issues: https://github.com/OpenZeppelin/solidity-docgen/issues
- npm.io page: https://npm.io/package/solidity-docgen

## Dependencies (2)

- [handlebars](https://npm.io/package/handlebars.md) ^4.7.7
- [solidity-ast](https://npm.io/package/solidity-ast.md) ^0.4.38

## Alternatives

- [@cantoo/pdf-lib](https://npm.io/package/@cantoo/pdf-lib.md) — 297.9K weekly downloads
- [datatables.net-buttons](https://npm.io/package/datatables.net-buttons.md) — 200.1K weekly downloads
- [@ckeditor/ckeditor5-export-pdf](https://npm.io/package/@ckeditor/ckeditor5-export-pdf.md) — 167.0K weekly downloads
- [scanbot-web-sdk](https://npm.io/package/scanbot-web-sdk.md) — 15.0K weekly downloads
- [@syncfusion/ej2-angular-pdfviewer](https://npm.io/package/@syncfusion/ej2-angular-pdfviewer.md) — 8.8K weekly downloads

## Recent versions

- 0.6.0-beta.36 (latest) — 2023-08-25
- 0.6.0-beta.35 — 2023-03-01
- 0.6.0-beta.34 — 2022-12-30
- 0.6.0-beta.33 — 2022-12-29
- 0.6.0-beta.32 — 2022-12-02
- 0.6.0-beta.31 — 2022-11-29
- 0.6.0-beta.30 — 2022-11-15
- 0.6.0-beta.29 — 2022-09-29
- 0.6.0-beta.28 — 2022-09-26
- 0.6.0-beta.27 — 2022-09-21
- 0.6.0-beta.26 — 2022-09-16
- 0.6.0-beta.25 — 2022-08-30
- 0.6.0-beta.24 — 2022-08-29
- 0.6.0-beta.23 — 2022-08-29
- 0.6.0-beta.22 — 2022-07-21
- … 75 more at https://npm.io/package/solidity-docgen/versions

## README

# `solidity-docgen`

*solidity-docgen is a program that extracts documentation for a Solidity project.*

The output is fully configurable through Handlebars templates, but the default templates should do a good job of displaying all of the information in the source code in Markdown format. The generated Markdown files can be used with a static site generator such as Vuepress, MkDocs, Jekyll (GitHub Pages), etc., in order to publish a documentation website.

This is a newer version of the tool that has been rewritten and redesigned. Some more work is pending to ease the transition from the previous version and to help with usage and configuration.

## Usage

Install `solidity-docgen` from npm.

### Hardhat

Include the plugin in your Hardhat configuration.

```diff
 // hardhat.config.ts
+import 'solidity-docgen';

 export default {
+  docgen: { ... }, // if necessary to customize config
 };
```

Then run with `hardhat docgen`.

### As a library

```typescript
import { docgen } from 'solidity-docgen';

await docgen([{ output: solcOutput }], config);
```

`solcOutput` must be the standard JSON output of the compiler, with at least the `ast` output. There can be more than one.

`config` is an optional object with the values as specified below.

## Config

See [`config.ts`](./src/config.ts) for the list of options and their documentation.

---
_Source: https://npm.io/package/solidity-docgen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
