![]() |
VOOZH | about |
dotnet tool install --global ErikEJ.EFCorePowerTools.Cli --version 10.1.1386
dotnet new tool-manifestif you are setting up this repo
dotnet tool install --local ErikEJ.EFCorePowerTools.Cli --version 10.1.1386
#tool dotnet:?package=ErikEJ.EFCorePowerTools.Cli&version=10.1.1386
nuke :add-package ErikEJ.EFCorePowerTools.Cli --version 10.1.1386
Cross platform command line tool for advanced EF Core reverse engineering. See the full guide explaining all the features here.
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.
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.*
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.
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.
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.
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.
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.
dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*
Release notes - notice the +CLI label.
dotnet tool update ErikEJ.EFCorePowerTools.Cli -g --version 8.*-*
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package has no dependencies.
| Version | Downloads | Last Updated |
|---|---|---|
| 10.1.1415-nightly | 111 | 6/22/2026 |
| 10.1.1413-nightly | 97 | 6/21/2026 |
| 10.1.1407-nightly | 101 | 6/20/2026 |
| 10.1.1403-nightly | 98 | 6/19/2026 |
| 10.1.1397-nightly | 120 | 6/1/2026 |
| 10.1.1394-nightly | 118 | 5/15/2026 |
| 10.1.1386 | 5,817 | 5/15/2026 |
| 9.1.1415-nightly | 88 | 6/22/2026 |
| 9.1.1413-nightly | 91 | 6/21/2026 |
| 9.1.1407-nightly | 89 | 6/20/2026 |
| 9.1.1403-nightly | 88 | 6/19/2026 |
| 9.1.1397-nightly | 98 | 6/1/2026 |
| 9.1.1386 | 235 | 5/15/2026 |
| 8.1.1415-nightly | 91 | 6/22/2026 |
| 8.1.1413-nightly | 90 | 6/21/2026 |
| 8.1.1407-nightly | 90 | 6/20/2026 |
| 8.1.1403-nightly | 85 | 6/19/2026 |
| 8.1.1397-nightly | 102 | 6/1/2026 |
| 8.1.1394-nightly | 93 | 5/15/2026 |
| 8.1.1386 | 716 | 5/15/2026 |
For EF Core 10