{"id":23739372,"url":"https://github.com/nix-community/nixdoc","last_synced_at":"2026-02-11T13:34:24.415Z","repository":{"id":49609749,"uuid":"154700299","full_name":"nix-community/nixdoc","owner":"nix-community","description":"Tool to generate documentation for Nix library functions [maintainer=@infinisil]","archived":false,"fork":false,"pushed_at":"2025-12-01T23:42:18.000Z","size":317,"stargazers_count":158,"open_issues_count":10,"forks_count":17,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-12-16T23:21:20.368Z","etag":null,"topics":["commonmark","documentation","markdown","nix","rust"],"latest_commit_sha":null,"homepage":"","language":"Nix","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nix-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"open_collective":"nix-community"}},"created_at":"2018-10-25T16:07:24.000Z","updated_at":"2025-11-18T21:22:45.000Z","dependencies_parsed_at":"2023-10-11T01:29:08.496Z","dependency_job_id":"d5101551-5100-406b-a2ed-2f03bf812dca","html_url":"https://github.com/nix-community/nixdoc","commit_stats":{"total_commits":135,"total_committers":14,"mean_commits":9.642857142857142,"dds":0.6518518518518519,"last_synced_commit":"1889271ea7a25bdabc2f8a47d161037a949171e9"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/nix-community/nixdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nix-community","download_url":"https://codeload.github.com/nix-community/nixdoc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nix-community%2Fnixdoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29333565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T12:42:24.625Z","status":"ssl_error","status_checked_at":"2026-02-11T12:41:23.344Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["commonmark","documentation","markdown","nix","rust"],"created_at":"2024-12-31T09:36:49.451Z","updated_at":"2026-02-11T13:34:24.410Z","avatar_url":"https://github.com/nix-community.png","language":"Nix","funding_links":["https://opencollective.com/nix-community"],"categories":["Development","Nix"],"sub_categories":[],"readme":"# nixdoc\n\nThis tool is used to generate reference documentation for Nix library functions defined in [Nixpkgs' `lib`](https://github.com/NixOS/nixpkgs/tree/master/lib).\n\nCheck out [this example](https://nixos.org/manual/nixpkgs/unstable/#sec-functions-library-strings) of documentation generated for the [`lib/strings.nix`](https://github.com/NixOS/nixpkgs/blob/nixpkgs-unstable/lib/strings.nix) file.\n\nIt uses [rnix](https://github.com/nix-community/rnix-parser) to parse Nix source files,\nwhich are then transformed into a CommonMark (with some syntax extensions) representation of the\nfunction set.\n\n## Comment format\n\nThis tool implements a subset of the doc-comment standard specified in [RFC-145/doc-comments](https://github.com/NixOS/rfcs/blob/master/rfcs/0145-doc-strings.md).\nBut, it is currently limited to generating documentation for statically analysable attribute paths only.\nIn the future, it could be the role of a Nix interpreter to obtain the values to be documented and their doc-comments.\n\nIt is important to start doc-comments with the additional asterisk (`*`) -\u003e `/**` which renders as a doc-comment.\n\nThe content of the doc-comment should conform to the [Commonmark](https://spec.commonmark.org/0.30/) specification.\n\n### Example\n\nThe following is an example of markdown documentation for new and current users of nixdoc.\n\n\u003e Sidenote: Indentation is automatically detected and should be consistent across the content. \n\u003e \n\u003e If you are used to multiline-strings (`''`) in nix this should be intuitive to follow.\n\n````nix\n{\n  /** \n    This function adds two numbers\n\n    # Example\n\n    ```nix\n    add 4 5\n    =\u003e\n    9\n    ```\n\n    # Type\n\n    ```\n    add :: Number -\u003e Number -\u003e Number\n    ```\n\n    # Arguments\n\n    a\n    : The first number\n    \n    b\n    : The second number\n    \n  */\n  add = a: b: a + b;\n}\n````\n\n\u003e Note: Within nixpkgs the convention of using [definition-lists](https://www.markdownguide.org/extended-syntax/#definition-lists) for documenting arguments has been established.\n\n## Usage\n\nRefer to `nixdoc --help` for the most up-to-date usage information.\n\nFor a minimal format, suitable for inclusion into a dedicated documentation page, use:\n\n```sh\nnixdoc --file lib.nix --category \"\" --description \"\" --prefix \"\" --anchor-prefix \"\" \u003elib.md\n```\n\n## Custom nixdoc format (Legacy)\n\nYou should consider migrating to the newer format described above.\n\nSee [Migration guide](./doc/migration.md).\n\n### Comment format (legacy)\n\nIdentifiers are included in the documentation if they have\na preceding comment in multiline syntax `/* something */`. You should consider migrating to the new format described above.\n\nTwo special line beginnings are recognized:\n\n* `Example:` Everything following this line will be assumed to be a\n  verbatim usage example.\n* `Type:` This line will be interpreted as a faux-type signature.\n\nThese will result in appropriate elements being inserted into the\noutput.\n\n### Function arguments (legacy)\n\nFunction arguments can be documented by prefixing them with a comment:\n\n```\n/* This function does the thing a number of times. */\nmyFunction =\n    # The thing to do\n    thing:\n    # How many times to do it\n    n: doNTimes n thing\n```\n\n## Caveats \u0026 TODOs\n\nPlease check the [issues](https://github.com/nix-community/nixdoc/issues) page.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnixdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnix-community%2Fnixdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnix-community%2Fnixdoc/lists"}