> ## Documentation Index
> Fetch the complete documentation index at: https://docs.linktr.ee/llms.txt
> Use this file to discover all available pages before exploring further.

# linkapp test-url-match-rules

> Validate url_match_rules.json against a URL

## Usage

```bash theme={"system"}
npx @linktr.ee/linkapp test-url-match-rules <url>
```

Tests your local `url_match_rules.json` against the provided URL using the LinkApp API and prints the result payload.

## Options

| Flag               | Description                       | Default             |
| ------------------ | --------------------------------- | ------------------- |
| `--qa`             | Use the QA environment            | `false`             |
| `--endpoint <url>` | Override the LinkApp API endpoint | derived from config |
| `-h, --help`       | Show command help                 | -                   |

## Prerequisites

* Logged in (uses your stored production token).
* `url_match_rules.json` present in the current working directory with valid JSON.

## What happens

1. Loads LinkApp API configuration (production by default) and your saved token.
2. Reads and parses `url_match_rules.json`.
3. Calls the LinkApp API to evaluate the provided URL against your rules.
4. Prints whether the match succeeded and the API response JSON.

## Example

```bash theme={"system"}
npx @linktr.ee/linkapp test-url-match-rules https://example.com/path
```
