# Editorconfig resolve

`editorconfig-resolve` · version 1.0.0 · Developer tools · free, no key needed

Resolve EditorConfig properties for one normalized relative POSIX path from caller-supplied file contents.

**Use when you need to: resolve editorconfig properties · apply editorconfig sections to a file · match editorconfig globs.**

## Decide before calling

Read the [versioned contract](/v1/tools/editorconfig-resolve/versions/1.0.0) and the supported scope below. Reuse `editorconfig-resolve@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `editorconfig-resolve@1.0.0` for resolve editorconfig properties. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- resolve editorconfig properties
- apply editorconfig sections to a file
- match editorconfig globs
- compute effective editor settings
- merge nested editorconfig files
- interpret unset editorconfig values

## Not supported

- reading .editorconfig files from a filesystem
- editor or formatter configuration beyond EditorConfig properties

## Behavior

- Files are supplied in outermost-to-innermost order; only ancestor .editorconfig paths are allowed, and a later root=true discards all earlier files.
- Sections and files apply in caller order; later matching properties win, property keys are ASCII case-insensitive, and unset removes a property.
- Paths are lexical normalized relative POSIX paths; no filesystem, platform path, locale, clock, network, or randomness is used.
- Glob matching supports *, **, ?, character classes, escapes, nested comma braces, and bounded ascending integer brace ranges. A leading slash is ignored; a pattern without another slash matches the basename.

## Input

- `path` (string, required): min length 1; max length 1024
- `files` (array of object, required): min items 1; max items 32

## Output

- `properties` (object, required)
- `matched_sections` (integer, required): min 0; max 4096

## Limits

- max files: 32
- max file bytes: 32768
- max total bytes: 131072
- max sections per file: 128
- max pattern bytes: 1024
- max pattern nesting: 32
- max pattern expansions: 256
- max range members: 101
- max properties: 256
- max path bytes: 1024

## Example

Request input:

```json
{
  "path": "lib/a.js",
  "files": [
    {
      "path": ".editorconfig",
      "content": "root=true\n[*]\nindent_style=space\n[*.js]\nindent_size=2\n"
    }
  ]
}
```

Response:

```json
{
  "result": {
    "properties": {
      "indent_size": "2",
      "indent_style": "space"
    },
    "matched_sections": 2
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "editorconfig-resolve",
  "version": "1.0.0",
  "input": {
    "path": "lib/a.js",
    "files": [
      {
        "path": ".editorconfig",
        "content": "root=true\n[*]\nindent_style=space\n[*.js]\nindent_size=2\n"
      }
    ]
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/editorconfig-resolve/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"path":"lib/a.js","files":[{"path":".editorconfig","content":"root=true\n[*]\nindent_style=space\n[*.js]\nindent_size=2\n"}]}'
```

The machine-readable contract is at [/v1/tools/editorconfig-resolve/versions/1.0.0](/v1/tools/editorconfig-resolve/versions/1.0.0).

### CLI

```sh
node cli.mjs run editorconfig-resolve 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Chmod mode convert](/tools/chmod-mode-convert): Convert a Unix permission mode and apply explicit chmod symbolic clauses, returning canonical octal and symbolic forms.
- [Openapi operation extract](/tools/openapi-operation-extract): Extract one OpenAPI operation, merge inherited parameters, and return its local component-reference closure.
- [Shell argv quote](/tools/shell-argv-quote): Quote inert argv strings for POSIX sh or PowerShell 7, returning a command and its per-argument fragments.
- [Commit conventional parse](/tools/commit-conventional-parse): Parse one Conventional Commits 1.0.0 message into its header, body, footers, and breaking-change status.
- [Sql statements split](/tools/sql-statements-split): Split SQL text into exact statement spans with explicit PostgreSQL, MySQL, or SQLite lexical rules.
- [Tap output parse](/tools/tap-output-parse): Parse TAP version 13 text into ordered assertions, plan validity, diagnostics, directives, and bailout state.
