Metadata-Version: 2.1
Name: forge-crucible
Version: 0.1.21
Summary: TUI for running interacting with Foundry's Forge Tests.
Home-page: https://github.com/bowd/forge-crucible
License: MIT
Author: bogdan
Author-email: bogdan@bowd.io
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: pyparsing (>=3.1.4,<4.0.0)
Requires-Dist: pyperclip (>=1.9.0,<2.0.0)
Requires-Dist: rapidfuzz (>=3.10.0,<4.0.0)
Requires-Dist: textual (>=0.77.0,<0.78.0)
Requires-Dist: textual-autocomplete (>=3.0.0a9,<4.0.0)
Project-URL: Repository, https://github.com/bowd/forge-crucible
Description-Content-Type: text/markdown

![Crucible Logo](./docs/crucible.webp)

Crucible is a terminal UI application wrapper for [forge test](https://github.com/foundry-rs/foundry) built with [Textual](https://textual.textualize.io/) (💖).
It provides an interactive environment to navigate your test tree and the trace output of running a test with full verbosity.

## Installation

I recommend using [pipx](https://pipx.pypa.io/stable/installation/), which installes applications distributed via pypi into their own virtual environment.

```bash
$ pipx install forge-curcible
```

This will install the `crucible` executable.

## Running 

To run it just navigate to the root of a foundry project and run:

```
$ crucible
```

The app should run the full test suite and output a tree representation:

![Example Test Suite view](./docs/suite-view.png)

You can navigate the tree via the arrows or vim-style (recommended 🤓). 
You can also press CTRL+P to bring up the command pallet where you can fuzzy-find tests to run:

![Example Search view](./docs/search-view.png)

Once you pick a test you will see the trace view:

![Example Test Trace view](./docs/trace-view.png)

## Disclaimer

This is very alpha software so it might not work. It employs a grammer to parse the forge output.
I've tried it on a variety of tests but it could still fail when opening a test. If it happens it will create
a `/tmp/<test-name>.txt` file with the output. Please open an issue and attach the output.

## Upcoming features

- **Trace filtering**: Have a list of customizable filters that can be toggled to hide trace lines from the output. The current filtering feature just filters `console.log`, `VM.label` and `VM.addr`.
- **Trace search**: Jump to trace line by fuzzy searching on the function call or event name.
- **Profile switch**: Switch the foundry profile that you're using to run the tests, should automatically detect existing profiles.
- **Custom labling**: Ability to do in-app labeling of addresses or bytes32 identifiers.
- **External decoding**: Use public resources to decode function calls and events which could come up in fork-tests.








