Skip to main content

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

Click the Create button in the top right and select AI - code snippets to create a document.

Add snippets

Click Add Snippets to bring up the Snippet Studio.

Select snippets from any file

  1. Navigate to any file, from any connected repository.
  2. Highlight your code snippet(s). Choose Add & close if you are done selecting snippets, or click Add & continue if you would like to add multiple snippets to your content.

Note: The order in which you select 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. 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.



The draft created is local to your browser. Don't forget to commit the doc to your repository when finished!

Need help?

Head over to the /ask Swimm FAQ section.


This document is automatically kept up to date using Swimm.