MCPcopy Index your code
hub / github.com/DaltonSW/prism

github.com/DaltonSW/prism @v1.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.1 ↗ · + Follow
83 symbols 164 edges 18 files 11 documented · 13%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Welcome to prism!

All I'm saying is that maybe people would be a bit more willing to write unit tests if they were prettier to look at... 💅

Make your unit testing results not only easier on the parse, but downright pleasant to look at! Prism works anywhere go test works, so it can be quickly integrated into any project using Go v1.24 or higher (that's when -json was introduced).

prism demo

Installation

Homebrew 🍺

  • Have brew installed (brew.sh)
  • Run the following:
brew install --cask daltonsw/tap/prism

Go 🖥️

  • Have Go
  • Have your Go install location on your $PATH
  • Run the following:
go install go.dalton.dog/prism@latest

Github Releases 🐙

  • Go to the Releases tab of the repo here
  • Download the latest archive for your OS/architecture
  • Extract it and place the resulting binary on your $PATH and ensure it is executable
cd ~/Downloads # Assuming you downloaded it here
tar -xvf prism_[whatever].tar.gz # x: Extract; v: Verbose output; f: Specify filename
chmod +x prism # Make file executable
mv prism [somewhere on your $PATH] # Move the file to somewhere on your path for easy execution

Usage

Unit Tests

Just run prism in your module directory. Anywhere you'd run go test, use prism instead. That's it!

simple demo

-v -- Verbose output. Includes any additional output logged during tests

verbose demo

-f -- Failed Only. Only gives information about tests that failed

fail-only demo

--no-color OR --show-color to force showing or hiding color

colors demo

Anything else will be appended directly to go test -json

Benchmarking

The simplest usage is just prism bench. This will ignore all tests and run all benchmarks in ./...

simple bench demo

The first optional argument is a regex string and is appended to the normal -bench= flag for go test. It defaults to .

The second optional argument is the path, if you want to benchmark over something other than ./....
If you want to pass a path, you MUST pass a regex string

Configuration

Running prism config show will show you the currently stored values for configuration

To change your defaults, run prism config set [key] {true|false} with any of the following keys: - fails_only - verbose - no_bar - no_color (will set show_color to the opposite) - show_color (will set no_color to the opposite)

Core symbols most depended-on inside this repo

styleBool
called by 14
internal/config.go
String
called by 7
internal/tests.go
setBenchmarkStatus
called by 4
internal/benchmarks.go
setBenchmarkDuration
called by 4
internal/benchmarks.go
durationFromEvent
called by 3
internal/benchmarks.go
configFilePath
called by 3
internal/config.go
displayZeroBenchmarks
called by 2
internal/benchmarks.go
Execute
called by 2
internal/execute.go

Shape

Function 70
Struct 10
Method 2
TypeAlias 1

Languages

Go100%

Modules by API surface

internal/benchmarks.go23 symbols
internal/tests.go12 symbols
internal/config.go8 symbols
internal/execute.go5 symbols
examples/pkg3/edges_test.go5 symbols
examples/pkg1/failing_test.go4 symbols
examples/pkg1/basic_test.go4 symbols
internal/styles.go3 symbols
examples/pkg2/network_test.go3 symbols
examples/pkg2/benchmark_test.go3 symbols
examples/pkg1/skip_test.go3 symbols
examples/pkg3/subtests_test.go2 symbols

For agents

$ claude mcp add prism \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact