# npm cheatsheet

I often find myself googling for the same commands every few weeks. This is a collection of theses things so I do find them quicker.

* [`npm docs <package>`](https://docs.npmjs.com/cli/docs.html)\
  Navigate to the documentation of the given package (usually the npm or GitHub Repository)
* `npm init -y`\
  Quickly initialise a new npm project without answering all the quesitons. Resulting `package.json` looks like this:

  ```json
    {
      "name": "<PWD>",
      "version": "1.0.0",
      "description": "",
      "main": "index.js",
      "scripts": {
        "test": "echo \"Error: no test specified\" && exit 1"
      },
      "keywords": [],
      "author": "",
      "license": "ISC"
    }
  ```


---

# 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://wiki.christianpoplawski.de/npm/cheatsheet.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.
