Verify.Cli 1.0.374

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Verify.Cli --version 1.0.374
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local Verify.Cli --version 1.0.374
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Verify.Cli&version=1.0.374
                    
nuke :add-package Verify.Cli --version 1.0.374
                    

Verify.Cli

.NET NuGet Status

A command-line tool that uses the Verify library for regular files (without requiring you to create a unit test project).

Usage

If you run this tool interactively, then you'll get a similar experience that you would using VerifyTests in a .NET unit test project. Verify.Cli will utilise any existing compatible file diff tool to display the diff.

./Verify.Cli --file <path to file to verify> [--verified-dir <directory>]

The first time you use Verify.Cli, it will output the contents of the file.

Options

  • --file or -f: The file to verify (required)
  • --verified-dir or -d: Directory to store/look for .verified files (optional)

Examples

Basic usage:

.\Verify.Cli.exe --file C:\tmp\example.txt

With custom verified files directory:

.\Verify.Cli.exe --file C:\tmp\example.txt --verified-dir C:\MyVerifiedFiles

This will look for the verified file at C:\MyVerifiedFiles\example.txt.verified.txt instead of the default location next to the source file.

When the files match, the tool exits with code 0 and produces no output.

Unhandled exception: VerifyException: Directory: C:\tmp
New:
  - Received: example.txt.received.txt
    Verified: example.txt.verified.txt

FileContent:

New:

Received: example.txt.received.txt
This is
a text file.

Your diff tool of choice (if found by the Verify's DiffEngine library) can then be used to compare to the verified file (if it exists), or create it (if the first time).

If the verified file matches the received file, then there is no output (and the exit code is zero).

If the received file is different from the verified file, then a diff will be shown in the console, a non-zero exit code will be returned, and if in an interactive environment with a supported diff tool, then that tool will be launched.

Unhandled exception: VerifyException: Directory: C:\tmp
NotEqual:
  - Received: example.txt.received.txt
    Verified: example.txt.verified.txt

FileContent:

NotEqual:

Received: example.txt.received.txt
This is
an updated text file.

Verified: example.txt.verified.txt
This is
a text file.

Example with Beyond Compare launched:

Screenshot of using Beyond Compare to see differences in files

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
1.0.411 337 8/10/2025
1.0.401 124 7/27/2025
1.0.396 92 7/27/2025
1.0.394 97 7/27/2025
1.0.392 241 7/26/2025
1.0.380 255 7/20/2025
1.0.374 238 7/20/2025
1.0.372 228 7/20/2025
1.0.334 99 3/22/2025
1.0.328 86 3/22/2025
1.0.298 116 1/12/2025
1.0.296 108 1/12/2025