---
title: ":path()"
description: "Documentation for the vlt client and the vlt registry."
url: "https://docs.vlt.io/client/selectors/pseudo-classes/path"
image: "https://docs.vlt.io/og/client/selectors/pseudo-classes/path"
lang: "en"
---

# :path()

The `:path()` pseudo-class matches workspace and file packages based on their file path relative to the project root. Patterns use glob syntax and must be quoted strings.

## Syntax

```
:path("<glob>")
```

## Examples

### Match all workspace packages

```bash title="Terminal"
$ vlt query ':path("*")'
```

### Match a specific path

```bash title="Terminal"
$ vlt query ':path("./packages/foo")'
```

### Match with glob patterns

```bash title="Terminal"
$ vlt query ':path("packages/**")'
```

### What gets selected

Given a monorepo:

```
my-monorepo/
├── packages/
│   ├── core/           ← workspace
│   ├── utils/          ← workspace
│   └── cli/            ← workspace
└── apps/
    └── web/            ← workspace
```

| Query                      | Selected              |
| -------------------------- | --------------------- |
| `:path("*")`               | core, utils, cli, web |
| `:path("packages/**")`     | core, utils, cli      |
| `:path("apps/**")`         | web                   |
| `:path("./packages/core")` | core                  |

### Combining with other selectors

Find workspaces in `packages/` that have changed since main:

```bash title="Terminal"
$ vlt query ':path("packages/**"):diff(main)'
```

## See also

- [`:workspace`](https://docs.vlt.io/client/selectors/pseudo-states.md) — match all workspace packages
- [`:type()`](https://docs.vlt.io/client/selectors/pseudo-classes/type.md) — match by package type
- [`:diff()`](https://docs.vlt.io/client/selectors/pseudo-classes/diff.md) — match by changed files
