π Suite of 5 AI-powered CLI agents for automating software development workflows.
π¬ Demo Β· β‘ Quick Start Β· π¦ Installation Β· π€ Agents Β· π§ Providers Β· βοΈ CLI Flags Β· π€ Contributing
AI Agent Toolkit is a monorepo grouping 5 independent AI agents, each specialized in a different development task. They share a unified CLI, common stack, and support multiple AI providers.
npx @aiagentkit/ai-agent-toolkit doc ./src # π automatic documentation
npx @aiagentkit/ai-agent-toolkit test ./src # π§ͺ unit tests
npx @aiagentkit/ai-agent-toolkit review ./src # π code review
npx @aiagentkit/ai-agent-toolkit refactor ./src # β»οΈ refactoring
npx @aiagentkit/ai-agent-toolkit audit ./src # π‘οΈ security auditOne command turns an undocumented file into documented code β here with a local Ollama model, no API key needed:
$ npx @aiagentkit/ai-agent-toolkit doc --path ./src --provider ollama
=== Agent Doc Generator v2.1.0 ===
β Provider: ollama | Model: qwen2.5-coder:1.5b
β Found 1 file(s) to process.
β [1/1] src/userService.ts β [DOC]
β Documentation generated: DOCS.mdBefore β userService.ts without docs:
export class UserService {
private users: User[] = [];
addUser(name: string, email: string): User {
const user: User = { id: this.users.length + 1, name, email };
this.users.push(user);
return user;
}
}After β DOCS.md, generated automatically:
/**
* Adds a new user to the service.
*
* @param {string} name - The name of the user.
* @param {string} email - The email address of the user.
* @returns {User} The added user object.
*/
addUser(name: string, email: string): User {
const user: User = { id: this.users.length + 1, name, email };
this.users.push(user);
return user;
}| Command | Package | Version | Description |
|---|---|---|---|
ai-toolkit doc |
@aiagentkit/agent-doc-generator |
v1.0.1 | π Generates JSDoc documentation automatically |
ai-toolkit test |
@aiagentkit/agent-test-generator |
v1.0.1 | π§ͺ Generates unit tests with Vitest |
ai-toolkit review |
@aiagentkit/agent-code-review |
v1.0.1 | π Analyzes code quality and cyclomatic complexity |
ai-toolkit refactor |
@aiagentkit/agent-refactor |
v1.0.1 | β»οΈ Suggests and applies refactorizations with diffs |
ai-toolkit audit |
@aiagentkit/agent-security-audit |
v1.0.1 | π‘οΈ OWASP Top 10 security audit |
π‘ Each agent is an independent npm package. Install them separately or use the unified CLI.
Supports 5 providers with automatic detection. If you don't specify --provider, the toolkit detects what you have configured.
| Provider | Default Model | Auth | Notes |
|---|---|---|---|
| π· Gemini | gemini-2.5-flash |
GEMINI_API_KEY |
Free tier available |
| π’ OpenAI | gpt-4o |
OPENAI_API_KEY |
GPT-4o, GPT-4o-mini |
| π Anthropic | claude-sonnet-4-20250514 |
ANTHROPIC_API_KEY |
Best for coding |
| π΅ DeepSeek | deepseek-chat |
DEEPSEEK_API_KEY |
Most affordable |
| π¦ Ollama | local model | No key | Local, free, full privacy |
π Detection priority: OpenAI > Anthropic > DeepSeek > Gemini > Ollama
# π― Specify provider explicitly
npx @aiagentkit/ai-agent-toolkit doc --path ./src --provider openai
npx @aiagentkit/ai-agent-toolkit audit --path ./src --provider ollama --model qwen3.5:9bnpm install -g @aiagentkit/ai-agent-toolkit
npx @aiagentkit/ai-agent-toolkit doc --path ./srcOr install agents individually:
npx @aiagentkit/agent-doc-generator --path ./src
npx @aiagentkit/agent-test-generator --path ./srcgit clone https://github.com/MarceloAdan73/ai-agent-toolkit.git
cd ai-agent-toolkit
npm install && npm run build
# βοΈ Configure a provider (API keys are read from .env)
echo "GEMINI_API_KEY=your_key" > .env
# Or set any of: OPENAI_API_KEY, ANTHROPIC_API_KEY, DEEPSEEK_API_KEY
# βΆοΈ Run
node toolkit/dist/cli.js doc --path ./srcThe problem: you have a legacy repo with 50 undocumented files and no time to write JSDoc by hand (~4 hours of work).
The fix: one command.
# 1. Install the toolkit once
npm install -g @aiagentkit/ai-agent-toolkit
# 2. Document your whole src/ folder (auto-detects provider, or set one)
npx @aiagentkit/ai-agent-toolkit doc --path ./src
# 3. Get a single DOCS.md with every public API documentedπ‘ Try it locally with no API key at all: install Ollama, pull a model (
ollama pull qwen2.5-coder:1.5b), and run with--provider ollama.
ai-agent-toolkit/
βββ package.json # π¦ npm workspaces
βββ toolkit/ # π₯οΈ Unified CLI (ai-toolkit)
β βββ src/cli.ts
βββ agent-doc-generator/ # π documentation
βββ agent-test-generator/ # π§ͺ unit tests
βββ agent-code-review/ # π code review
βββ agent-refactor/ # β»οΈ refactoring
βββ agent-security-audit/ # π‘οΈ OWASP security audit
Each agent contains: src/ (logic), tests/ (Vitest), index.ts (entry point), package.json (bin, files, engines).
| Layer | Technology |
|---|---|
| π» Language | TypeScript (strict mode) |
| β‘ Runtime | Node.js >= 18 (ES Modules) |
| π§ AI Providers | Gemini, OpenAI, Anthropic, DeepSeek, Ollama |
| π₯οΈ CLI | Commander.js |
| β³ Progress UI | ora |
| π§ͺ Testing | Vitest (626 tests) |
| π CI/CD | GitHub Actions |
| π¦ Bundling | tsc (TypeScript compiler) |
| Flag | Description | Default |
|---|---|---|
--path |
π File or folder to process | (required) |
--provider |
π§ gemini | openai | anthropic | deepseek | ollama |
auto-detected |
--model |
π€ Model to use | per provider |
--base-url |
π Server URL (Ollama) | http://localhost:11434 |
--api-key |
π API key (optional for Ollama) | .env |
--max-chars |
π Character limit per file | 15000 |
--output |
π Output folder/file | next to source |
--extensions |
π Extensions to process (CSV) | all |
--split |
π One file per source | false |
--format |
π terminal | markdown | html | pdf |
terminal |
--severity |
info |
|
--dry-run |
ποΈ Preview only, don't write | false |
--verbose |
π Detailed logs | false |
| Feature | Description |
|---|---|
| π§ Multi-provider | 5 AI providers with auto-detection |
| πΎ Smart cache | MD5 hash, skips unchanged files |
| π Resilience | 3 retries with backoff on API errors |
| βοΈ Safe truncation | Large files trimmed with warning |
| π Extension filter | --extensions .ts,.prisma to limit scope |
| π Export | Terminal, Markdown, HTML or PDF |
| ποΈ Dry-run | Preview before writing changes |
| π Split mode | One output file per analyzed source |
npm run build # ποΈ build all packages
npm run test # π§ͺ 626 tests
npm run typecheck # π strict typecheck
npm run test:integration # π tests with real providers (requires API keys)- β 5 functional agents with 626 tests
- β
Unified CLI
ai-toolkit - β Multi-provider + auto-detection
- β Response caching
- β HTML/PDF export
- β CI/CD with GitHub Actions
- β Ready for npm publishing
- β Publish to npm
- β³ Integration tests with real providers
- β³ Configuration via
.rcfiles
Contributions are welcome! Open an issue or a PR.
# 1. π΄ Fork
# 2. π Create branch
git checkout -b feature/new-feature
# 3. πΎ Commit
git commit -m 'Add new feature'
# 4. π€ Push
git push origin feature/new-feature
# 5. π Pull RequestMIT β π§βπ» Marcelo Adan