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

# source

> Reference for gitquarry source path, the explicit opensrc-backed source retrieval command.

# `gitquarry source`

Fetch or locate source code through `opensrc`.

## Synopsis

```bash theme={null}
gitquarry source path [OPTIONS] <SPEC>
```

## Behavior

`source path` is explicit. It does not run during `search` or `inspect`.

The command delegates source retrieval and caching to `opensrc path`, then prints the resolved absolute path on `stdout`. Fetch progress and errors stay on `stderr`.

`<SPEC>` follows `opensrc` syntax, including:

* `owner/repo`
* GitHub URLs
* npm package names
* `pypi:<package>`
* `crates:<crate>`

## Options

```bash theme={null}
--cwd <PATH>
--verbose
```

`--cwd` is forwarded to `opensrc` for lockfile-based version resolution.

`--verbose` lets `opensrc` show fetch progress on `stderr`.

## Examples

Fetch or locate a GitHub repository:

```bash theme={null}
gitquarry source path vercel/next.js
```

Use the path in a shell workflow:

```bash theme={null}
rg "Router" "$(gitquarry source path vercel/next.js)"/packages/next/src
```

Fetch or locate a Rust crate:

```bash theme={null}
gitquarry source path crates:serde
```

Resolve package versions from a project lockfile:

```bash theme={null}
gitquarry source path zod --cwd ./my-app
```

## Failure Shape

If `opensrc` is not installed or not on `PATH`, gitquarry exits with `E_SOURCE_UNAVAILABLE`.

If `opensrc` runs but cannot fetch or resolve the source, gitquarry exits with `E_SOURCE_FETCH`.
