Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,37 @@ $ uv run rcav2 $BUILD_URL
[RCA will be printed here]
```

### System-Wide CLI Installation

For convenience, you can install the `rcav2` executable globally on your system, making it available from any terminal without needing to be in the project directory or use `uv run`.

This process uses `pipx`, a tool for installing and running Python applications in isolated environments.

**1. Install pipx**

First, you need to install `pipx`. It is recommended to install it using `uv` into your system's Python environment.

```bash
sudo uv pip install --system pipx
```

**2. Use the Makefile tasks**

The `Makefile` provides convenient tasks to manage the global installation:

- `make cli-install`: Builds and installs the `rcav2` command using `pipx`. It also runs `pipx ensurepath` to make sure the executable is in your system's `PATH`.
- `make cli-uninstall`: Removes the `rcav2` command from your system.
- `make cli-reinstall`: Forces a re-installation of the command, which is useful after you've made changes to the code.

After running `make cli-install`, you can invoke the tool directly:
```bash
export OPIK_DISABLED=true
export SF_DOMAIN=sf.example.com
export LLM_GEMINI_KEY=<api key from bitwarden>
rcav2 --help
rcav2 $BUILD_URL
```

### API

Build the frontend asset and serve the standalone API:
Expand Down
14 changes: 14 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,20 @@ ci: ## Run tests, linting and type checking
.PHONY: serve
serve: frontend-build backend-serve ## Run RCAv2 app with compiled assets

.PHONY: cli-install
cli-install: ## Install the cli for system-wide use with pipx
@pipx install .
@pipx ensurepath

.PHONY: cli-uninstall
cli-uninstall: ## Uninstall the system-wide cli
@pipx uninstall rcav2

.PHONY: cli-reinstall
cli-reinstall: ## Reinstall the system-wide cli
@pipx install --force .
@pipx ensurepath

.PHONY: release
release: ## Create a release version of the app
npm run release
Expand Down