# Using Momentum CLI

Momentum CLI is used in combination with **Momentum Pro / Enterprise** to run tests on your local IDE.\
\
This makes the flow of test planning -> test generation -> test integration -> test running really a matter of few simple clicks enhancing developer experience.

#### Installing the cli

```
pip3 install momentum-cli
```

#### Setting up the cli

Once the CLI is installed, for you to use it - there are some steps you'd need to take. The first thing is running the command to initialise it.

```
momentum init
```

When you run this command, this will ask you for two inputs :\
\
\&#xNAN;**(a) Path of virtual env** : Please enter the absolute path of your created virtual env at this point, for example "./users/fatman/projects/momentum/.venv"\
\
\&#xNAN;**(b) Path of directory where you want the tests to be generated** : Please provide the absolute path for the directory where you want the tests to be stored and run from. Ideally this is a subfolder inside your codebase which is called something like "tests", but you can customise this. For example the path could look like : "/users/fatman/projects/momentum/tests"\
\
Once you provide these inputs, the cli will automatically setup everything else and run momentum for you to interact with (via momentum pro / enterprise).

#### Stopping the cli

```
momentum stop
```

When you're done with momentum, simply stop the cli with this command.

#### Reconfiguring the variables

In case you want to reconfigure your virtual env / test directory path - you can run the following command which should help you with that.

```
momentum config
```

Once the reconfiguration is done, go ahead and run momentum with this command :

```
momentum run
```

Once your cli is correctly configured and running, momentum (pro/enterprise) can connect and run, modify, regenerate, fix & verify tests with your codebase easily.


---

# 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.momentum.sh/using-momentum-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.
