ErikEJ.EFCorePowerTools.Cli 10.1.1250

Prefix Reserved
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet tool install --global ErikEJ.EFCorePowerTools.Cli --version 10.1.1250
                    
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 ErikEJ.EFCorePowerTools.Cli --version 10.1.1250
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ErikEJ.EFCorePowerTools.Cli&version=10.1.1250
                    
nuke :add-package ErikEJ.EFCorePowerTools.Cli --version 10.1.1250
                    

EF Core Power Tools CLI

Cross platform command line tool for advanced EF Core reverse engineering. See the full guide explaining all the features here.

Getting started

The tool runs on any operating system with the .NET 10.0 / .NET 8.0 runtime installed.

For a quick intro you can watch this 2 minute demo video.

And there is a longer 30 minute demo here.

Installing the tool

EF Core 10:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 10.*

EF Core 8:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 8.*

EF Core 9:

dotnet tool install ErikEJ.EFCorePowerTools.Cli -g --version 9.*

Running the tool

From the folder where you want the code to be generated (usually where your .NET project is located)

efcpt "Server=(local);Initial Catalog=Northwind;User id=user;Pwd=secret123;Encrypt=false" mssql

Type efcpt --help for help on command line options.

The provider name (mssql) may not be required, as an attempt is made to resolve the provider from the connection string.

Configuring options

A configuration file efcpt-config.json is created in the output folder, and you can open this file in your editor to modify the default options. If your editor supports it (for example VS Code), it will provide syntax guidance for the file. For reference there is a fully populated sample file here.

Updating to new configuration

After updating the efcpt-config.json, you will need to run the efcpt CLI command from above once again in order to update the generated code.

If you have updated the configuration file in a way that requires files to be deleted - by excluding objects for example - then you will need to set the "soft-delete-obsolete-files" option in the configuration file to true or delete the files manually.

Excluding objects

The config file defaults to always contain all current database objects.

If you don't want the lists of objects to be refreshed during each scaffolding operation, set the "refresh-object-lists" option in the configuration file to false.

You can exclude indvidual database objects with "exclude": true for the object.

You can also use the exclusionWildcard item under each type of data object to filter included objects.

You can use the following filter expressions:

  • *: Exclude all objects in section. Overrides all other filters.
  • abc*: Exclude all objects in section that starts with abc. Multiple filters allowed.
  • *xyz: Exclude all objects in section that ends with xyz. Multiple filters allowed.
  • *mno*: Exclude all objects in section that contains mno. Multiple filters allowed.

Filters will apply unless "exclude": false is explicitly set for a database object.

All filters are case sensitive.

"tables": [
      {
         "exclusionWildcard": "*"
      },
      {
         "name": "[dbo].[Users]",
         "exclude": false
      },
      {
         "name": "[dbo].[Messages]"
      }
  ],

In the example above, only the Users table will be selected.

"tables": [
      {
         "exclusionWildcard": "[other].*"
      },
      {
         "name": "[dbo].[Users]"
      },
      {
         "name": "[other].[Accounts]"
      },      
      {
         "name": "[other].[Messages]",
         "exclude": false
      }
  ],

In the example above, Users and Messages tables will be selected.

"tables": [
      {
         "exclusionWildcard": "[other].*"
      },
      {
         "exclusionWildcard": "[other2].*"
      },
      {
         "name": "[dbo].[Users]"
      },
      {
         "name": "[other].[Accounts]"
      },      
      {
         "name": "[other].[Messages]"
      },
      {
         "name": "[other2].[Actions]"
      }
  ],

In the example above, Users table will be selected.

Generate a Mermaid ER diagram

The tool can generate a Mermaid ER diagram during exectution, just set the code-generation option generate-mermaid-diagram to true and a dbdiagram.md file will be created in the output folder.

Updating the tool

dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*

Release notes - notice the +CLI label.

Getting the latest daily build

dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*-*
Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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
10.1.1385-nightly 86 5/11/2026
10.1.1382-nightly 100 5/6/2026
10.1.1380-nightly 103 5/2/2026
10.1.1370-nightly 177 4/21/2026
10.1.1365-nightly 112 4/17/2026
10.1.1356-nightly 108 4/16/2026
10.1.1250 1,604 4/6/2026
9.1.1385-nightly 74 5/11/2026
9.1.1382-nightly 84 5/6/2026
9.1.1380-nightly 92 5/2/2026
9.1.1370-nightly 89 4/21/2026
9.1.1365-nightly 87 4/17/2026
9.1.1356-nightly 91 4/16/2026
9.1.1353-nightly 92 4/16/2026
8.1.1385-nightly 74 5/11/2026
8.1.1382-nightly 81 5/6/2026
8.1.1380-nightly 81 5/2/2026
8.1.1370-nightly 91 4/21/2026
8.1.1365-nightly 96 4/17/2026
8.1.1356-nightly 90 4/16/2026
Loading failed

For EF Core 10