AI-readable documentation generator for code projects
This is the development repository for CodeAtlas. For user documentation and installation instructions, see USER_README.md.
CodeAtlas is a developer tool that generates and maintains an AI-readable documentation system for any code project. It includes a structured .ai-docs/docs/ folder using Markdown + frontmatter, a CLI tool, a local viewer UI, and automated module generation based on scanning your project.
The system helps AI assistants (Cursor, ChatGPT, Claude, etc.) understand your project architecture and maintain documentation automatically.
- Node.js >= 18.0.0
- npm or yarn
# Clone the repository
git clone <repository-url>
cd codeAtlas
# Install dependencies
npm install# Build the project
npm run buildThis will:
- Compile TypeScript to JavaScript in
dist/ - Copy templates to
dist/templates/ - Copy viewer files to
dist/viewer/ - Generate TypeScript declaration files
# Run directly with ts-node (no build needed)
npm run devOr run the built version:
# Build first
npm run build
# Then run
npm startAfter building, you can test the CLI locally:
# Link globally for testing
npm link
# Now you can use ai-docs command
ai-docs --helpOr test without linking:
node dist/index.js --helpcodeAtlas/
├── src/
│ ├── commands/ # CLI command handlers
│ │ ├── init.ts # Initialize documentation
│ │ ├── addModule.ts # Add new module
│ │ ├── scan.ts # Scan and build tree
│ │ └── dev.ts # Development server
│ ├── utils/ # Utility functions
│ │ ├── fileScanner.ts
│ │ ├── frontmatterParser.ts
│ │ ├── usageLogger.ts
│ │ └── ...
│ ├── llm/ # LLM client wrapper
│ │ ├── llmClient.ts
│ │ └── index.ts
│ ├── templates/ # Documentation templates
│ │ ├── codeatlas-rule.mdc
│ │ └── docs/
│ ├── viewer/ # Viewer UI files
│ │ ├── index.html
│ │ ├── style.css
│ │ └── viewer.js
│ └── index.ts # CLI entry point
├── dist/ # Compiled output
├── docs/ # Project documentation
│ ├── ai-index.md
│ ├── ai-rules.md
│ ├── ai-decisions.md
│ ├── ai-changelog.md
│ └── modules/
└── package.json
- Make your changes in
src/ - Run
npm run buildto compile - Test your changes with
npm run devornpm start - Update documentation if needed
- Create a new file in
src/commands/ - Export a handler function
- Register the command in
src/index.ts - Update documentation
- Add utility functions in
src/utils/ - Export from
src/utils/index.tsif needed - Update TypeScript types if necessary
- Update version in
package.json - Run
npm run buildto ensure latest code is compiled - Test with
npm pack --dry-runto verify package contents - Update
CHANGELOG.mdwith new version - Verify all tests pass (if applicable)
# Build the project
npm run build
# Test the package (dry-run)
npm pack --dry-run
# If everything looks good, publish
npm publishNote: The prepublishOnly script will automatically run npm run build before publishing.
Contributions are welcome! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Use TypeScript with strict mode enabled
- Follow existing code patterns
- Add comments for complex logic
- Update documentation for user-facing changes
Proprietary - All Rights Reserved. See LICENSE file for details.
Personal use is permitted. Commercial use, distribution, modification, or sale requires express written permission from Ori Lerman.
For user support, see USER_README.md.
For development questions or issues, please open an issue on the repository.