Skip to content

Repository files navigation

πŸ€– AI AGENT TOOLKIT

πŸš€ Suite of 5 AI-powered CLI agents for automating software development workflows.

CI Version License Node TypeScript Tests Agents Providers PRs

npm toolkit npm doc-generator npm test-generator npm code-review npm refactor npm security-audit

🎬 Demo Β· ⚑ Quick Start Β· πŸ“¦ Installation Β· πŸ€– Agents Β· 🧠 Providers Β· βš™οΈ CLI Flags Β· 🀝 Contributing


πŸ“‹ Overview

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 audit

🎬 See it in action

One 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.md

Before β€” 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;
}

πŸ€– Agents

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.


🧠 Supported AI Providers

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:9b

πŸ“¦ Installation

πŸš€ From npm (published)

npm install -g @aiagentkit/ai-agent-toolkit
npx @aiagentkit/ai-agent-toolkit doc --path ./src

Or install agents individually:

npx @aiagentkit/agent-doc-generator --path ./src
npx @aiagentkit/agent-test-generator --path ./src

πŸ“₯ From repository

git 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 ./src

⚑ Quick Start

The 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.


πŸ—οΈ Architecture

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).


πŸ› οΈ Tech Stack

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)

βš™οΈ CLI Flags

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 ⚠️ Minimum severity (audit) info
--dry-run πŸ‘οΈ Preview only, don't write false
--verbose πŸ“ Detailed logs false

✨ Features

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

πŸ“œ Scripts

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)

πŸ—ΊοΈ Roadmap

  • βœ… 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 .rc files

🀝 Contributing

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 Request

πŸ“„ License

MIT β€” πŸ§‘β€πŸ’» Marcelo Adan


About

Suite of 5 AI-powered CLI agents for automating software development: documentation, testing, code review, refactoring, and security auditing.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages