# npm

## 常用命令

查看通过 npm 安装的所有包

```
npm list -g --depth 0
此命令根据依赖关系显示为树状结构，depth 表示显示时的深度。
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lenovohit.gitbook.io/tech-framework/qian-duan-ji-shu/node.js/npm.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
