Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>KomodoNew to Visual Studio Code? Get it now.
Komodo

Komodo

Komodo Team

|
11 installs
| (0) | Free
Build and run codemods!
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Komodo

Komodo integrates GritQL as a Visual Studio Code extension, allowing you to create, preview and run GritQL codemods right from your favourite code editor.

In the future, we want to support more codemod runners and programming languages!

Requirements

  • Visual Studio Code
  • Grit CLI

You can install the Grit CLI from NPM:

npm install --location=global @getgrit/cli

Alternatively, you can also install Grit with an installation script:

curl -fsSL https://docs.grit.io/install | bash

Once you have installed the CLI, you can optionally run grit init to initialize a local Grit configuration and grit install to install additional binaries used for custom workflows.

Installation Guide

To install Komodo in VS Code, we need vsce (short for "Visual Studio Code Extensions), a command-line tool for packaging, publishing and managing VS Code extensions.

You can install it with:

npm install -g @vscode/vsce

Now, after clonning this repository, you can generate your own .vsix package and install the extension.

On Komodo's root directory, run:

vsce package -o /your/out/path/
# Generates /your/out/path/komodo-0.0.1.vsix file

In VS Code

  1. Go to View > Extensions (Shortcut: Ctrl + Shift + X)
  2. Click on 'Views and More Actions...' (The ... menu)
  3. Select 'Install from VSIX...'
  4. Select the komodo-0.0.1.vsix file you previously generated.

Alternatively, you can run the following command in your terminal:

# if you use VS Code
code --install-extension path/to/file/komodo-0.0.1.vsix

# if you use VS Code Insiders
code-insiders --install-extension path/to/file/komodo-0.0.1.vsix

Once installed, you should notice the Komodo icon in VS Code's Activity Bar (the leftmost pannel, where your Explorer and Search icons are)

Current Features

Create GritQL codemods

**Search And Replace Queries**: These are the simplest kind of GritQL queries. Match any valid code fragment and replace it with another one. You can also use [GritQL metavariables](https://docs.grit.io/language/patterns#metavariables) **Complex Queries**: If you want to add more specific matching and replacing conditions, you need a complex GritQL query. We provide a text box where you can write your own. Don't forget the backticks (\`...\`) and the arrow operator (`=>`)!

Pre-Defined Patterns: Grit allows you to create you own patterns inside of Markdown files (.md). These can be used as many times as you want. Just drop your files in a .grit/patterns directory on the root directory of your project, and you will see them loaded in the Pre-Defined Patterns tab.

Example: Markdown file of a codemod that removes console.log(...).

Run codemods

To run any of the queries, just click on the Run button. If you want to run a Pre-Defined pattern, click on its name in the Pre-Defined Patterns tab. After running a codemod, a new VS Code tab will open showing the affected files and lines. You can also click on the file icon alongside these file names to open the complete document.

Preview Results

If you are unsure of the effects of your codemod, or just want to test it, you may check the Only Preview checkbox. You will notice the same effect as running a codemods, but your files will be unchanged.

Supported Languages

Right now, we support every programming language that GritQL does. From the Grit documentation:

  • JavaScript/TypeScript
  • Python
  • JSON
  • Java (Alpha)
  • Terraform HCL (Alpha)
  • Solidity (Alpha)
  • CSS
  • Markdown (Alpha)
  • YAML (Alpha)
  • Rust
  • Ruby (Beta)
  • PHP (Beta)
  • Go (Alpha)
  • SQL (Alpha)

Current Limitations

  • Since we are developing this extension in Linux (More specifically, the Ubuntu distribution), we can only guarantee that it will work on this Operating System. However, we plan to add support for Windows in the future.

Additional Links

  • Grit Official Site
  • GritQL Language Documentation
  • GritQL Reference (Cheatsheet)
  • Grit CLI Reference
  • GritQL GitHub Repository
  • GritQL Standard Library Patterns
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft