Skip to content

Feature Request: Add support for ArkTS (.ets) / HarmonyOS application development #760

Description

@Happy-26

What problem does this solve?

I am using codebase-memory-mcp for code intelligence in an AI coding agent, and my project is a HarmonyOS application written in ArkTS (file extension .ets). When I run index_repository on the project, I noticed that all .ets files are completely ignored and not indexed by the system.

This makes codebase-memory-mcp unusable for HarmonyOS/OpenHarmony development, which is a rapidly growing ecosystem with millions of developers worldwide.

Proposed solution

I would like codebase-memory-mcp to support ArkTS as a first-class language, including:

Parsing .ets files via tree-sitter AST analysis

Indexing ArkTS-specific language constructs:

@component, @entry, @builder, @Preview, @CustomDialog and other ArkUI decorators

ArkTS state management (@State, @prop, @link, @provide, @consume, @ObjectLink, @observed, @track)

ArkTS's stricter static typing (superset of TypeScript with additional constraints)

Component-based structure and UI declaration syntax

Supporting the typical HarmonyOS project structure (entry/src/main/ets/, feature/, common/, etc.)

Alternatives considered

ArkTS is the primary programming language for HarmonyOS application development, maintained by Huawei. It is a superset of TypeScript with additional static typing constraints and specific syntax for ArkUI declarative UI development.

Tree-sitter grammar exists: There is already a community-developed tree-sitter grammar for ArkTS (tree-sitter-arkts, https://github.com/Million-mo/tree-sitter-arkts) available on GitHub and via package managers. This means the parsing foundation already exists and could potentially be vendored into codebase-memory-mcp, similar to how other language grammars are included.

Language popularity: According to Huawei, ArkTS is the preferred language for HarmonyOS application development. With HarmonyOS now powering hundreds of millions of devices globally, adding ArkTS support would significantly expand the tool's user base.

Potential implementation approach:

Vendor the existing tree-sitter-arkts grammar into the codebase-memory-mcp build (similar to how other 158 languages are vendored)

Add .ets file extension detection

Map ArkTS language constructs to the existing graph data model (Function, Class, Method, etc.)

Update the language support list in documentation

Confirmations

  • I searched existing issues and this is not a duplicate.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestlanguage-requestRequest for new language supportparsing/qualityGraph extraction bugs, false positives, missing edgespriority/backlogValuable contribution, lower scheduling urgency; review when maintainer capacity opens.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions