> For the complete documentation index, see [llms.txt](https://docs.chord.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.chord.co/chord-oms/developer-tools/developer-guides/npm-access-for-chordcommerce-packages.md).

# npm Access for @chordcommerce Packages

## npm Access for @chordcommerce Packages

All of Chord's Javascript packages are private and distributed through [Github Packages](https://github.com/features/packages). In order to install these packages, you must configure your package manager of choice to use Github Packages for all packages in the `@chordcommerce` namespace.

## Step 1: Gain Access To Relevant Chord Commerce Repositories

First, you will need to ensure that you have access to Chord's Javascript repositories. You can determine if you have access by clicking on the following links.

* [@chordcommerce/chord-js](https://github.com/chordcommerce/chord-js)
* [@chordcommerce/chord-ui](https://github.com/chordcommerce/chord-ui)

If you do not have access to these repositories, reach out to Chord for access with your Github username.

## Step 2: Configure Package Managers

First, you must generate a Github personal access token with the `read:packages` packages scope. This can be done by visiting <https://github.com/settings/tokens> and clicking "Generate Token".

<figure><img src="https://3559351341-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FGejRW1RLC9yasX56Xzxu%2Fuploads%2Fgit-blob-c6f60b9ef53c849ef1cdc545473a5db91c0784d6%2Fnpm-access-for-chordcommerce-packages-1.gif?alt=media" alt=""><figcaption><p>How to generate a read:packages Github access token</p></figcaption></figure>

Next, you must take that token and add the following lines to `~/.npmrc` :

{% code title="\~/.npmrc" %}

```none
//npm.pkg.github.com/:_authToken=<YOUR PERSONAL ACCESS TOKEN>
@chordcommerce:registry=https://npm.pkg.github.com
```

{% endcode %}

This means that any npm packages with the `@chordcommerce` scope will be installed from Github Packages instead of the npm public registry. If you have any trouble on this step, see Github's documentation on [configuring npm for use with Github Packages](https://docs.github.com/en/free-pro-team@latest/packages/using-github-packages-with-your-projects-ecosystem/configuring-npm-for-use-with-github-packages).

## Step 3: Install Packages

If step 2 is done correctly, commands like the following should work without any issues.

{% tabs %}
{% tab title="yarn" %}

```shell
yarn add @chordcommerce/react-autonomy
```

{% endtab %}

{% tab title="npm" %}

```shell
npm install @chordcommerce/react-autonomy
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.chord.co/chord-oms/developer-tools/developer-guides/npm-access-for-chordcommerce-packages.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
