Create doc from Code Snippets with AI
Generally, you can link code snippets within your documents to build documentation that lives in your code. With Swimm AI, you can leverage automated document generation from code snippets to maximize your efficiency, eliminating the need to create documentation from scratch.
Follow these steps:
Create a new doc from your repo's homepage
On a repository's page, click Create
, and you will see options to create a document.
Select Code files to doc
to create a document from code snippets you choose. Click Create
.
Or, select Code to doc
in a blank document to add code snippets and generate a document.
Add snippets to your doc
Inside the Snippet Studio, select code snippets from any file in any of your connected repositories.
Highlight your code snippet(s).
- Choose Add & close if you are done selecting snippets
- Click Add & continue if you would like to add multiple snippets to your content.
Note: The order in which you select or arrange your code snippets is the order they will appear in the generated Swimm document.
Give your doc a title
Once you're done selecting snippets, you will be prompted to give your document a title. State your documents purpose and be descriptive.
(Optional) Add instructions or an outline to guide Swimm's AI to meet your expectations.
Click Generate
.
Review and modify your AI generated doc
Once Swimm AI has analyzed your snippets, you will see the content generated before you. Once completed, feel free to code-couple elements in the document, modify the content, and add additional information.
Need to re-run the document created from your code snippets?
- Click on the
Revert and edit prompt
button.
Commit your document
The draft created is local to your browser. Once your document is final, commit it to your repository.
Need help?
Head over to the /ask Swimm FAQ section or security page to learn more about our Azure OpenAI Integration.
This document is automatically kept up to date using Swimm.