{"id":925,"url":"https://github.com/SourceDocs/SourceDocs","last_synced_at":"2025-08-06T13:32:17.635Z","repository":{"id":39840764,"uuid":"105829444","full_name":"SourceDocs/SourceDocs","owner":"SourceDocs","description":"Generate Markdown documentation from source code","archived":false,"fork":false,"pushed_at":"2024-04-02T18:48:15.000Z","size":928,"stargazers_count":380,"open_issues_count":15,"forks_count":39,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-05-23T02:36:41.844Z","etag":null,"topics":["command-line-tool","documentation","documentation-generator","documentation-tool","executable","generator","markdown","swift"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SourceDocs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"eneko","patreon":"eneko"}},"created_at":"2017-10-04T23:23:11.000Z","updated_at":"2024-05-09T05:16:08.000Z","dependencies_parsed_at":"2024-05-13T14:54:00.022Z","dependency_job_id":"d5b25f22-294b-41e2-8af4-703be0898680","html_url":"https://github.com/SourceDocs/SourceDocs","commit_stats":null,"previous_names":["eneko/sourcedocs"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourceDocs%2FSourceDocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourceDocs%2FSourceDocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourceDocs%2FSourceDocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SourceDocs%2FSourceDocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SourceDocs","download_url":"https://codeload.github.com/SourceDocs/SourceDocs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227455972,"owners_count":17777937,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["command-line-tool","documentation","documentation-generator","documentation-tool","executable","generator","markdown","swift"],"created_at":"2024-01-05T20:15:34.768Z","updated_at":"2024-12-09T14:30:50.415Z","avatar_url":"https://github.com/SourceDocs.png","language":"Swift","funding_links":["https://github.com/sponsors/eneko","https://patreon.com/eneko"],"categories":["Command Line","Libs","HarmonyOS","Swift"],"sub_categories":["Linter","Documentation","Windows Manager"],"readme":"# SourceDocs\n\n[![Release](https://img.shields.io/github/release/eneko/sourcedocs.svg)](https://github.com/eneko/SourceDocs/releases)\n[![Build Status](https://travis-ci.org/eneko/SourceDocs.svg?branch=master)](https://travis-ci.org/eneko/SourceDocs)\n[![codecov](https://codecov.io/gh/eneko/SourceDocs/branch/master/graph/badge.svg)](https://codecov.io/gh/eneko/SourceDocs)\n![Swift 5.0](https://img.shields.io/badge/Swift-5.0-orange.svg)\n[![Swift Package Manager Compatible](https://img.shields.io/badge/spm-compatible-brightgreen.svg)](https://swift.org/package-manager)\n[![codebeat badge](https://codebeat.co/badges/99fcf00c-0aec-40de-b3fe-0c7ed9a169cb)](https://codebeat.co/projects/github-com-eneko-sourcedocs-master)\n\n![SourceDocs Header](http://www.enekoalonso.com/media/sourcedocs-header.jpg)\n\nSourceDocs is a command line tool that generates markdown\ndocumentation files from inline source code comments.\n\n![Terminal Output](http://www.enekoalonso.com/media/sourcedocs-terminal.png)\n\nSimilar to Sphinx or Jazzy, SourceDocs parses your Swift source code and\ngenerates beautiful reference documentation. In contrast to those other tools,\nSourceDocs generates markdown files that you can store and browse inline\nwithin your project repository. Or even render with GitHub Pages.\n\n### Features\n- ✅ Generate reference documentation from Xcode projects\n- ✅ Generate reference documentation from Swift Packages\n- ✅ Generate package description documentation from Swift Packages\n\n\n## Generated documentation\nSourceDocs writes documentation files to the `Documentation/Reference` directory relative\nto your project root (path can be configured). This allows for the generated documentation to \nlive along other hand-crafted documentation you might have written or will write in the future.\n\nWhen specifying a module name, the documentation files will be written to\n`Documentation/Reference/\u003cmodule name\u003e`.\n\nIt's recommended adding this generated documentation to the source code\nrepository, so it can be easily browsed inline. GitHub, BitBucket and other source control\nplatforms do a great job rendering Markdown files, so documentation is easy to read.\n\n### Examples of Generated Documentation\n- [SourceDocsLib](/docs/reference/SourceDocsLib)\n- [SourceDocsDemo](/docs/reference/SourceDocsDemo)\n- [SourceDocs Package](/docs/Package.md)\n- [Apollo iOS API Reference](https://www.apollographql.com/docs/ios/api-reference/)\n- [Workflow framework (by Square)](https://square.github.io/workflow/swift/api/Workflow/)\n\n\n## Requirements\n\n| SourceDocs Version | Xcode Version | Swift Version |\n| ------------------ | ------------- | ------------- |\n| 2.x                | 13.1          | 5.5           |\n| 1.x                | 11.5          | 5.1           |\n\n\n## Usage\n\n### Swift Packages\nTo generate documentation for a Swift Package, run `sourcedocs` from the root\nof your package repository.\n\n    $ cd path/to/MyPackage\n    $ sourcedocs generate --all-modules\n\nThis command will generate documentation for each module in your Swift package.\n\nFor a specific module, pass the module name using the `--spm-module` parameter.\n\n    $ sourcedocs generate --spm-module SourceDocsDemo\n\n### Xcode Projects\nTo generate documentation from your source code, run `sourcedocs` \ndirectly from the root your Xcode project.\n\n    $ cd path/to/MyAppOrFramework\n    $ sourcedocs generate\n\nThis command will analyze your Xcode project and generate reference\ndocumentation from all public types found. \n\nUsually, for most Xcode projects, no parameters are needed at all. `xcodebuild`\nshould be able to find the default project and scheme.\n\nIf the command fails, try specifying the scheme (`-scheme SchemeName`) or the\nworkspace. Any arguments passed to `sourcedocs` after `--` will be passed to\n`xcodebuild` without modification.\n\n    $ sourcedocs generate -- -scheme MyScheme\n\n\n## Usage options\nTyping `sourcedocs help` we get a list of all available commands:\n\n    $ sourcedocs help\n    USAGE: source-docs \u003csubcommand\u003e\n\n    OPTIONS:\n      -h, --help              Show help information.\n\n    SUBCOMMANDS:\n      clean                   Delete the output folder and quit.\n      generate                Generates the Markdown documentation\n      package                 Generate PACKAGE.md from Swift package description.\n      version                 Display the current version of SourceDocs\n\nTyping `sourcedocs help \u003ccommand\u003e` we get a list of all options for that command:\n\n    $ sourcedocs generate --help\n\n    OVERVIEW: Generates the Markdown documentation\n\n    USAGE: source-docs generate \u003coptions\u003e\n\n    ARGUMENTS:\n      \u003cxcode-arguments\u003e       List of arguments to pass to xcodebuild \n\n    OPTIONS:\n      -a, --all-modules       Generate documentation for all modules in a Swift package \n      --spm-module \u003cspm-module\u003e\n                              Generate documentation for Swift Package Manager module \n      --module-name \u003cmodule-name\u003e\n                              Generate documentation for a Swift module \n      --link-beginning \u003clink-beginning\u003e\n                              The text to begin links with \n      --link-ending \u003clink-ending\u003e\n                              The text to end links with (default: .md)\n      -i, --input-folder \u003cinput-folder\u003e\n                              Path to the input directory (default: /Users/ramses.alonso/Development/eneko/SourceDocs)\n      -o, --output-folder \u003coutput-folder\u003e\n                              Output directory to clean (default: Documentation/Reference)\n      --min-acl \u003cmin-acl\u003e     Access level to include in documentation [private, fileprivate, internal, public, open] (default: public)\n      -m, --module-name-path  Include the module name as part of the output folder path \n      -c, --clean             Delete output folder before generating documentation \n      -l, --collapsible       Put methods, properties and enum cases inside collapsible blocks \n      -t, --table-of-contents Generate a table of contents with properties and methods for each type\n      -s, --skip-empty        Do not generate documentation for files with no comments. \n      -r, --reproducible-docs Generate documentation that is reproducible: only depends on the sources.\n                              For example, this will avoid adding timestamps on the generated files. \n      -h, --help              Show help information\n\n\n## Installation\n\n### Download Binary\n\n    $ curl -Ls https://github.com/eneko/SourceDocs/releases/latest/download/sourcedocs.macos.zip -o /tmp/sourcedocs.macos.zip\n    $ unzip -j -d /usr/local/bin /tmp/sourcedocs.macos.zip \n\n### From Sources\nRequirements:\n- Swift 5.1 runtime and Xcode installed in your computer.\n\n#### Using Homebrew\n\n    $ brew install sourcedocs\n\n#### Building with Swift Package Manager\n\n    $ git clone https://github.com/eneko/SourceDocs.git\n    $ cd SourceDocs\n    $ make\n\n\n## Contact\nFollow and contact me on Twitter at [@eneko](https://www.twitter.com/eneko).\n\n\n## Contributions\nIf you find an issue, just [open a ticket](https://github.com/eneko/SourceDocs/issues/new)\non it. Pull requests are warmly welcome as well.\n\n\n## License\nSourceDocs is licensed under the MIT license. See [LICENSE](/LICENSE) for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSourceDocs%2FSourceDocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSourceDocs%2FSourceDocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSourceDocs%2FSourceDocs/lists"}