JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 433
  • Score
    100M100P100Q93018F
  • License MIT

Multi-language coding tools for AI agents - umbrella package with auto-detection for TypeScript, Python, Go, and more

Package Exports

  • @compilr-dev/agents-coding
  • @compilr-dev/agents-coding/core
  • @compilr-dev/agents-coding/dispatcher

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/agents

This 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 automatically

Direct 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 status
  • gitDiffTool - Structured diffs
  • gitLogTool - Commit history
  • gitCommitTool - Safe commit workflow
  • gitBranchTool - Branch management
  • gitStashTool - Stash operations

Project Detection

  • detectProjectTool - Detect project type, framework, tooling
  • findProjectRootTool - Find project root directory

Smart Runners

  • runTestsTool - Auto-detect and run tests
  • runLintTool - Auto-detect and run linter
  • runBuildTool - Auto-detect and run build
  • runFormatTool - Auto-detect and run formatter
  • findDefinitionTool - Find symbol definitions
  • findReferencesTool - Find symbol usages
  • findTodosTool - 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-optimization

Requirements

  • Node.js 18 or higher
  • @compilr-dev/agents peer dependency

License

MIT