{"id":13601330,"url":"https://github.com/modernice/jotbot","last_synced_at":"2025-04-30T05:48:30.875Z","repository":{"id":153796437,"uuid":"630254006","full_name":"modernice/jotbot","owner":"modernice","description":"JotBot generates the missing code documentation for your Go and TypeScript projects. Powered by AI.","archived":false,"fork":false,"pushed_at":"2024-08-27T16:11:53.000Z","size":1049,"stargazers_count":36,"open_issues_count":2,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-30T05:48:12.907Z","etag":null,"topics":["ai","chat","chatgpt","documentation","generator","gpt","gpt-3","gpt-35-turbo","gpt-4","openai","ts","typescript"],"latest_commit_sha":null,"homepage":"","language":"Go","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/modernice.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"bounoable"}},"created_at":"2023-04-20T01:54:29.000Z","updated_at":"2025-02-27T02:49:35.000Z","dependencies_parsed_at":"2024-05-14T13:46:06.272Z","dependency_job_id":"d430be3e-39fb-4a39-a786-f184211aa4ec","html_url":"https://github.com/modernice/jotbot","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernice%2Fjotbot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernice%2Fjotbot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernice%2Fjotbot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/modernice%2Fjotbot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/modernice","download_url":"https://codeload.github.com/modernice/jotbot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251651220,"owners_count":21621702,"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":["ai","chat","chatgpt","documentation","generator","gpt","gpt-3","gpt-35-turbo","gpt-4","openai","ts","typescript"],"created_at":"2024-08-01T18:01:00.627Z","updated_at":"2025-04-30T05:48:30.850Z","avatar_url":"https://github.com/modernice.png","language":"Go","funding_links":["https://github.com/sponsors/bounoable"],"categories":["chatgpt"],"sub_categories":[],"readme":"# JotBot - AI-powered code documentation\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/modernice/jotbot.svg)](https://pkg.go.dev/github.com/modernice/jotbot)\n[![Test](https://github.com/modernice/jotbot/actions/workflows/test.yml/badge.svg)](https://github.com/modernice/jotbot/actions/workflows/test.yml)\n[![jotbot-ts](https://github.com/modernice/jotbot/actions/workflows/jotbot-ts.yml/badge.svg)](https://github.com/modernice/jotbot/actions/workflows/jotbot-ts.yml)\n\n`JotBot` seamlessly auto-generates code documentation for your Go and TypeScript\nprojects, bridging the gap between comprehensive code and insightful documentation.\n\n~~The documentation of this repository was entirely generated by JotBot using\n`gpt-4` but currently (2023/07/18) I get the best results using `gpt-3.5-turbo`.~~\n\n~~OpenAI's `gpt-3.5` and `gpt-4` models demonstrate fluctuations in quality over time.\nDetermining which model excels at any given instance can be challenging, but `gpt-4` often yields more consistent results.~~\n\n~~For general applications, I recommend using `gpt-3.5-turbo-16k` as a default,\nand temporarliy switching to `gpt-4` in scenarios where `gpt-3.5` might fall\nshort.~~\n\n`gpt-4-1106-preview` is the best model for generating documentation so far.\nThe default model of JotBot is `gpt-3.5-turbo` which is gives the best value\nfor money.\n\nYou can find generated TypeScript documentation in [packages/jotbot](./packages/jotbot).\n\n## Quick Start\n\n### Install\n\n```\ngo install github.com/modernice/jotbot/cmd/jotbot@latest\n```\n\n#### Add TypeScript Support\n\n```\nnpm i -g jotbot-ts@latest\npnpm i -g jotbot-ts@latest\n```\n\n### Use\n\nWithin your Go and/or TypeScript codebase, run:\n\n```\njotbot generate --key OPENAI_API_KEY\n```\n\n---\n\n## Features\n\n- Generate documentation for Go and TypeScript codebases\n- Customize glob patterns for included and excluded files\n- Filter code symbols by matching regular expressions\n- Limit the number of files to generate documentation for\n- Run in dry mode to preview changes without applying them\n- Control the AI model and token limits used for generating documentation\n- Optionally commit changes to a Git branch\n\n## Models\n\nJotBot utilizes OpenAI's GPT models to generate documentation. By default,\nJotBot uses the `gpt-3.5-turbo` model which provides good results at\na cost-effective rate. ~~However, the best results are produced by `gpt-4` and\n`text-davinci-003`, which are 10-30x more expensive than `gpt-3.5-turbo`.~~\n\nYou are free to choose any model from the [OpenAI Docs](https://platform.openai.com/docs/models)\nand pass it via the `--model|-m` flag:\n\n```\njotbot generate -m text-davinci-003\n```\n\n## Installation\n\n### Via `go install`\n\nIf you have Go installed, you can simply install JotBot using `go install`:\n\n```\ngo install github.com/modernice/jotbot/cmd/jotbot@latest\n```\n\n### Standalone Binary\n\nYou can download the latest binary from the\n[Releases](https://github.com/modernice/jotbot/releases/latest) page.\n\n### TypeScript Support\n\nTo enable TypeScript (and JavaScript) support, you also need to install the\n`jotbot-ts` npm package.\n\n```\nnpm install -g jotbot-ts\npnpm install -g jotbot-ts\n```\n\n## Usage\n\nTo generate missing documentation for your codebase, run the following command:\n\n```\njotbot generate [options]\n```\n\nBy default, this command will find all Go and TypeScript (and JavaScript) files\nin the current and nested directories and generate documentation for them.\nExcluded from the search are by default:\n\n- `**/.*/**`\n- `**/dist/**`\n- `**/node_modules/**`\n- `**/vendor/**`\n- `**/testdata/**`\n- `**/test/**`\n- `**/tests/**`\n- `**/*.pb.go`\n\n\n### To-Do\n\n- [ ] Configurable OpenAI settings (temperature, top_p etc.)\n- [ ] _Any ideas?_ [open an issue](//github.com/modernice/jotbot/issues) or [start a discussion](//github.com/modernice/jotbot/discussions)\n\n## CLI options\n\n```\njotbot --help\n```\n\n| Option                 | Description                                                             | Default        |\n|------------------------|-------------------------------------------------------------------------|----------------|\n| `--root`               | Root directory of the repository                                        | `\".\"`          |\n| `--include, -i`       | Glob pattern(s) to include files                                        |                |\n| `--include-tests, -T` | Include TestXXX() functions (Go-specific)                               |                |\n| `--exclude, -e`       | Glob pattern(s) to exclude files                                        |                |\n| `--exclude-internal, -E` | Exclude 'internal' directories (Go-specific)                          | `true`         |\n| `--match`             | Regular expression(s) to match identifiers                              |                |\n| `--symbol, -s`        | Symbol(s) to search for in code (TS/JS-specific)                        |                |\n| `--clear, -c`         | Force-clear comments in generation prompt (Go-specific)                 |                |\n| `--branch`             | Branch name to commit changes to (leave empty to not commit)            |                |\n| `--limit`              | Limit the number of files to generate documentation for                 | `0`            |\n| `--dry`                | Print the changes without applying them                                 | `false`        |\n| `--model, -m`          | OpenAI model used to generate documentation                             | `\"gpt-3.5-turbo\"` |\n| `--maxTokens`          | Maximum number of tokens to generate for a single documentation         | `512`          |\n| `--parallel, -p`      | Number of files to handle concurrently                                  | `4`            |\n| `--workers`            | Number of workers to use per file                                       | `2`            |\n| `--override, -o`      | Override existing documentation (Go-specific)                            |                |\n| `--key`                | OpenAI API key                                                          |                |\n| `--verbose, -v`       | Enable verbose logging                                                  | `false`        |\n\n## Screenshots\n\n![JotBot](./.github/screenshot-go.png)\n![JotBot](./.github/screenshot-ts.png)\n\n## License\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernice%2Fjotbot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmodernice%2Fjotbot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmodernice%2Fjotbot/lists"}