• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
nbbaier

nbbaier

draftReadme

Remix of nbbaier/readmeGPT
Public
Like
draftReadme
Home
Code
2
README.md
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
Code
/
Search
README.md

Code Documentation Assistant

The Code Documentation Assistant is an AI-powered tool that helps generate documentation for code. It uses the OpenAI GPT-3.5 Turbo model to generate readme files in GitHub-flavored markdown based on the provided code.

Usage

Importing the Code Documentation Assistant

import { draftReadme, writeReadme } from "code-doc-assistant";

Function: draftReadme

async function draftReadme(options: WriterOptions): Promise<string>

The draftReadme function generates a readme file based on the provided options.

Parameters

  • options (required): An object containing the following properties:
    • username (string): The username of the code owner.
    • valName (string): The name of the Val containing the code.
    • model (optional, default: "gpt-3.5-turbo"): The OpenAI model to use for generating the readme.
    • userPrompt (optional): Additional prompt to include in the documentation.

Return Value

A promise that resolves to a string representing the generated readme file.

Function: writeReadme

async function writeReadme(options: WriterOptions): Promise<string>

The writeReadme function generates a readme file and updates the readme of the corresponding Val with the generated content.

Parameters

  • options (required): An object containing the following properties:
    • username (string): The username of the code owner.
    • valName (string): The name of the Val containing the code.
    • model (optional, default: "gpt-3.5-turbo"): The OpenAI model to use for generating the readme.
    • userPrompt (optional): Additional prompt to include in the documentation.

Return Value

A promise that resolves to a string indicating the success of the readme update.

Example

import { draftReadme, writeReadme } from "code-doc-assistant"; const options = { username: "your-username", valName: "your-val-name", }; const generatedReadme = await draftReadme(options); console.log(generatedReadme); const successMessage = await writeReadme(options); console.log(successMessage);

License

This project is licensed under the MIT License.

Migrated from folder: projects/gptTools/draftReadme

Code
README.mdmain.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.