# getDependencies

**Identifier:** `depsdev_getDependencies`

**Provider:** [deps.dev](https://kirha.com/providers/depsdev.md)

Get the resolved dependency graph for a package version. Shows direct and transitive dependencies. Only available for npm, PyPI, Maven, and Cargo. Indirect dependencies are capped at 500; totalDependencies gives the full count.

## Run it with the CLI

```bash
kirha tools run depsdev_getDependencies \
  --input '{
    "system": "npm",
    "packageName": "<packageName>",
    "version": "<version>"
  }'
```

`--input` takes a JSON object that matches the input schema. Pass `--input -` to read it from stdin.

## Call it over HTTP

```bash
curl https://api.kirha.com/tools/v1/execute \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: **********' \
  --data '{
  "tool_name": "depsdev_getDependencies",
  "input": {
    "system": "npm",
    "packageName": "<packageName>",
    "version": "<version>"
  }
}'
```

Replace the stars with an API key from https://app.kirha.com/api-keys.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "properties": {
    "packageName": {
      "type": "string"
    },
    "system": {
      "description": "Package manager (npm, pypi, maven, cargo only)",
      "enum": [
        "npm",
        "pypi",
        "maven",
        "cargo"
      ],
      "type": "string"
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "system",
    "packageName",
    "version"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "context": {
      "type": "string"
    },
    "directDependencies": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "requirement": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "version"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "indirectDependencies": {
      "items": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "version"
        ],
        "type": "object"
      },
      "type": "array"
    },
    "packageName": {
      "type": "string"
    },
    "totalDependencies": {
      "type": "number"
    },
    "version": {
      "type": "string"
    }
  },
  "required": [
    "context",
    "packageName",
    "version",
    "totalDependencies",
    "directDependencies",
    "indirectDependencies"
  ],
  "type": "object"
}
```

-----

[All deps.dev tools](https://kirha.com/providers/depsdev.md) · [< Back to tools list](https://kirha.com/tools.md)