> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/tree-sitter/tree-sitter/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Overview

> Overview of the Tree-sitter command-line interface

The `tree-sitter` command-line interface is used to create, manage, test, and build Tree-sitter parsers. It provides a comprehensive set of tools for grammar development, testing, and deployment.

## Configuration

The CLI is controlled by two configuration files:

* A personal `tree-sitter/config.json` config file generated by [`tree-sitter init-config`](/cli/init-config)
* A parser `tree-sitter.json` config file generated by [`tree-sitter init`](/cli/init)

## Command Categories

### Grammar Development

* [`init`](/cli/init) - Initialize a grammar repository
* [`init-config`](/cli/init-config) - Generate a default config file
* [`generate`](/cli/generate) - Generate a parser from grammar
* [`build`](/cli/build) - Compile a parser

### Testing and Debugging

* [`test`](/cli/test) - Run a parser's tests
* [`parse`](/cli/parse) - Parse files
* [`fuzz`](/cli/fuzz) - Fuzz a parser

### Query and Analysis

* [`query`](/cli/query) - Search files using a syntax tree query
* [`highlight`](/cli/highlight) - Highlight a file
* [`tags`](/cli/tags) - Generate a list of tags

### Tools

* [`playground`](/cli/playground) - Start local playground in the browser
* [`version`](/cli/version) - Display or increment the version of a grammar
* [`dump-languages`](/cli/dump-languages) - Print info about all known language parsers
* [`complete`](/cli/complete) - Generate shell completions

## Getting Help

To see all available commands:

```bash theme={null}
tree-sitter --help
```

To get help for a specific command:

```bash theme={null}
tree-sitter <command> --help
```

## Environment Variables

* `TREE_SITTER_JS_RUNTIME` - JavaScript runtime to use for parser generation (default: `node`)
* `TREE_SITTER_ABI_VERSION` - Language ABI version to generate
* `TREE_SITTER_WASI_SDK_PATH` - Path to Wasi SDK for Wasm compilation
* `TREE_SITTER_EDITS` - Maximum number of edits for fuzzing
* `TREE_SITTER_ITERATIONS` - Number of iterations for fuzzing
* `NO_COLOR` - Set to `1` to disable colored output
* `CC` - C compiler to use for building
* `CFLAGS` - Additional flags for C compiler
