{"id":41603721,"url":"https://github.com/dielduarte/janusdoc","last_synced_at":"2026-01-24T10:53:37.584Z","repository":{"id":330913571,"uuid":"1116445636","full_name":"dielduarte/janusdoc","owner":"dielduarte","description":null,"archived":false,"fork":false,"pushed_at":"2025-12-29T02:47:52.000Z","size":551,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-31T20:23:24.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dielduarte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-14T21:41:25.000Z","updated_at":"2025-12-29T04:13:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/dielduarte/janusdoc","commit_stats":null,"previous_names":["dielduarte/janusdoc"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/dielduarte/janusdoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fjanusdoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fjanusdoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fjanusdoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fjanusdoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dielduarte","download_url":"https://codeload.github.com/dielduarte/janusdoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dielduarte%2Fjanusdoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28725378,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2026-01-24T10:53:37.035Z","updated_at":"2026-01-24T10:53:37.575Z","avatar_url":"https://github.com/dielduarte.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/dielduarte/janusdoc/blob/main/assets/janusdoc-logo.png?raw=true\" alt=\"Janusdoc Logo\" width=\"250\" /\u003e\n\u003c/p\u003e\n\n# Janusdoc\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#quick-start\"\u003eQuick Start\u003c/a\u003e •\n  \u003ca href=\"#commands\"\u003eCommands\u003c/a\u003e •\n  \u003ca href=\"#cicd-integration\"\u003eCI/CD\u003c/a\u003e •\n  \u003ca href=\"https://github.com/dielduarte/janusdoc-evals\"\u003eEvaluation Suite\u003c/a\u003e\n\u003c/p\u003e\n\nAI-powered documentation update suggester for pull requests. JanusDoc analyzes code changes in your PRs and automatically suggests documentation updates based on your project's existing docs and style guide.\n\n## Installation\n\n```bash\nnpm install -g janusdoc\n```\n\nOr use with npx:\n\n```bash\nnpx janusdoc [command]\n```\n\n## Quick Start\n\n1. Initialize JanusDoc in your project:\n\n   ```bash\n   janusdoc init\n   ```\n\n2. Analyze a pull request:\n   ```bash\n   janusdoc run --pr 123 --repo owner/repo\n   ```\n\n## Commands\n\n### `janusdoc init`\n\nInitialize JanusDoc in your current project. This command will:\n\n- Detect or create your documentation directory\n- Generate a `.janusdoc.json` configuration file\n- Scan your existing documentation\n- Generate an AI-powered style guide based on your docs\n- Generate a documentation map describing each file's purpose and relationships\n- Create embeddings for semantic search\n\n**Options:**\n\n- `-d, --docs-path \u003cpath\u003e` - Path to documentation directory (default: auto-detected or \"docs\")\n\n**Example:**\n\n```bash\njanusdoc init\njanusdoc init --docs-path documentation\n```\n\n**Environment Variables:**\n\n- `OPENAI_API_KEY` - Required for AI-powered features (style guide generation and semantic search)\n\n### `janusdoc run`\n\nAnalyze a pull request and suggest documentation updates. Posts a comment on the PR with suggestions if documentation updates are needed.\n\n**Required Options:**\n\n- `-p, --pr \u003cnumber\u003e` - Pull request number\n- `-r, --repo \u003cowner/repo\u003e` - Repository in owner/repo format\n\n**Optional:**\n\n- `-t, --token \u003ctoken\u003e` - GitHub token (defaults to `GITHUB_TOKEN` environment variable)\n\n**Example:**\n\n```bash\n# Using GITHUB_TOKEN from environment\njanusdoc run --pr 42 --repo myorg/myproject\n\n# Providing token explicitly\njanusdoc run --pr 42 --repo myorg/myproject --token ghp_xxxxx\n```\n\n**Environment Variables:**\n\n- `GITHUB_TOKEN` - GitHub personal access token with repo access\n- `OPENAI_API_KEY` - Required for AI-powered analysis\n\n## Configuration\n\nAfter running `janusdoc init`, a `.janusdoc.json` file is created:\n\n```json\n{\n  \"docsPath\": \"docs\"\n}\n```\n\n### Configuration Options\n\n| Option             | Type   | Default  | Description                                                       |\n| ------------------ | ------ | -------- | ----------------------------------------------------------------- |\n| `docsPath`         | string | `\"docs\"` | Path to your documentation directory                              |\n| `search.topN`      | number | `15`     | Maximum number of relevant docs to consider during analysis       |\n| `search.threshold` | number | `0.15`   | Minimum similarity score (0-1) for docs to be considered relevant |\n\n**Example with all options:**\n\n```json\n{\n  \"docsPath\": \"documentation\",\n  \"search\": {\n    \"topN\": 5,\n    \"threshold\": 0.5\n  }\n}\n```\n\n\u003e **Tip:** Lower the `threshold` if JanusDoc is missing relevant docs. Raise it if you're getting too many false positives.\n\n### Generated Files\n\nJanusDoc also creates a `.janusdoc/` directory containing:\n\n- `auto_styleguide.md` - Auto-generated documentation style guide (can be customized)\n- `doc_map.md` - Documentation map describing each file's purpose, when to update it, and related files\n- `embeddings.json` - Vector embeddings for semantic search\n\n## How It Works\n\n1. **Initialization**: JanusDoc scans your documentation and generates:\n\n   - A style guide based on your existing docs\n   - A documentation map describing each file's purpose and relationships\n   - Vector embeddings for semantic search\n\n2. **PR Analysis**: When analyzing a PR, JanusDoc:\n   - Fetches the code changes from GitHub\n   - Summarizes the changes using AI (including documentation impact)\n   - Uses semantic search to find relevant documentation\n   - Uses the documentation map to understand file relationships\n   - Analyzes whether documentation updates are needed\n   - Posts suggestions as a PR comment\n\n## CI/CD Integration\n\nAdd JanusDoc to your GitHub Actions workflow:\n\n```yaml\nname: Documentation Check\non: [pull_request]\n\njobs:\n  docs-check:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n        with:\n          fetch-depth: 0\n\n      - uses: actions/setup-node@v4\n        with:\n          node-version: \"20\"\n\n      - name: Run JanusDoc\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n          OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}\n        run: |\n          npx janusdoc run --pr ${{ github.event.pull_request.number }} --repo ${{ github.repository }}\n```\n\n## Requirements\n\n- Node.js 18 or higher\n- GitHub personal access token with `repo` scope\n- OpenAI API key for AI-powered features\n\n## License\n\nhttps://osaasy.dev/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fjanusdoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdielduarte%2Fjanusdoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdielduarte%2Fjanusdoc/lists"}