# Source Maps

Zipy CLI helps in debugging the minified stack trace that occurs on the user's browser environment. The minified stack trace can be parsed, so that you can see the actual source code with the help of source maps. This lets you view the actual source context of the frontend JavaScript errors, including the code from any other libraries that you may have used in your frontend code.\
\
**How to enable this feature?**\
You will have to upload the source maps to Zipy Server with the help of the [CLI](https://www.npmjs.com/package/zipy-cli). The package can be globally installed and integrated in the build steps for smoother integration. Following are the steps to upload the source map files:<br>

// Globally Install the CLI Package -

```html
npm i -g zipy-cli
```

// CLI Command -

```
zipy-cli --authKey authKey --dirname ~/sourcemaps/ --apiKey YOUR_PROJECT_SDK_KEY --releaseVer releaseVerString
```

// CLI help Command -

```
zipy-cli --help
```

\
**Below are the params accepted by the CLI:**

* authKey: It is an authentication key for your Zipy projects.&#x20;
* dirname: A string value of the directory where source maps are available
* apiKey: Zipy Project Key
* releaseVer: Release Version of your application<br>

Please contact Zipy via chat or send us an email at <support@zipy.ai> to get an authorization key for access. Note that you can upload only up to 100 and a maximum of 100 MB files at once.

#### Controlling log output

The CLI supports a `-v` or `--verbose` flag that enables detailed file upload output.\
Without this flag, only minimal logs are shown in the terminal.\
With this flag, the CLI prints detailed filenames and progress information during sourcemap uploads.

Example

```
zipy-cli --authKey authKey --dirname ~/sourcemaps/ --apiKey YOUR_PROJECT_SDK_KEY --releaseVer releaseVerString --verbose
```

\
**Why can't I see the proper stack trace?**

If you are unable to see the proper stack trace in your Zipy dev tools section, please verify the following:

1. Check if you initialized the SDK with a proper release version. Make sure the release version for which the sourcemaps have been uploaded matches with SDK init release version.
2. Confirm if you uploaded all the source map files. Stack traces can be broken if some source map files are missing.


---

# 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://docs.zipy.ai/configure/source-maps.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.
