Komment Output
Komment generates documentation at various layers of abstraction, creating comprehensive wikis tailored to your team’s unique needs.
Each wiki is built from the ground up based on the contents and structure of your codebase, ensuring that it contains relevant documentation. This process is entirely automated with no humans in the loop — Komment will analyse your codebase and determine which type of documentation is appropriate to your project.
Documentation Types
In-code comments
Komment generates meaningful in-code comments for a variety of code constructs, including functions, methods, classes, and other user-defined types. The length and detail of these comments vary according to the complexity of the code — simple functions receive concise, single-line explanations, while more complex classes may include detailed docstrings.
By following language specific formatting and best practice guidelines, Komment ensures that all in-code comments are consistent and appropriately styled.
In-code comments are integrated back into your Git repository as part of a regular Pull Request, providing valuable context for your development team as they work.
Komment runs rigorous AST checks and provides a 100% guarantee that no customer code is ever inadvertently changed as part of in-code comment insertion.
Usage Instructions
Usage instructions provide easy-to-follow steps for running your application. These vary in length and complexity based on the scope of the application, but are typically organised sequentially as step by step instructions, complete with example code snippets.
Usage instructions can be generated both at the project level, and at file-level if appropriate.
API Documentation
Komment generates API docs for a variety of code constructs, including functions, methods, classes, and other user-defined types. The detail and specificity of the description will vary according to the complexity of the code. Contextual documentation, such as errors/exception information will also be included where applicable.
These API docs offer a browsable and searchable version of the software’s reference manual and are complemented with example usage code snippets where applicable.
Endpoint Details
Komment generates a comprehensive list of all API endpoints in your project, providing essential details to streamline integration and usage.
Each endpoint entry includes a clear description, along with a list of supported HTTP methods, allowing developers to quickly understand the endpoint’s purpose and capabilities. All arguments are listed, both required and optional, with descriptions specifying data types and formats, ensuring clarity around how to structure requests.
For endpoints that require a request body, Komment also provides a detailed outline of the body structure, breaking down each key field with its data type and format requirements.
We’re currently working on adding example usage snippets that clearly outline how an endpoint should be used, as well as a complete swagger integration.
Architecture Diagrams
Architecture diagrams are a type of visual documentation that provide a system-wide overview of components and their interactions. These visual representations help clarify the relationships between modules, subsystems, and dependencies, making it easy to understand and communicate system design at a high level.
Komment assesses when an architecture diagram is appropriate based on project complexity and modular interactions
Komment’s diagrammatic output is generated dynamically from the source code, just like other document types, ensuring they remain relevant and in step with the most recent logic of your code!
Security Insights
Komment provides a comprehensive overview of the libraries and dependencies in your codebase, detailing both built-in and third-party libraries.
These insights allow you to visualize inter-module connections and confidently trace information flow across your project, giving you a deeper understanding of dependencies and their security implications.
If appropriate, Komment will also identify potential security optimizations by highlight actionable insights where specific code improvements can enhance security, like best practices for safe dependency usage and prevention of common vulnerabilities.
Code Snippets
Code snippets provide clear and contextualised examples for how to use code. These range from one-line examples for simple functions to fully fledged samples for more complex constructs.
Komment automatically determines where code snippets are relevant and the appropriate level of verbosity.
Code snippets are re-usable and can be copied to your clipboard!
Project Overviews
Komment creates high-level project overviews that provide a broad summary of the codebase. These overviews capture the project’s functionality and purpose, providing a clear understanding of the code’s objectives and how it serves the overall project goals.
We’re continuously expanding the types of documentation Komment can generate and improving the quality of existing documentation — if there’s a doc type you’d like Komment to generate, just let us know!