yar-agent
v0.4.2
Published
Understand Complex Codebases Fast - An agentic CLI tool for analyzing and understanding codebases
Maintainers
Readme
Yar — Understand Complex Codebases Fast
Yar is an CLI agent, built with Claude Agent SDK, which analyzes complex and large codebases and generate documentation. It reads code, understands architecture, and creates onboarding guides and presentations automatically.
⚙️ Installation
npm install -g yar-agent📋 Requirements
- Node.js 18+
- Claude Code CLI installed and configured
🤖 Usage
Study a codebase
yar study .Creates GUIDE.md by default. Customize output:
yar study . -o ONBOARDING.mdsee this onboarding guide, generated by Yar: CONTRIBUTOR_ONBOARDING.md
or direct the agent to focus on specific areas:
yar study . -m "I'm joining this project as security engineer. Focus on security patterns"Trace Codebase history
yar timeline .Creates TIMELINE.md by default. Customize output:
yar timeline . -o HISTORY.mdCreate a presentation
To consume the documentations faster, you can use Yar to quickly generate a presentation:
yar present -f GUIDE.mdCreates GUIDE.slides.html and serves it by default. Customize:
yar present -f GUIDE.md -o onboarding.html --no-serveor combine multiple documentations into a single presentation:
yar present -f ONBOARDING.md -f TIMELINE.mdor direct the agent to focus on specific aspects, or style the presentation:
yar present -f ONBOARDING.md -f TIMELINE.md -m "Explain the API layer more detailed, and of course use dark theme with blue accents!"Complete usage documentation: USAGE.md
➕ Features
Autonomous exploration: AI agents use Read, Grep, Glob, and other tools to navigate code like a developer would.
Automatic updates: Running commands on existing output files updates them with new findings rather than overwriting.
CI/CD integration: Can be run in GitHub Actions or other CI systems to keep documentation current.
- name: Update documentation
run: yar study .💡 Tip: if the output file already exists, Yar will first read it and then automatically update it with new findings rather than overwriting it completely.
Progressive output: Agents write analysis incrementally using Write and Edit tools, with file access restricted to specified output paths.
Piped input: Accepts stdin for additional context.
git diff | yar study .🤝 Contributing
See CONTRIBUTOR_ONBOARDING.md for architecture and development workflow.
Update the contributor guide:
pnpm onboarding:updateWhy this name?
In Farsi (my mother language), YAR (یار) means companion.
Links
License
MIT © Alireza Sheikholmolouki
