### DiffEngineTray Log Directory Example Source: https://github.com/verifytests/diffengine/blob/main/docs/tray.md Example path to the DiffEngineTray logs directory. This path may vary based on the installed version of the tool. ```text %UserProfile%\.dotnet\tools\.store\diffenginetray\{VERSION}\diffenginetray\{VERSION}\tools\net8.0\any\logs ``` ```text C:\Users\simon\.dotnet\tools\.store\diffenginetray\9.0.0\diffenginetray\9.0.0\tools\net8.0\any\logs ``` -------------------------------- ### Neovim Right Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for Neovim when the target file is on the right. Requires Neovim to be installed and in the system's PATH. ```bash -d "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Neovim Left Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for Neovim when the target file is on the left. Requires Neovim to be installed and in the system's PATH. ```bash -d "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### Install DiffEngineTray CLI Source: https://github.com/verifytests/diffengine/blob/main/docs/tray.md Installs the DiffEngineTray command-line tool globally. This tool is used to run the tray application. ```bash dotnet tool install -g DiffEngineTray ``` -------------------------------- ### Diffinity Windows Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for running Diffinity on Windows. The '-forceNewInstance' flag ensures a new instance is always created. ```bash "targetFile.txt" "tempFile.txt" -forceNewInstance ``` ```bash "tempFile.txt" "targetFile.txt" -forceNewInstance ``` -------------------------------- ### Manage DiffEngineTray Application Source: https://context7.com/verifytests/diffengine/llms.txt Install and interact with the DiffEngineTray application for managing pending snapshot changes. ```bash # Install the tray application globally dotnet tool install -g DiffEngineTray # Run the tray application diffenginetray # The tray app: # - Shows pending file moves (snapshot updates) # - Shows pending file deletes (removed snapshots) # - Provides hotkeys for accepting/discarding all changes # - Groups changes by solution ``` ```csharp using DiffEngine; // DiffEngine automatically notifies the tray app when launching diffs await DiffRunner.LaunchAsync(tempFile, targetFile); // Manually add a pending delete DiffRunner.AddDelete("path/to/obsolete/snapshot.verified.txt"); // Async version await DiffRunner.AddDeleteAsync("path/to/obsolete/snapshot.verified.txt"); ``` -------------------------------- ### Check Build Server Properties Source: https://github.com/verifytests/diffengine/blob/main/readme.md Use these properties to check if the code is running on a specific build server. No setup is required. ```cs var isWsl = BuildServerDetector.IsWsl; var isTravis = BuildServerDetector.IsTravis; var isJenkins = BuildServerDetector.IsJenkins; var isGithubAction = BuildServerDetector.IsGithubAction; var isAzureDevops = BuildServerDetector.IsAzureDevops; var isTeamCity = BuildServerDetector.IsTeamCity; var isGitLab = BuildServerDetector.IsGitLab; var isMyGet = BuildServerDetector.IsMyGet; var isGoDc = BuildServerDetector.IsGoDc; var isDocker = BuildServerDetector.IsDocker; var isAppVeyor = BuildServerDetector.IsAppVeyor; ``` -------------------------------- ### SublimeMerge Right Arguments Example Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md Example command-line arguments for SublimeMerge when comparing the right file. This is typically used for configuring the diff tool's execution. ```bash mergetool "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### P4Merge Right Arguments for Binary Files Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for P4Merge when comparing binary files (e.g., images) and the target file is on the right. ```bash "tempFile.png" "targetFile.png" ``` -------------------------------- ### VisualStudio Diff Tool Arguments (Windows) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for the VisualStudio diff tool on Windows. These specify the /diff command with source and target files. ```bash /diff "targetFile.txt" "tempFile.txt" "targetFile.txt" "tempFile.txt" ``` ```bash /diff "tempFile.txt" "targetFile.txt" "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Prioritize Neovim Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this to set the tool order to prioritize Neovim over other diff tools. Ensure Neovim is installed. ```csharp DiffTools.UseOrder(DiffTool.Neovim); ``` -------------------------------- ### SublimeMerge Left Arguments Example Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md Example command-line arguments for SublimeMerge when comparing the left file. This is typically used for configuring the diff tool's execution. ```bash mergetool "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### Beyond Compare Windows Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example command-line arguments for Beyond Compare on Windows. These are used to specify file paths and read-only modes for comparison. ```bash /solo /rightreadonly /nobackups "targetFile.txt" "tempFile.txt" ``` ```bash /solo /leftreadonly /nobackups "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### P4Merge Left Arguments for Binary Files Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for P4Merge when comparing binary files (e.g., images) and the target file is on the left. ```bash "targetFile.png" "tempFile.png" ``` -------------------------------- ### GET DiffTools.TryFindByExtension Source: https://context7.com/verifytests/diffengine/llms.txt Attempts to find the best available diff tool for a given file extension or path. ```APIDOC ## GET DiffTools.TryFindByExtension ### Description Attempts to find the best available diff tool for a given file extension or path. ### Parameters #### Query Parameters - **extension** (string) - The file extension to search for (e.g., ".png"). - **filePath** (string) - The file path to determine the appropriate tool. ``` -------------------------------- ### SublimeMerge Diff Tool Arguments (Windows) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for the SublimeMerge diff tool on Windows. These specify the command to launch the tool with target files. ```bash mergetool "targetFile.txt" "tempFile.txt" ``` ```bash mergetool "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Beyond Compare OSX Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example command-line arguments for Beyond Compare on OSX. Note the use of hyphens for flags instead of slashes. ```bash -solo -rightreadonly -nobackups "targetFile.txt" "tempFile.txt" ``` ```bash -solo -leftreadonly -nobackups "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### MsExcelDiff Right Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for MsExcelDiff when the target file is on the right. ```bash "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Prioritize P4Merge Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this to set the tool order to prioritize P4Merge over other diff tools. Ensure P4Merge is installed. ```csharp DiffTools.UseOrder(DiffTool.P4Merge); ``` -------------------------------- ### Prioritize MsWordDiff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this to set the tool order to prioritize MsWordDiff over other diff tools. Ensure MsWordDiff is installed. ```csharp DiffTools.UseOrder(DiffTool.MsWordDiff); ``` -------------------------------- ### MsExcelDiff Left Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for MsExcelDiff when the target file is on the left. ```bash "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### GET DiffTools.Resolved Source: https://context7.com/verifytests/diffengine/llms.txt Retrieves a list of all diff tools detected on the current system, ordered by preference. ```APIDOC ## GET DiffTools.Resolved ### Description Returns the list of diff tools that were found on the current system, ordered by preference. ### Response - **Name** (string) - The name of the diff tool. - **ExePath** (string) - The file system path to the executable. - **SupportsText** (bool) - Indicates if the tool supports text comparison. - **AutoRefresh** (bool) - Indicates if the tool supports auto-refresh. - **IsMdi** (bool) - Indicates if the tool is a Multiple Document Interface application. - **BinaryExtensions** (string[]) - List of supported binary file extensions. ``` -------------------------------- ### Check AI CLI Properties Source: https://github.com/verifytests/diffengine/blob/main/readme.md Use these properties to check if the code is running in a specific AI-powered CLI environment. No setup is required. ```cs var isCopilot = AiCliDetector.IsCopilot; var isCursor = AiCliDetector.IsCursor; var isAider = AiCliDetector.IsAider; var isClaudeCode = AiCliDetector.IsClaudeCode; ``` -------------------------------- ### P4Merge Right Arguments for Text Files Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for P4Merge when comparing text files and the target file is on the right. Uses UTF-8 BOM encoding. ```bash -C utf8-bom "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### P4Merge Left Arguments for Text Files Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Example arguments for P4Merge when comparing text files and the target file is on the left. Uses UTF-8 BOM encoding. ```bash -C utf8-bom "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Prioritize MsExcelDiff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this to set the tool order to prioritize MsExcelDiff over other diff tools. Ensure MsExcelDiff is installed. ```csharp DiffTools.UseOrder(DiffTool.MsExcelDiff); ``` -------------------------------- ### Register a Custom Diff Tool Source: https://context7.com/verifytests/diffengine/llms.txt Registers a custom diff tool that is not part of the built-in list. Custom tools are added to the top of the resolution order. This example shows how to define a custom tool with specific launch arguments and path. ```csharp using DiffEngine; // Add a completely custom tool var customTool = DiffTools.AddTool( name: "MyCustomDiffTool", autoRefresh: true, isMdi: false, supportsText: true, requiresTarget: true, useShellExecute: true, launchArguments: new LaunchArguments( Left: (tempFile, targetFile) => $"\"{targetFile}\" \"{tempFile}\"", Right: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\"", Diff: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\"", DiffLeftRight: (tempFile, targetFile) => $"\"{tempFile}\" \"{targetFile}\"" ), exePath: @"C:\\Tools\\MyDiffTool\\diff.exe", binaryExtensions: new[] { ".jpg", ".png", ".gif" }); if (customTool != null) { Console.WriteLine($"Custom tool registered: {customTool.Name}"); // Launch using the custom tool directly await DiffRunner.LaunchAsync(customTool, "temp.txt", "target.txt"); } ``` -------------------------------- ### Configure MaxInstancesToLaunch in C# Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md Sets the maximum number of diff tool instances that can be launched simultaneously. ```cs DiffRunner.MaxInstancesToLaunch(10); ``` -------------------------------- ### Launch Diff Tool with DiffRunner.LaunchAsync Source: https://context7.com/verifytests/diffengine/llms.txt Launches the appropriate diff tool for comparing two files. Automatically selects the best available diff tool based on file extension. Handles process tracking, auto-refresh detection, and MDI behavior. Use this for general file comparison. ```csharp using DiffEngine; // Basic usage - auto-detects tool based on file extension var tempFile = "path/to/temp/snapshot.txt"; var targetFile = "path/to/verified/snapshot.txt"; LaunchResult result = await DiffRunner.LaunchAsync(tempFile, targetFile); // Handle the result switch (result) { case LaunchResult.StartedNewInstance: Console.WriteLine("Diff tool launched successfully"); break; case LaunchResult.AlreadyRunningAndSupportsRefresh: Console.WriteLine("Diff tool already open and will auto-refresh"); break; case LaunchResult.NoDiffToolFound: Console.WriteLine("No suitable diff tool found for this file type"); break; case LaunchResult.Disabled: Console.WriteLine("DiffEngine is disabled (CI environment or manual override)"); break; case LaunchResult.TooManyRunningDiffTools: Console.WriteLine("Max diff tool instances reached"); break; case LaunchResult.NoEmptyFileForExtension: Console.WriteLine("Cannot create empty file for this extension"); break; } ``` ```csharp // Launch a specific diff tool by name await DiffRunner.LaunchAsync(DiffTool.BeyondCompare, tempFile, targetFile); ``` ```csharp // Launch with a specific encoding await DiffRunner.LaunchAsync(tempFile, targetFile, Encoding.UTF8); ``` ```csharp // Launch for text files specifically await DiffRunner.LaunchForTextAsync(tempFile, targetFile); ``` -------------------------------- ### Add Tool and Explicitly Launch Source: https://github.com/verifytests/diffengine/blob/main/docs/mdsource/diff-tool.custom.source.md After adding a custom tool, you can use the returned instance to explicitly launch that specific tool for diffing. ```csharp var myTool = DiffTools.AddTool("MyTool", "C:\\MyTools\\MyTool.exe"); myTool.Launch("file1.txt", "file2.txt"); ``` -------------------------------- ### Launch Diff Runner Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.custom.md Use `DiffRunner.LaunchAsync` to initiate the diffing process between two files. This method respects the configured resolution order for diff tools. ```cs await DiffRunner.LaunchAsync(tempFile, targetFile); ``` -------------------------------- ### Build DiffEngine Project Source: https://github.com/verifytests/diffengine/blob/main/claude.md Builds the DiffEngine project in Release configuration from the repository root. ```bash dotnet build src --configuration Release ``` -------------------------------- ### Limit Concurrent Diff Tools with DiffRunner.MaxInstancesToLaunch Source: https://context7.com/verifytests/diffengine/llms.txt Sets the maximum number of diff tool instances that can be launched concurrently. The default is 5. When this limit is reached, LaunchAsync returns TooManyRunningDiffTools, and the file comparison is queued for the tray application. ```csharp using DiffEngine; // Limit to 3 concurrent diff tool instances (default is 5) DiffRunner.MaxInstancesToLaunch(3); // When the limit is reached, LaunchAsync returns TooManyRunningDiffTools // and the file comparison is queued for the tray application ``` -------------------------------- ### Neovim Command-Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md Arguments for target file comparison for Neovim across platforms. ```text -d "targetFile.txt" "tempFile.txt" ``` ```text -d "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### DiffRunner.LaunchAsync - Launch a Diff Tool Source: https://context7.com/verifytests/diffengine/llms.txt Launches the appropriate diff tool for comparing two files. The method automatically selects the best available diff tool based on the file extension and handles process tracking, auto-refresh detection, and MDI behavior. ```APIDOC ## DiffRunner.LaunchAsync - Launch a Diff Tool ### Description Launches the appropriate diff tool for comparing two files. The method automatically selects the best available diff tool based on the file extension and handles process tracking, auto-refresh detection, and MDI behavior. ### Method `DiffRunner.LaunchAsync` ### Endpoint N/A (Library method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp using DiffEngine; // Basic usage - auto-detects tool based on file extension var tempFile = "path/to/temp/snapshot.txt"; var targetFile = "path/to/verified/snapshot.txt"; LaunchResult result = await DiffRunner.LaunchAsync(tempFile, targetFile); // Handle the result switch (result) { case LaunchResult.StartedNewInstance: Console.WriteLine("Diff tool launched successfully"); break; case LaunchResult.AlreadyRunningAndSupportsRefresh: Console.WriteLine("Diff tool already open and will auto-refresh"); break; case LaunchResult.NoDiffToolFound: Console.WriteLine("No suitable diff tool found for this file type"); break; case LaunchResult.Disabled: Console.WriteLine("DiffEngine is disabled (CI environment or manual override)"); break; case LaunchResult.TooManyRunningDiffTools: Console.WriteLine("Max diff tool instances reached"); break; case LaunchResult.NoEmptyFileForExtension: Console.WriteLine("Cannot create empty file for this extension"); break; } // Launch a specific diff tool by name await DiffRunner.LaunchAsync(DiffTool.BeyondCompare, tempFile, targetFile); // Launch with a specific encoding await DiffRunner.LaunchAsync(tempFile, targetFile, Encoding.UTF8); // Launch for text files specifically await DiffRunner.LaunchForTextAsync(tempFile, targetFile); ``` ### Response #### Success Response (LaunchResult enum) - **StartedNewInstance**: A new diff tool instance was launched. - **AlreadyRunningAndSupportsRefresh**: The diff tool is already running and supports auto-refresh. - **NoDiffToolFound**: No suitable diff tool was found for the given file type. - **Disabled**: DiffEngine is disabled (e.g., in a CI environment). - **TooManyRunningDiffTools**: The maximum number of concurrent diff tool instances has been reached. - **NoEmptyFileForExtension**: Could not create an empty file for the specified extension. #### Response Example (See Request Example for `LaunchResult` handling) ``` -------------------------------- ### Run DiffEngineTray Application Source: https://github.com/verifytests/diffengine/blob/main/docs/tray.md Executes the DiffEngineTray application from the console. This will launch the tray icon and its associated functionalities. ```bash diffenginetray ``` -------------------------------- ### Launch a Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/readme.source.md Launches a diff tool. Respects Auto refresh and MDI behaviors. ```csharp DiffRunner.Launch(file1, file2); ``` -------------------------------- ### Run All Tests for DiffEngine Source: https://github.com/verifytests/diffengine/blob/main/claude.md Executes all tests for the DiffEngine and DiffEngineTray projects in Release configuration. ```bash dotnet test --project src/DiffEngine.Tests --configuration Release dotnet test --project src/DiffEngineTray.Tests --configuration Release ``` -------------------------------- ### KDiff3 Command Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command line arguments for target files on Windows and OSX. ```text "targetFile.txt" "tempFile.txt" --cs CreateBakFiles=0 ``` ```text "tempFile.txt" "targetFile.txt" --cs CreateBakFiles=0 ``` -------------------------------- ### List Available Diff Tools Source: https://context7.com/verifytests/diffengine/llms.txt Iterates through all detected diff tools on the system and prints their properties. Use this to understand what tools are available and their capabilities. ```csharp using DiffEngine; // List all detected diff tools foreach (var tool in DiffTools.Resolved) { Console.WriteLine($"Tool: {tool.Name}"); Console.WriteLine($" Path: {tool.ExePath}"); Console.WriteLine($" Supports Text: {tool.SupportsText}"); Console.WriteLine($" Auto Refresh: {tool.AutoRefresh}"); Console.WriteLine($" Is MDI: {tool.IsMdi}"); Console.WriteLine($" Binary Extensions: {string.Join(", ", tool.BinaryExtensions)}"); } // Check if a specific tool is available for a file bool canUseVsCode = DiffTools.IsDetectedForFile(DiffTool.VisualStudioCode, "file.txt"); bool canUseBeyondCompare = DiffTools.IsDetectedForExtension(DiffTool.BeyondCompare, ".png"); ``` -------------------------------- ### Visual Studio Command Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md Arguments used to specify target and temporary files for diffing in Visual Studio. ```text /diff "targetFile.txt" "tempFile.txt" "targetFile.txt" "tempFile.txt" ``` ```text /diff "tempFile.txt" "targetFile.txt" "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### Check specific Build Server Properties Source: https://github.com/verifytests/diffengine/blob/main/readme.source.md Provides individual properties to check for specific build systems. ```csharp if (BuildServerDetector.AppVeyor) { // do something } ``` -------------------------------- ### Create Tool Variant Based on Existing Tool Source: https://context7.com/verifytests/diffengine/llms.txt Creates a new tool configuration by inheriting settings from an existing tool, allowing specific properties like launch arguments or executable path to be customized. This is useful for creating specialized versions of known tools. ```csharp using DiffEngine; // Create a variant of Visual Studio with custom arguments var customVs = DiffTools.AddToolBasedOn( basedOn: DiffTool.VisualStudio, name: "VisualStudioCustom", launchArguments: new LaunchArguments( Left: (temp, target) => $"/diff \"{target}\" \"{temp}\" /title1:\"Expected\" /title2:\"Actual\"", Right: (temp, target) => $"/diff \"{temp}\" \"{target}\" /title1:\"Actual\" /title2:\"Expected\"")); if (customVs != null) { // Launch with the custom configuration await DiffRunner.LaunchAsync(customVs, "temp.cs", "target.cs"); } // Create a variant with a different executable path var portableVsCode = DiffTools.AddToolBasedOn( basedOn: DiffTool.VisualStudioCode, name: "VSCodePortable", exePath: @"D:\\PortableApps\\VSCode\\Code.exe"); ``` -------------------------------- ### Kaleidoscope Command Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command line arguments for target files on OSX. ```text "targetFile.txt" "tempFile.txt" ``` ```text "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### DiffRunner.MaxInstancesToLaunch - Limit Concurrent Diff Tools Source: https://context7.com/verifytests/diffengine/llms.txt Sets the maximum number of diff tool instances that can be launched concurrently to prevent overwhelming the system with too many open windows. ```APIDOC ## DiffRunner.MaxInstancesToLaunch - Limit Concurrent Diff Tools ### Description Sets the maximum number of diff tool instances that can be launched concurrently to prevent overwhelming the system with too many open windows. ### Method `DiffRunner.MaxInstancesToLaunch` ### Endpoint N/A (Library method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp using DiffEngine; // Limit to 3 concurrent diff tool instances (default is 5) DiffRunner.MaxInstancesToLaunch(3); // When the limit is reached, LaunchAsync returns TooManyRunningDiffTools // and the file comparison is queued for the tray application ``` ### Response #### Success Response (void) This method does not return a value upon successful execution. #### Response Example N/A ``` -------------------------------- ### Launch Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/docs/mdsource/diff-tool.custom.source.md The diff engine resolves tools based on file types. New tools are added to the top of the resolution order, meaning the last tool added will be used first if it supports the file types. ```csharp DiffRunner.Launch("file1.txt", "file2.txt") ``` -------------------------------- ### POST DiffTools.AddToolBasedOn Source: https://context7.com/verifytests/diffengine/llms.txt Creates a new tool configuration based on an existing tool's settings. ```APIDOC ## POST DiffTools.AddToolBasedOn ### Description Creates a new tool configuration based on an existing tool's settings, allowing customization of specific properties. ### Parameters #### Request Body - **basedOn** (DiffTool) - The base tool to inherit settings from. - **name** (string) - New name for the variant. - **launchArguments** (object) - Optional - Custom launch arguments. - **exePath** (string) - Optional - Custom executable path. ``` -------------------------------- ### Add Custom Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.custom.md Use `DiffTools.AddTool` to register a new custom diff tool. Configure its behavior, launch arguments, and supported binary extensions. The `exePath` must point to the executable. ```cs var resolvedTool = DiffTools.AddTool( name: "MyCustomDiffTool", autoRefresh: true, isMdi: false, supportsText: true, requiresTarget: true, useShellExecute: true, launchArguments: new( Left: (tempFile, targetFile) => $"{tempFile}" "{targetFile}", Right: (tempFile, targetFile) => $"{targetFile}" "{tempFile}" ), exePath: diffToolPath, binaryExtensions: [".jpg"])!; ``` -------------------------------- ### Configure DiffEngine command-line arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use these arguments to specify the order of target and temporary files for diffing. ```bash --diff "targetFile.txt" "tempFile.txt" ``` ```bash --diff "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Vim Command Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for Vim on Windows and OSX, including configuration for autoread, nobackup, and noswapfile. ```text -d "targetFile.txt" "tempFile.txt" -c "setl autoread | setl nobackup | set noswapfile" ``` ```text -d "tempFile.txt" "targetFile.txt" -c "setl autoread | setl nobackup | set noswapfile" ``` -------------------------------- ### Prioritize Vim Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize Vim. ```csharp DiffTools.UseOrder(DiffTool.Vim); ``` -------------------------------- ### ExamDiff Command Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command line arguments for target files on Windows. ```text "targetFile.txt" "tempFile.txt" /nh /diffonly /dn1:targetFile.txt /dn2:tempFile.txt ``` ```text "tempFile.txt" "targetFile.txt" /nh /diffonly /dn1:tempFile.txt /dn2:targetFile.txt ``` -------------------------------- ### Launch Specific Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.custom.md Explicitly launch a specific resolved diff tool instance using `DiffRunner.LaunchAsync` with the tool object and file paths. This bypasses the default resolution order. ```cs var resolvedTool = DiffTools.AddToolBasedOn( DiffTool.VisualStudio, name: "MyCustomDiffTool", launchArguments: new( Left: (temp, target) => $"custom args "{target}" "{temp}", Right: (temp, target) => $"custom args "{temp}" "{target}" )); await DiffRunner.LaunchAsync(resolvedTool!, "PathToTempFile", "PathToTargetFile"); ``` -------------------------------- ### Configure and Resolve Diff Tools Source: https://context7.com/verifytests/diffengine/llms.txt Access resolved diff tool configurations or instantiate a custom ResolvedTool for specific requirements. ```csharp using DiffEngine; // Get a resolved tool and inspect its properties if (DiffTools.TryFindByName(DiffTool.BeyondCompare, out var tool)) { Console.WriteLine($"Name: {tool.Name}"); Console.WriteLine($"Executable: {tool.ExePath}"); Console.WriteLine($"Auto Refresh: {tool.AutoRefresh}"); Console.WriteLine($"Is MDI: {tool.IsMdi}"); Console.WriteLine($"Supports Text: {tool.SupportsText}"); Console.WriteLine($"Requires Target: {tool.RequiresTarget}"); Console.WriteLine($"Binary Extensions: {string.Join(", ", tool.BinaryExtensions)}"); // Build command manually string args = tool.GetArguments("temp.txt", "target.txt"); string fullCommand = tool.BuildCommand("temp.txt", "target.txt"); Console.WriteLine($"Arguments: {args}"); Console.WriteLine($"Full Command: {fullCommand}"); } // Create a custom ResolvedTool directly var customTool = new ResolvedTool( name: "CustomDiff", exePath: @"C:\Tools\diff.exe", launchArguments: new LaunchArguments( Left: (temp, target) => $"\"{target}\" \"{temp}\"", Right: (temp, target) => $"\"{temp}\" \"{target}\""), isMdi: false, autoRefresh: true, binaryExtensions: new List { ".png", ".jpg" }, requiresTarget: true, supportsText: true, useShellExecute: true); ``` -------------------------------- ### Guiffy Command Line Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command line arguments for target files on Windows and OSX. ```text "targetFile.txt" "tempFile.txt" -ge2 ``` ```text "tempFile.txt" "targetFile.txt" -ge1 ``` -------------------------------- ### Prioritize KDiff3 Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize KDiff3. ```csharp DiffTools.UseOrder(DiffTool.KDiff3); ``` -------------------------------- ### Run Single Test Project with Filter Source: https://github.com/verifytests/diffengine/blob/main/claude.md Runs tests for a specific project (DiffEngine.Tests) using a filter to select tests based on class name. ```bash dotnet test --project src/DiffEngine.Tests --configuration Release --filter "FullyQualifiedName~ClassName" ``` -------------------------------- ### Detect CI/CD Environments with BuildServerDetector Source: https://context7.com/verifytests/diffengine/llms.txt Use BuildServerDetector to identify CI/CD environments and automatically disable diff tool launching. Detection can be manually overridden for testing purposes using AsyncLocal. ```csharp using DiffEngine; // Check if running in any CI environment if (BuildServerDetector.Detected) { Console.WriteLine("Running in CI - diff tools will be disabled"); } // Check specific CI systems if (BuildServerDetector.IsGithubAction) Console.WriteLine("Running in GitHub Actions"); if (BuildServerDetector.IsAzureDevops) Console.WriteLine("Running in Azure DevOps"); if (BuildServerDetector.IsJenkins) Console.WriteLine("Running in Jenkins"); if (BuildServerDetector.IsDocker) Console.WriteLine("Running in Docker container"); // Other supported: IsAppVeyor, IsTravis, IsTeamCity, IsGitLab, IsMyGet, IsGoDc, IsWsl // Override detection for testing (uses AsyncLocal, doesn't leak to other tests) BuildServerDetector.Detected = true; // Run test code... BuildServerDetector.Detected = false; ``` -------------------------------- ### Add Custom Diff Tool Based on Existing Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.custom.md Use `DiffTools.AddToolBasedOn` to create a new diff tool that inherits properties from an existing one, like `DiffTool.VisualStudio`. Customize its name and launch arguments. ```cs var resolvedTool = DiffTools.AddToolBasedOn( DiffTool.VisualStudio, name: "MyCustomDiffTool", launchArguments: new( Left: (temp, target) => $"custom args "{target}" "{temp}", Right: (temp, target) => $"custom args "{temp}" "{target}" ))!; ``` -------------------------------- ### Find Diff Tool by File Extension Source: https://context7.com/verifytests/diffengine/llms.txt Attempts to find the most suitable diff tool for a given file extension or type. It can also find tools by specific file paths or names. ```csharp using DiffEngine; // Find tool by extension if (DiffTools.TryFindByExtension(".png", out var tool)) { Console.WriteLine($"Found {tool.Name} for PNG files"); Console.WriteLine($"Executable: {tool.ExePath}"); // Build the command that would be executed string command = tool.BuildCommand("temp.png", "target.png"); Console.WriteLine($"Command: {command}"); } // Find tool for text files if (DiffTools.TryFindForText(out var textTool)) { Console.WriteLine($"Default text diff tool: {textTool.Name}"); } // Find tool by file path (handles text detection automatically) if (DiffTools.TryFindForInputFilePath("document.json", out var jsonTool)) { Console.WriteLine($"Tool for JSON: {jsonTool.Name}"); } // Find tool by specific name if (DiffTools.TryFindByName(DiffTool.Rider, out var rider)) { Console.WriteLine($"Rider found at: {rider.ExePath}"); } ``` -------------------------------- ### Linux Binary Diff Arguments for Rider Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Arguments for comparing binary files on Linux using Rider. Ensure the correct file paths are provided. ```bash "targetFile.png" "tempFile.png" ``` ```bash "tempFile.png" "targetFile.png" ``` -------------------------------- ### TortoiseIDiff Command Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for specifying target files on the left or right side. ```text /left:"targetFile.txt" /right:"tempFile.txt" ``` ```text /left:"tempFile.txt" /right:"targetFile.txt" ``` -------------------------------- ### VisualStudioCode Tool Order Configuration Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Configures VisualStudioCode as the preferred diff tool using the DiffTools.UseOrder method. This ensures VisualStudioCode is prioritized over other diff tools. ```csharp DiffTools.UseOrder(DiffTool.VisualStudioCode); ``` -------------------------------- ### Run Specific Test Source: https://github.com/verifytests/diffengine/blob/main/claude.md Executes a single, specific test case within the DiffEngine.Tests project by its fully qualified name. ```bash dotnet test --project src/DiffEngine.Tests --configuration Release --filter "FullyQualifiedName=DiffEngine.Tests.ClassName.TestMethod" ``` -------------------------------- ### Prioritize WinMerge Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize WinMerge. ```csharp DiffTools.UseOrder(DiffTool.WinMerge); ``` -------------------------------- ### Prioritize TortoiseIDiff Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize TortoiseIDiff. ```csharp DiffTools.UseOrder(DiffTool.TortoiseIDiff); ``` -------------------------------- ### VisualStudio Tool Order Configuration Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Configures VisualStudio as the preferred diff tool using the DiffTools.UseOrder method. This ensures VisualStudio is prioritized over other diff tools. ```csharp DiffTools.UseOrder(DiffTool.VisualStudio); ``` -------------------------------- ### POST DiffTools.UseOrder Source: https://context7.com/verifytests/diffengine/llms.txt Customizes the priority order in which diff tools are selected. ```APIDOC ## POST DiffTools.UseOrder ### Description Sets the order in which diff tools are selected when multiple tools support a file type. ### Parameters #### Request Body - **throwForNoTool** (bool) - Optional - If true, throws an exception if none of the specified tools are found. - **tools** (DiffTool[]) - Required - The list of tools in order of preference. ``` -------------------------------- ### Prioritize TkDiff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this C# code to set TkDiff as the preferred diff tool in the tool order. ```csharp DiffTools.UseOrder(DiffTool.TkDiff); ``` -------------------------------- ### Check specific AI CLI Properties Source: https://github.com/verifytests/diffengine/blob/main/readme.source.md Provides individual properties to check for specific AI CLI environments. ```csharp if (AiCliDetector.Copilot) { // do something } ``` -------------------------------- ### Configure Diff Tool Order via Code Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.order.md Sets the preferred order of diff tools programmatically using the DiffTools.UseOrder method. ```cs DiffTools.UseOrder(DiffTool.VisualStudio, DiffTool.AraxisMerge); ``` -------------------------------- ### WinMerge Right Target Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use these arguments when WinMerge is configured as the right-hand diff tool. ```bash /u /wl /e "tempFile.txt" "targetFile.txt" /dl "tempFile.txt" /dr "targetFile.txt" /cfg Backup/EnableFile=0 ``` -------------------------------- ### Cursor Right Target Arguments (Windows/OSX/Linux) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for Cursor when used as the right diff tool. This format is consistent across Windows, macOS, and Linux. ```bash --diff "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Vim Configuration Options Source: https://github.com/verifytests/diffengine/blob/main/docs/diff-tool.md These Vim options enable autoread, disable backup files, and disable swap files for diff operations. This is useful for ensuring Vim correctly reflects file changes during a diff session. ```vim setl autoread | setl nobackup | set noswapfile ``` -------------------------------- ### Windows Text Diff Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Arguments for comparing text files on Windows. These are standard command-line arguments for diff utilities. ```bash diff "targetFile.txt" "tempFile.txt" ``` ```bash diff "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Set Beyond Compare as Default Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this code to prioritize Beyond Compare over other diff tools when DiffEngine is used. Ensure DiffTool.BeyondCompare is correctly defined in your environment. ```csharp DiffTools.UseOrder(DiffTool.BeyondCompare); ``` -------------------------------- ### Check if running on a Build Server Source: https://github.com/verifytests/diffengine/blob/main/readme.source.md Detects if the current code is running on a build/CI server. Supports AppVeyor, Travis, Jenkins, GitHub Actions, AzureDevops, TeamCity, MyGet, GitLab, and GoCD. ```csharp if (BuildServerDetector.Detected) { // do something } ``` -------------------------------- ### Prioritize Guiffy Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize Guiffy. ```csharp DiffTools.UseOrder(DiffTool.Guiffy); ``` -------------------------------- ### Prioritize TortoiseGitIDiff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this C# code to set TortoiseGitIDiff as the preferred diff tool in the tool order. ```csharp DiffTools.UseOrder(DiffTool.TortoiseGitIDiff); ``` -------------------------------- ### Prioritize Kaleidoscope Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize Kaleidoscope. ```csharp DiffTools.UseOrder(DiffTool.Kaleidoscope); ``` -------------------------------- ### Prioritize ExamDiff Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize ExamDiff. ```csharp DiffTools.UseOrder(DiffTool.ExamDiff); ``` -------------------------------- ### WinMerge Left Target Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use these arguments when WinMerge is configured as the left-hand diff tool. ```bash /u /wr /e "targetFile.txt" "tempFile.txt" /dl "targetFile.txt" /dr "tempFile.txt" /cfg Backup/EnableFile=0 ``` -------------------------------- ### Set Diffinity as Default Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Prioritize Diffinity for diff operations within DiffEngine. Ensure DiffTool.Diffinity is defined. ```csharp DiffTools.UseOrder(DiffTool.Diffinity); ``` -------------------------------- ### Linux Text Diff Arguments for Rider Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Arguments for comparing text files on Linux using Rider. Ensure the correct file paths are provided. ```bash -C utf8-bom "tempFile.txt" "targetFile.txt" ``` ```bash -C utf8-bom "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### DiffRunner.Disabled - Control Diff Tool Launching Source: https://context7.com/verifytests/diffengine/llms.txt Controls whether diff tools should be launched. Automatically set to true in CI/build server environments, Docker containers, WSL, or AI CLI environments. ```APIDOC ## DiffRunner.Disabled - Control Diff Tool Launching ### Description Controls whether diff tools should be launched. Automatically set to true in CI/build server environments, Docker containers, WSL, or AI CLI environments. ### Method `DiffRunner.Disabled` (property) ### Endpoint N/A (Library property) ### Parameters None ### Request Example ```csharp using DiffEngine; // Check if diff launching is disabled if (DiffRunner.Disabled) { Console.WriteLine("Running in CI or disabled environment"); } // Manually disable diff launching DiffRunner.Disabled = true; // Or use environment variable: set DiffEngine_Disabled=true // Disable is automatically triggered by: // - Build servers (AppVeyor, Travis, Jenkins, GitHub Actions, Azure DevOps, etc.) // - Docker containers // - WSL environments // - AI CLI tools (GitHub Copilot, Aider, Claude Code, Cursor) ``` ### Response #### Success Response (bool) - **true**: Diff tool launching is disabled. - **false**: Diff tool launching is enabled. #### Response Example N/A ``` -------------------------------- ### Cursor Left Target Arguments (Windows/OSX/Linux) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for Cursor when used as the left diff tool. This format is consistent across Windows, macOS, and Linux. ```bash --diff "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### Prioritize Rider Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this C# code to set Rider as the preferred diff tool in the tool order. ```csharp DiffTools.UseOrder(DiffTool.Rider); ``` -------------------------------- ### Set Meld Tool Order Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Prioritize Meld over other diff tools by using this command. ```csharp DiffTools.UseOrder(DiffTool.Meld); ``` -------------------------------- ### List Supported Diff Tools via DiffTool Enum Source: https://context7.com/verifytests/diffengine/llms.txt The DiffTool enum provides access to built-in supported diff tools, each configured with specific executable paths, command line arguments, and platform compatibility. ```csharp using DiffEngine; // DiffTool enum contains all built-in supported tools: // - BeyondCompare (Windows/macOS/Linux) - Paid // - P4Merge (Windows/macOS/Linux) - Free // - VisualStudioCode (Windows/macOS/Linux) - Free // - Meld (Windows/macOS/Linux) - Free // - Rider (Windows/macOS/Linux) - Paid/Free for OSS // - WinMerge (Windows) - Free // - KDiff3 (Windows/macOS) - Free // - VisualStudio (Windows) - Paid/Free options // - TortoiseMerge/TortoiseGitMerge (Windows) - Free // - Kaleidoscope (macOS) - Paid // - AraxisMerge (Windows/macOS) - Paid // - And many more... // Each tool is configured with: // - Executable paths for each OS // - Command line argument format // - Supported binary file extensions // - Auto-refresh capability // - MDI (Multi-Document Interface) behavior ``` -------------------------------- ### Set Cursor Tool Order Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Prioritize Cursor over other diff tools by using this command. ```csharp DiffTools.UseOrder(DiffTool.Cursor); ``` -------------------------------- ### AraxisMerge Right Target Arguments (Windows) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for AraxisMerge when used as the right diff tool on Windows. ```bash /nowait "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### DeltaWalker Windows Arguments Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for DeltaWalker on Windows. The '-mi' flag is used for specifying files. ```bash "-mi "targetFile.txt" "tempFile.txt"" ``` ```bash "-mi "tempFile.txt" "targetFile.txt"" ``` -------------------------------- ### Set Diff Tool Priority Order Source: https://context7.com/verifytests/diffengine/llms.txt Customizes the order in which diff tools are selected. This can be done programmatically or via an environment variable. An option exists to throw an exception if none of the specified tools are found. ```csharp using DiffEngine; // Set preferred tool order in code DiffTools.UseOrder(DiffTool.VisualStudio, DiffTool.AraxisMerge); // Or set via environment variable: // DiffEngine_ToolOrder=VisualStudio,Meld,BeyondCompare // Throw exception if none of the specified tools are found DiffTools.UseOrder(throwForNoTool: true, DiffTool.BeyondCompare, DiffTool.P4Merge); ``` -------------------------------- ### POST DiffTools.AddTool Source: https://context7.com/verifytests/diffengine/llms.txt Registers a custom diff tool that is not in the built-in list. ```APIDOC ## POST DiffTools.AddTool ### Description Registers a custom diff tool. Custom tools are added to the top of the resolution order. ### Parameters #### Request Body - **name** (string) - Name of the tool. - **autoRefresh** (bool) - Supports auto-refresh. - **isMdi** (bool) - Is MDI application. - **supportsText** (bool) - Supports text comparison. - **requiresTarget** (bool) - Requires a target file. - **useShellExecute** (bool) - Use shell execute. - **launchArguments** (object) - Configuration for left and right file arguments. - **exePath** (string) - Path to the executable. - **binaryExtensions** (string[]) - Supported binary extensions. ``` -------------------------------- ### Disable Diff Tool Launching with DiffRunner.Disabled Source: https://context7.com/verifytests/diffengine/llms.txt Controls whether diff tools should be launched. This is automatically set to true in CI/build server environments, Docker containers, WSL, or AI CLI environments. It can also be manually controlled or set via an environment variable. ```csharp using DiffEngine; // Check if diff launching is disabled if (DiffRunner.Disabled) { Console.WriteLine("Running in CI or disabled environment"); } // Manually disable diff launching DiffRunner.Disabled = true; // Or use environment variable: set DiffEngine_Disabled=true // Disable is automatically triggered by: // - Build servers (AppVeyor, Travis, Jenkins, GitHub Actions, Azure DevOps, etc.) // - Docker containers // - WSL environments // - AI CLI tools (GitHub Copilot, Aider, Claude Code, Cursor) ``` -------------------------------- ### Set DeltaWalker as Default Diff Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Configure DiffEngine to use DeltaWalker as the preferred diff tool. This requires the DiffTool.DeltaWalker enum value to be available. ```csharp DiffTools.UseOrder(DiffTool.DeltaWalker); ``` -------------------------------- ### Close Diff Tool Process with DiffRunner.Kill Source: https://context7.com/verifytests/diffengine/llms.txt Finds and terminates a diff tool process that was launched for comparing specific files. This method respects MDI behavior to avoid closing tools that manage multiple documents. Use this after a user has reviewed and potentially edited files. ```csharp using DiffEngine; var tempFile = "path/to/temp/snapshot.txt"; var targetFile = "path/to/verified/snapshot.txt"; // Launch a diff tool await DiffRunner.LaunchAsync(tempFile, targetFile); // After the user has reviewed and potentially edited the files, kill the diff tool DiffRunner.Kill(tempFile, targetFile); // Note: Kill is automatically skipped for MDI tools (like Visual Studio) // to avoid closing the entire application ``` -------------------------------- ### Detect AI CLI Environments with AiCliDetector Source: https://context7.com/verifytests/diffengine/llms.txt Identify if the code is executing within AI-powered CLI environments like GitHub Copilot or Aider. ```csharp using DiffEngine; // Check if running in any AI CLI if (AiCliDetector.Detected) { Console.WriteLine("Running in AI CLI - diff tools will be disabled"); } // Check specific AI CLI environments if (AiCliDetector.IsCopilot) Console.WriteLine("Running in GitHub Copilot CLI"); if (AiCliDetector.IsClaudeCode) Console.WriteLine("Running in Claude Code"); if (AiCliDetector.IsAider) Console.WriteLine("Running in Aider"); if (AiCliDetector.IsCursor) Console.WriteLine("Running in Cursor"); ``` -------------------------------- ### Set Custom Tool Order via Code Source: https://github.com/verifytests/diffengine/blob/main/docs/mdsource/diff-tool.order.source.md Use the `DiffEngine.ToolOrder` property to specify a custom order for tool resolution in code. This overrides environment variables. ```csharp DiffEngine.ToolOrder = new[] { typeof(VisualStudio), typeof(Meld) }; ``` -------------------------------- ### Prioritize TortoiseMerge Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Sets the tool order to prioritize TortoiseMerge. ```csharp DiffTools.UseOrder(DiffTool.TortoiseMerge); ``` -------------------------------- ### AraxisMerge Left Target Arguments (Windows) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for AraxisMerge when used as the left diff tool on Windows. ```bash /nowait "targetFile.txt" "tempFile.txt" ``` -------------------------------- ### AraxisMerge Right Target Arguments (OSX) Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Command-line arguments for AraxisMerge when used as the right diff tool on macOS. ```bash -nowait "tempFile.txt" "targetFile.txt" ``` -------------------------------- ### Prioritize TortoiseGitMerge Tool Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Use this C# code to set TortoiseGitMerge as the preferred diff tool in the tool order. ```csharp DiffTools.UseOrder(DiffTool.TortoiseGitMerge); ``` -------------------------------- ### DiffRunner.Kill - Close a Diff Tool Process Source: https://context7.com/verifytests/diffengine/llms.txt Finds and terminates a diff tool process that was launched for comparing specific files. Respects MDI behavior to avoid closing tools that manage multiple documents. ```APIDOC ## DiffRunner.Kill - Close a Diff Tool Process ### Description Finds and terminates a diff tool process that was launched for comparing specific files. Respects MDI behavior to avoid closing tools that manage multiple documents. ### Method `DiffRunner.Kill` ### Endpoint N/A (Library method) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```csharp using DiffEngine; var tempFile = "path/to/temp/snapshot.txt"; var targetFile = "path/to/verified/snapshot.txt"; // Launch a diff tool await DiffRunner.LaunchAsync(tempFile, targetFile); // After the user has reviewed and potentially edited the files, kill the diff tool DiffRunner.Kill(tempFile, targetFile); // Note: Kill is automatically skipped for MDI tools (like Visual Studio) // to avoid closing the entire application ``` ### Response #### Success Response (void) This method does not return a value upon successful execution. #### Response Example N/A ``` -------------------------------- ### Set AraxisMerge Tool Order Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Prioritize AraxisMerge over other diff tools by using this command. ```csharp DiffTools.UseOrder(DiffTool.AraxisMerge); ``` -------------------------------- ### Disable DiffEngine via Environment Variable Source: https://github.com/verifytests/diffengine/blob/main/readme.md Set the environment variable `DiffEngine_Disabled` to `true` to disable DiffEngine for a specific machine or process. ```text DiffEngine_Disabled=true ``` -------------------------------- ### SublimeMerge Tool Order Configuration Source: https://github.com/verifytests/diffengine/blob/main/src/DiffEngine.Tests/diffTools.include.md Configures SublimeMerge as the preferred diff tool using the DiffTools.UseOrder method. This ensures SublimeMerge is prioritized over other diff tools. ```csharp DiffTools.UseOrder(DiffTool.SublimeMerge); ```