TypeScript's LanguageService for AI Coding Agents
lscode brings the power of TypeScript language tools to AI-driven development workflows. lscode is a command-line tool tailored for AI coding agents that leverages TypeScript semantics to provide precise code analysis and manipulation features.
lscode operates on TypeScript’s semantic model rather than raw text, enabling accurate analysis and edits with predictable results—making it a reliable foundation for AI coding agents.
lscode provides an agent-friendly CLI with symbol-based addressing (path/to/file.ts#symbol), so AIs don't have to manage line numbers or character offsets.
lscode is built on lower-level TypeScript LanguageService APIs. Definition lookups return complete, semantically scoped code blocks—not just cursor positions—reducing unnecessary AI calls while enabling richer, context-aware operations.
- Install lscode.
npm install -g lscode- Navigate to your TypeScript project.
cd /path/to/your/project- Try out lscode with your favorite AI coding agent!
Use lscode available in PATH to find references of myFunction in @/src/path/to/file.ts
lscode - TypeScript's LanguageService for AI coding agents
Usage: lscode <command> [options]
Commands:
find-references <file#symbol> Find all references to a symbol in a file
get-definition <file#symbol> Get the definition of a symbol in a file
get-type-definition <file#symbol> Get the type definition of a symbol in a file
quick-info <file#symbol> Get quick info (type and documentation) for a symbol
rename-symbol <file#symbol> <newName> Rename a symbol across all files
rename-file <file> <newFile> Rename a file and update all imports
Options:
--help, -h Show help
--version, -v Show version
Run 'lscode <command> --help' for more information on a command.
Kazushi Konosu (https://github.com/kazushisan)
MIT License