Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
6aa4a62
copyrit first working version with localhost outside container
romanlutz Nov 16, 2025
0dc4661
slim side and top bars, working text+image inputs, redesigned input box
romanlutz Nov 17, 2025
bd6e8b4
basic working version with single conversation and converters (not ye…
romanlutz Nov 17, 2025
cd5b5a9
history added, small fixes
romanlutz Nov 17, 2025
5510a6c
Merge branch 'main' of https://github.com/Azure/PyRIT into romanlutz/…
romanlutz Dec 5, 2025
146c75f
updates to make it work again, fix "new chat" bug and add ribbon
romanlutz Dec 6, 2025
9bdcf3f
docker infrastructure and workflow for GH push to ACR, small bugfix f…
romanlutz Dec 8, 2025
89369c6
Merge branch 'main' of https://github.com/Azure/PyRIT into romanlutz/…
romanlutz Dec 17, 2025
6caf221
Merge branch 'main' of https://github.com/Azure/PyRIT into romanlutz/…
romanlutz Dec 23, 2025
e3f6ecc
reduce to minimal frontend for PR
romanlutz Dec 24, 2025
da2e6f9
linting
romanlutz Dec 29, 2025
5024b11
Merge branch 'romanlutz/co_pyrit_initial' into romanlutz/co_pyrit
romanlutz Dec 31, 2025
1813f82
Merge branch 'main' of https://github.com/Azure/PyRIT into romanlutz/…
romanlutz Dec 31, 2025
897210b
add npm instructions to uv doc file
romanlutz Dec 31, 2025
bf2b5fa
basic frontend/backend file selection
romanlutz Dec 31, 2025
95f947e
basic working version
romanlutz Dec 31, 2025
5ed4edc
functioning initial backend
romanlutz Jan 1, 2026
adf9160
Merge branch 'main' of https://github.com/Azure/PyRIT into romanlutz/…
romanlutz Jan 1, 2026
2825571
remove target and config logic to keep it simple for initial PR
romanlutz Jan 2, 2026
10d08b3
address comments
romanlutz Jan 2, 2026
f0b6ddf
ignore dev.py for flake8
romanlutz Jan 2, 2026
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
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ default_memory.json.memory
frontend/node_modules/
frontend/dist/
frontend/.vite/

# Backend frontend directory (generated during packaging)
pyrit/backend/frontend/
2 changes: 2 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ exclude =
*lib/python*,
*egg,
build,
frontend/dev.py,
pyrit/backend/main.py,
pyrit/cli/pyrit_shell.py,
pyrit/prompt_converter/morse_converter.py,
pyrit/prompt_converter/emoji_converter.py,
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ dbdata/
eval/
default_memory.json.memory

# Frontend build artifacts copied to backend for packaging
pyrit/backend/frontend/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ recursive-include pyrit *.wav
recursive-include pyrit *.mp4
recursive-include pyrit *.md
include pyrit/auxiliary_attacks/gcg/src/Dockerfile
recursive-include pyrit/backend/frontend *
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.PHONY: all pre-commit mypy test test-cov-html test-cov-xml

CMD:=uv run --active -m
CMD:=uv run -m
PYMODULE:=pyrit
TESTS:=tests
UNIT_TESTS:=tests/unit
Expand All @@ -17,8 +17,8 @@ mypy:
$(CMD) mypy $(PYMODULE) $(UNIT_TESTS)

docs-build:
uv run --active jb build -W -v ./doc
uv run --active ./build_scripts/generate_rss.py
uv run jb build -W -v ./doc
uv run ./build_scripts/generate_rss.py

# Because of import time, "auto" seemed to actually go slower than just using 4 processes
unit-test:
Expand Down
2 changes: 2 additions & 0 deletions doc/contributing/1a_install_uv.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ However, there are many reasons to install as a contributor. Yes, of course, if
git clone https://github.com/Azure/PyRIT
```

4. **Node.js and npm**. Required for building the TypeScript/React frontend. Download [Node.js](https://nodejs.org/) (which includes npm). Version 18 or higher is recommended.

## Installation with uv

This is a guide for how to install PyRIT using uv
Expand Down
2 changes: 2 additions & 0 deletions doc/contributing/1c_install_conda.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ This is a list of the prerequisites needed to run this library.
git clone https://github.com/Azure/PyRIT
```

1. **Node.js and npm**. Required for building the TypeScript/React frontend. Download [Node.js](https://nodejs.org/) (which includes npm). Version 18 or higher is recommended.

Note: PyRIT requires Python version 3.10, 3.11, 3.12, or 3.13. If using Conda, you'll set the environment to use this version. If running PyRIT outside of a python environment, make sure you have this version installed.

## Installation with conda
Expand Down
1 change: 0 additions & 1 deletion doc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ potentially harmful outputs, which can take many forms, including harmful conten
incitement or glorification of violence, or sexual content." Additionally, a variety of security risks
can be introduced by the deployment of an AI system.

(installation-guide)=
## Installation Guide

PyRIT offers flexible installation options to suit different needs. Choose the path that best fits your use case:
Expand Down
49 changes: 26 additions & 23 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,50 @@

Modern TypeScript + React frontend for PyRIT, built with Fluent UI.

## Quick Start

### Installation
## Development

```bash
# Install dependencies
npm install
```

### Running the Frontend

```bash
# Start the frontend server
# Start both backend and frontend (cross-platform)
python dev.py start
# OR use npm script
npm run start

# Stop the frontend server
python dev.py stop

# Restart the frontend server
# Restart both servers
python dev.py restart
```
# OR
npm run restart

The frontend will be available at `http://localhost:3000`

### Alternative: Using npm directly
# Stop all servers
python dev.py stop
# OR
npm run stop

```bash
# Run Vite dev server only (backend must be started separately)
npm run dev
```

### Building for Production

```bash
# Build for production
npm run build

# Preview production build
npm run preview
```

The built files will be in the `dist/` directory.
**Development Mode**: The `dev.py` script sets `PYRIT_DEV_MODE=true` so the backend expects the frontend to run separately on port 3000.

**Production Mode**: When installed from PyPI, the backend serves the bundled frontend and will exit if frontend files are missing.

## Tech Stack
## Stack

- **React 18** - UI framework
- **TypeScript** - Type safety
- **Fluent UI v9** - Microsoft design system
- **Vite** - Fast build tool
- **Axios** - HTTP client

## Configuration

The frontend proxies API requests to `http://localhost:8000` in development.
Configure this in `vite.config.ts` if needed.
Loading