Skip to content

kazushisan/lscode

Repository files navigation

lscode

npm version CI

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.

Why lscode?

🎯 Deterministic and Precise

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.

🤖 Designed for AI-Driven Workflows

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.

🏗️ Built for TypeScript

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.

Quick Start

  1. Install lscode.
npm install -g lscode
  1. Navigate to your TypeScript project.
cd /path/to/your/project
  1. 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

Usage

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.

Author

Kazushi Konosu (https://github.com/kazushisan)

License

MIT License

About

TypeScript's LanguageService for AI Coding Agents

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors