@compilr-dev/agents-coding
v1.0.2
Published
Multi-language coding tools for AI agents - umbrella package with auto-detection for TypeScript, Python, Go, and more
Maintainers
Readme
@compilr-dev/agents-coding
Multi-language coding tools for AI agents - umbrella package with auto-detection.
Overview
This is the umbrella package that provides a unified interface for all coding tools across multiple programming languages. It automatically detects the language from file extensions and routes to the appropriate parser.
Installation
npm install @compilr-dev/agents-coding @compilr-dev/agentsThis single install gives you:
- Core Tools - Git operations, project detection, smart runners, code search
- TypeScript/JavaScript - AST-based analysis via TypeScript compiler
- Python - AST-based analysis via Tree-sitter
- Go - AST-based analysis via Tree-sitter
Quick Start
import { Agent } from '@compilr-dev/agents';
import {
// Core tools (language-agnostic)
gitStatusTool,
gitDiffTool,
detectProjectTool,
runTestsTool,
// Unified tools with auto-detection
getFileStructureTool,
} from '@compilr-dev/agents-coding';
const agent = new Agent({
provider: yourProvider,
tools: [gitStatusTool, detectProjectTool, getFileStructureTool],
});Package Structure
| Package | Description |
|---------|-------------|
| @compilr-dev/agents-coding | This umbrella (re-exports everything) |
| @compilr-dev/agents-coding-core | Language-agnostic tools (git, runners, search) |
| @compilr-dev/agents-coding-ts | TypeScript/JavaScript analysis |
| @compilr-dev/agents-coding-python | Python analysis |
| @compilr-dev/agents-coding-go | Go analysis |
Language Auto-Detection
The umbrella provides unified tools that automatically detect the language:
import { detectLanguage, getFileStructureTool } from '@compilr-dev/agents-coding';
// Detect language from file path
detectLanguage('src/app.ts'); // 'typescript'
detectLanguage('main.py'); // 'python'
detectLanguage('cmd/server.go'); // 'go'
// Unified tool routes to correct parser
const result = await getFileStructureTool.execute({ path: 'src/app.ts' });
// Uses TypeScript parser automaticallyDirect Language Access
Access language-specific tools directly when needed:
import {
ts, // TypeScript tools
python, // Python tools
go, // Go tools
} from '@compilr-dev/agents-coding';
// Use language-specific tools directly
const tsResult = await ts.getFileStructureTool.execute({ path: 'app.ts' });
const pyResult = await python.getFileStructureTool.execute({ path: 'main.py' });
const goResult = await go.getFileStructureTool.execute({ path: 'main.go' });Core Tools
All language-agnostic tools from @compilr-dev/agents-coding-core:
Git Tools
gitStatusTool- Parsed git statusgitDiffTool- Structured diffsgitLogTool- Commit historygitCommitTool- Safe commit workflowgitBranchTool- Branch managementgitStashTool- Stash operations
Project Detection
detectProjectTool- Detect project type, framework, toolingfindProjectRootTool- Find project root directory
Smart Runners
runTestsTool- Auto-detect and run testsrunLintTool- Auto-detect and run linterrunBuildTool- Auto-detect and run buildrunFormatTool- Auto-detect and run formatter
Code Search
findDefinitionTool- Find symbol definitionsfindReferencesTool- Find symbol usagesfindTodosTool- Find TODO/FIXME comments
Skills
import { codingSkills } from '@compilr-dev/agents-coding';
// Available skills:
// - git-workflow
// - test-driven
// - code-navigation
// - pr-workflow
// - project-onboarding
// - code-optimizationRequirements
- Node.js 18 or higher
- @compilr-dev/agents peer dependency
Related Packages
- @compilr-dev/agents - Core agent library
- @compilr-dev/cli - AI-powered CLI assistant
License
MIT
