# CLI

`react-state-rxjs` has optional package `react-state-rxjs-cli` which makes developers lives easier by generating new files or integrating state management to existing ones.

Install it from npm

```
npm install react-state-rxjs-cli -g
```

In terminal type `rsx` and answer couple questions:

1. Name of the component - e.g: `todos`
2. Choose directory
3. Enter state path like you do in `@InjectStore` decorator - e.g: `['todos', '${stateIndex}']` or '`todos'`&#x20;
4. Chose what new component should extend `ReactComponentWithStateActions` or `React.Component`&#x20;

{% hint style="info" %}
When specifying action name which has more than 1 word use dash casing: `name-one` because it will be used for all file names but component name will be converted to pascal case: NameOne&#x20;
{% endhint %}


---

# 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://vytautaspranskunas.gitbook.io/react-state-rxjs/other-information/cli.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.
