-
Notifications
You must be signed in to change notification settings - Fork 59
Language Support
geoffrey fernald edited this page Jan 31, 2026
·
5 revisions
Drift supports 10 programming languages with full feature parity across all analysis capabilities.
| Language | CLI Command | Frameworks | ORMs |
|---|---|---|---|
| TypeScript/JS | drift ts |
Express, NestJS, Next.js, Fastify | Prisma, TypeORM, Sequelize, Drizzle, Knex, Mongoose, Supabase |
| Python | drift py |
FastAPI, Django, Flask | Django ORM, SQLAlchemy, Supabase |
| Java | drift java |
Spring Boot | Spring Data JPA, Hibernate |
| C# | drift wpf |
ASP.NET Core, WPF | Entity Framework Core, Dapper |
| PHP | drift php |
Laravel | Eloquent, Doctrine |
| Go | drift go |
Gin, Echo, Fiber, Chi, net/http | GORM, sqlx, Ent, Bun |
| Rust | drift rust |
Actix, Axum, Rocket, Warp | SQLx, Diesel, SeaORM |
| C++ | drift cpp |
Crow, Boost.Beast, Qt | SQLite, ODBC, Qt SQL |
| C | β | β | β |
| Language | Parser | Call Graph | Data Access | Test Topology |
|---|---|---|---|---|
| TypeScript | β tree-sitter | β | β | β |
| JavaScript | β tree-sitter | β | β | β |
| Python | β tree-sitter | β | β | β |
| Java | β tree-sitter | β | β | β |
| C# | β tree-sitter | β | β | β |
| PHP | β tree-sitter | β | β | β |
| Go | β tree-sitter | β | β | β |
| Rust | β tree-sitter | β | β | β |
| C | β tree-sitter | β | β | β |
| C++ | β tree-sitter | β | β | β |
All parsing is done natively in Rust using tree-sitter bindings.
drift ts status # Project overview
drift ts routes # HTTP routes
drift ts components # React components
drift ts hooks # React hooks
drift ts data-access # Database patterns
drift ts decorators # NestJS decorators| Framework | Detection Method |
|---|---|
| Next.js |
next in package.json |
| Express |
express in package.json |
| Fastify |
fastify in package.json |
| NestJS |
@nestjs/core in package.json |
| ORM | Detection | Patterns Detected |
|---|---|---|
| Supabase | @supabase/supabase-js |
.from(), .select(), .insert(), .update(), .delete()
|
| Prisma | @prisma/client |
prisma.model.findMany(), prisma.model.create()
|
| TypeORM | typeorm |
@Entity, getRepository(), Repository<T>
|
| Sequelize | sequelize |
Model.findAll(), Model.findOne(), Model.create()
|
| Drizzle | drizzle-orm |
db.select(), db.insert(), db.update()
|
| Knex | knex |
knex('table'), .where(), .insert()
|
| Mongoose | mongoose |
Schema, Model.find(), Model.findOne()
|
| Raw SQL |
pg, mysql2, better-sqlite3
|
Direct SQL queries |
- Full AST parsing via Tree-sitter
- Decorator extraction (
@Controller,@Injectable, etc.) - Import/export resolution
- React component and hook detection
- Express middleware chain analysis
- Type inference from TypeScript
.ts, .tsx, .js, .jsx, .mjs, .cjs
drift py status # Project overview
drift py routes # HTTP routes
drift py errors # Error handling
drift py data-access # Database patterns
drift py decorators # Decorator usage
drift py async # Async patterns| Framework | Detection Method |
|---|---|
| FastAPI |
@app.get, @app.post decorators |
Django and Flask detected via imports
| ORM | Detection | Patterns Detected |
|---|---|---|
| Django ORM | django |
Model.objects.filter(), Model.objects.get()
|
| SQLAlchemy | sqlalchemy |
session.query(), session.add(), session.commit()
|
| Supabase | supabase |
Same as TypeScript Supabase |
- Full AST parsing via Tree-sitter
- Decorator extraction (
@app.route,@login_required) - Class-based view detection
- Django model and migration analysis
- FastAPI dependency injection
- Type hint extraction (PEP 484)
.py
drift java status # Project overview
drift java routes # HTTP routes
drift java errors # Error handling
drift java data-access # Database patterns
drift java annotations # Annotation usage| Framework | Detection Method |
|---|---|
| Spring Boot |
spring-boot in pom.xml or build.gradle |
| ORM | Detection | Patterns Detected |
|---|---|---|
| Spring Data JPA | spring-data-jpa |
JpaRepository, @Query, EntityManager
|
| Hibernate | hibernate |
Session, @Entity, @Table
|
- Full AST parsing via Tree-sitter
- Annotation extraction (
@RestController,@Service,@Repository) - Spring bean detection and dependency injection
- JPA entity and relationship mapping
- Interface implementation tracking
- Lombok annotation support
.java
drift wpf status # Project overview
drift wpf bindings # XAML bindings
drift wpf mvvm # MVVM compliance
drift wpf datacontext # DataContext resolution
drift wpf commands # ICommand implementations| Framework | Detection Method |
|---|---|
| ASP.NET Core |
Microsoft.AspNetCore in .csproj |
| WPF |
.xaml files with WPF namespaces |
| ORM | Detection | Patterns Detected |
|---|---|---|
| Entity Framework Core | Microsoft.EntityFrameworkCore |
DbContext, .Where(), .ToList(), .SaveChanges()
|
| Dapper | Dapper |
connection.Query(), connection.Execute()
|
- Full AST parsing via Tree-sitter
- Attribute extraction (
[ApiController],[HttpGet],[Authorize]) - Controller and action detection
- DbContext usage tracking
- Dependency injection patterns
- LINQ query detection
- WPF ViewModel and Command patterns
.cs
drift php status # Project overview
drift php routes # HTTP routes
drift php errors # Error handling
drift php data-access # Database patterns
drift php traits # Trait usage| Framework | Detection Method |
|---|---|
| Laravel |
laravel/framework in composer.json |
| ORM | Detection | Patterns Detected |
|---|---|---|
| Eloquent | laravel/framework |
Model::where(), Model::find(), ->save()
|
| Doctrine | doctrine/orm |
EntityManager, Repository, @ORM\Entity
|
- Full AST parsing via Tree-sitter
- Attribute/annotation extraction
- Laravel controller and route detection
- Eloquent model and relationship analysis
- Middleware detection
- Service provider patterns
.php
drift go status # Project overview
drift go routes # HTTP routes
drift go errors # Error handling
drift go interfaces # Interface analysis
drift go data-access # Database patterns
drift go goroutines # Concurrency patterns| Framework | Detection Method |
|---|---|
| Gin |
gin.Context, gin.Engine
|
| Echo |
echo.Context, echo.Echo
|
| Fiber |
fiber.Ctx, fiber.App
|
| Chi |
chi.Router, chi.Mux
|
| net/http |
http.HandleFunc, http.ListenAndServe
|
| ORM | Detection | Patterns Detected |
|---|---|---|
| GORM | gorm.io/gorm |
db.Create(), db.Find(), db.Where()
|
| sqlx | github.com/jmoiron/sqlx |
db.Select(), db.Get(), db.Exec()
|
| Ent | entgo.io/ent |
Schema definitions, queries |
| Bun | github.com/uptrace/bun |
db.NewSelect(), db.NewInsert()
|
- Full AST parsing via Tree-sitter
- Function and method extraction
- Interface and struct analysis
- Goroutine and defer detection
- Error handling pattern detection (
if err != nil) - Package-level analysis
.go
drift rust status # Project overview
drift rust routes # HTTP routes
drift rust errors # Error handling
drift rust traits # Trait analysis
drift rust data-access # Database patterns
drift rust async # Async patterns| Framework | Detection Method |
|---|---|
| Actix Web |
#[actix_web::main], #[get], #[post]
|
| Axum |
axum::Router, axum::extract
|
| Rocket |
#[rocket::main], #[get], #[post]
|
| Warp |
warp::Filter, warp::path
|
| ORM | Detection | Patterns Detected |
|---|---|---|
| SQLx | sqlx |
sqlx::query!, sqlx::query_as!
|
| Diesel | diesel |
Schema macros, QueryDsl
|
| SeaORM | sea-orm |
Entity definitions, queries |
- Full AST parsing via Tree-sitter
- Function, method, and impl block extraction
- Trait and struct analysis
- Async/await pattern detection
- Result/Option error handling
- Macro invocation tracking
- Lifetime and generic analysis
.rs
drift cpp status # Project overview
drift cpp classes # Class analysis
drift cpp memory # Memory management
drift cpp templates # Template analysis
drift cpp virtual # Virtual functions| Framework | Detection Method |
|---|---|
| Crow |
crow::SimpleApp, CROW_ROUTE
|
| Boost.Beast | boost::beast::http |
| Qt Network |
QNetworkAccessManager, QHttpServer
|
| Library | Detection | Patterns Detected |
|---|---|---|
| SQLite | sqlite3.h |
sqlite3_prepare(), sqlite3_step()
|
| ODBC | sql.h |
SQLConnect(), SQLExecDirect()
|
| Qt SQL | QSqlDatabase |
QSqlQuery, QSqlDatabase::open()
|
- Full AST parsing via Tree-sitter
- Class, struct, and template extraction
- Virtual function and inheritance analysis
- RAII and smart pointer detection
- Namespace analysis
- Preprocessor macro detection
- Constructor/destructor tracking
.cpp, .cc, .cxx, .c++, .hpp, .hh, .hxx, .h, .ipp, .tpp
- Full AST parsing via Tree-sitter
- Function signature extraction
- Include analysis
- Struct definitions
- Preprocessor macro detection
.c, .h
Drift uses native Rust tree-sitter bindings for maximum performance:
- Parse β Source code β Abstract Syntax Tree (native Rust)
- Extract β Functions, classes, decorators, imports
- Resolve β Call targets, data access points
- Build β Call graph stored in SQLite
Performance: ~0.5ms per file (10x faster than WASM)
Drift combines AST parsing with regex fallback:
Source Code
β
βββββββββββββββββββ
β Tree-sitter β β Primary (high confidence)
β AST Parsing β
ββββββββββ¬βββββββββ
β
β (if fails)
βββββββββββββββββββ
β Regex Fallback β β Secondary (lower confidence)
β Extraction β
ββββββββββ¬βββββββββ
β
β
Call Graph + Patterns
# Show parser status
drift parser
# Test parser functionality
drift parser --testOutput:
Parser Status
=============
TypeScript: β
Ready (tree-sitter-typescript)
JavaScript: β
Ready (tree-sitter-javascript)
Python: β
Ready (tree-sitter-python)
Java: β
Ready (tree-sitter-java)
C#: β
Ready (tree-sitter-c-sharp)
PHP: β
Ready (tree-sitter-php)
Go: β
Ready (tree-sitter-go)
Rust: β
Ready (tree-sitter-rust)
C: β
Ready (tree-sitter-c)
C++: β
Ready (tree-sitter-cpp)
Drift handles polyglot codebases seamlessly:
# Scan everything
drift scan
# Scan specific language
drift scan --include "**/*.py"
# Scan multiple languages
drift scan --include "**/*.ts" --include "**/*.py"The call graph connects across languages when possible:
- TypeScript frontend β Python API
- Go service β Rust library
- C# backend β C++ native module
| Category | Count |
|---|---|
| Languages | 10 |
| Web Frameworks | 21 |
| ORMs / Data Access | 16 |
| Base Pattern Detectors | 400+ |
- Cortex V2 Overview
- Memory Setup Wizard
- Memory CLI
- Universal Memory Types
- Learning System
- Token Efficiency
- Causal Graphs
- Code Generation
- Predictive Retrieval
- Architecture
- Call Graph Analysis
- Impact Analysis
- Security Analysis
- Data Boundaries
- Test Topology
- Coupling Analysis
- Error Handling Analysis
- Wrappers Detection
- Environment Variables
- Constants Analysis
- Styling DNA
- Constraints
- Contracts
- Decision Mining
- Speculative Execution
- Watch Mode
- Trends Analysis
- Projects Management
- Package Context
- Monorepo Support
- Reports & Export
- Dashboard
- 10 Languages
- 21 Frameworks
- 16 ORMs
- 400+ Detectors
- 50+ MCP Tools
- 60+ CLI Commands
- 23 Memory Types