ErikEJ.EFCorePowerTools.Cli 8.1.148

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. 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 8.1.148
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 8.1.148
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ErikEJ.EFCorePowerTools.Cli&version=8.1.148
nuke :add-package ErikEJ.EFCorePowerTools.Cli --version 8.1.148

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 6.0 / .NET 8.0 runtime installed.

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

Installing the tool

EF Core 8:

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

EF Core 7:

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

EF Core 6:

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

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]",
         "exclude": false
      },
      {
         "name": "[other].[Accounts]"
      },      
      {
         "name": "[other].[Messages]"
      }
  ],

In the example above, Users and Messages tables 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 net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.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
8.1.182-nightly 63 4/26/2024
8.1.180-nightly 70 4/26/2024
8.1.178-nightly 89 4/24/2024
8.1.170-nightly 238 4/12/2024
8.1.169-nightly 118 4/12/2024
8.1.161-nightly 262 4/5/2024
8.1.157-nightly 178 4/4/2024
8.1.151-nightly 220 3/29/2024
8.1.150-nightly 240 3/26/2024
8.1.149-nightly 159 3/24/2024
8.1.148 2,446 3/23/2024
8.1.147-nightly 172 3/19/2024
8.1.145-nightly 120 3/18/2024
8.1.137-nightly 182 3/14/2024
8.1.136-nightly 201 3/14/2024
8.1.131-nightly 172 3/13/2024
8.1.128-nightly 108 3/11/2024
8.1.126-nightly 209 3/8/2024
8.1.120-nightly 174 3/2/2024
8.1.119-nightly 127 2/29/2024
8.1.118-nightly 120 2/28/2024
8.1.115-nightly 144 2/26/2024
8.1.110-nightly 167 2/26/2024
8.1.105-nightly 171 2/18/2024
8.1.104-nightly 131 2/18/2024
8.1.103-nightly 118 2/17/2024
8.1.101-nightly 131 2/16/2024
8.1.100 2,331 2/14/2024
8.1.99-nightly 77 2/14/2024
8.1.98-nightly 184 2/13/2024
8.1.97-nightly 135 2/12/2024
8.1.94-nightly 209 2/7/2024
8.1.92-nightly 85 2/6/2024
8.1.79-nightly 102 1/31/2024
8.1.72-nightly 101 1/28/2024
8.1.71-nightly 132 1/28/2024
8.1.70-nightly 101 1/26/2024
8.1.69-nightly 101 1/26/2024
8.1.68-nightly 110 1/25/2024
8.1.67-nightly 118 1/23/2024
8.1.66-nightly 73 1/22/2024
8.1.63-nightly 93 1/22/2024
8.1.57-nightly 88 1/21/2024
8.1.50-nightly 123 1/19/2024
8.1.49-nightly 82 1/19/2024
8.1.45-nightly 92 1/15/2024
8.1.43-nightly 166 1/15/2024
8.1.41 1,490 1/12/2024
8.1.40 188 1/11/2024
8.1.37-nightly 129 1/11/2024
8.1.36-nightly 194 1/11/2024
8.1.35-nightly 136 1/11/2024
8.1.29-nightly 132 1/11/2024
8.1.28-nightly 133 1/11/2024
8.1.27-nightly 123 1/11/2024
8.1.21-nightly 147 1/10/2024
8.1.20-nightly 127 1/10/2024
8.1.14-nightly 112 1/10/2024
8.1.13-nightly 91 1/10/2024
8.1.12-nightly 116 1/10/2024
8.1.1 190 1/11/2024
8.0.1720 388 1/12/2024
8.0.1718 1,495 12/14/2023
8.0.1707 1,207 12/7/2023
8.0.1694 952 11/27/2023
8.0.1500 154 1/12/2024
8.0.0 1,425 11/15/2023
8.0.0-rc.16 163 11/1/2023
8.0.0-rc.15 118 11/1/2023
8.0.0-rc.14 113 10/27/2023
8.0.0-rc.13 122 10/23/2023
8.0.0-rc.12 169 10/15/2023
8.0.0-rc.11 256 9/12/2023
8.0.0-rc.10 276 8/25/2023
8.0.0-rc.9 148 8/25/2023
8.0.0-rc.8 233 8/11/2023
7.1.182-nightly 62 4/26/2024
7.1.180-nightly 63 4/26/2024
7.1.178-nightly 91 4/24/2024
7.1.170-nightly 246 4/12/2024
7.1.169-nightly 191 4/12/2024
7.1.161-nightly 203 4/5/2024
7.1.157-nightly 149 4/4/2024
7.1.151-nightly 170 3/29/2024
7.1.150-nightly 213 3/26/2024
7.1.149-nightly 159 3/24/2024
7.1.148 366 3/23/2024
7.1.147-nightly 149 3/19/2024
7.1.145-nightly 169 3/18/2024
7.1.137-nightly 136 3/14/2024
7.1.136-nightly 175 3/14/2024
7.1.131-nightly 188 3/13/2024
7.1.128-nightly 144 3/11/2024
7.1.126-nightly 113 3/8/2024
7.1.120-nightly 168 3/2/2024
7.1.119-nightly 124 2/29/2024
7.1.118-nightly 176 2/28/2024
7.1.115-nightly 156 2/26/2024
7.1.110-nightly 197 2/26/2024
7.1.105-nightly 103 2/18/2024
7.1.104-nightly 145 2/18/2024
7.1.103-nightly 74 2/17/2024
7.1.101-nightly 88 2/16/2024
7.1.100 340 2/14/2024
7.1.99-nightly 104 2/14/2024
7.1.98-nightly 140 2/13/2024
7.1.97-nightly 143 2/12/2024
7.1.94-nightly 92 2/7/2024
7.1.92-nightly 93 2/6/2024
7.1.79-nightly 107 1/31/2024
7.1.72-nightly 128 1/28/2024
7.1.71-nightly 105 1/28/2024
7.1.70-nightly 96 1/26/2024
7.1.69-nightly 95 1/26/2024
7.1.68-nightly 95 1/25/2024
7.1.67-nightly 82 1/23/2024
7.1.66-nightly 77 1/22/2024
7.1.63-nightly 72 1/22/2024
7.1.57-nightly 94 1/21/2024
7.1.50-nightly 74 1/19/2024
7.1.49-nightly 102 1/19/2024
7.1.45-nightly 100 1/15/2024
7.1.43-nightly 103 1/15/2024
7.1.41 206 1/12/2024
7.1.40 149 1/11/2024
7.1.37-nightly 63 1/11/2024
7.1.36-nightly 101 1/11/2024
7.1.35-nightly 135 1/11/2024
7.1.29-nightly 116 1/11/2024
7.1.28-nightly 93 1/11/2024
7.1.27-nightly 113 1/11/2024
7.1.21-nightly 115 1/10/2024
7.1.20-nightly 110 1/10/2024
7.1.14-nightly 146 1/10/2024
7.1.13-nightly 126 1/10/2024
7.1.12-nightly 97 1/10/2024
7.1.1 209 1/11/2024
7.0.1720 249 1/12/2024
7.0.1718 486 12/14/2023
7.0.1707 386 12/7/2023
7.0.1694 376 11/27/2023
7.0.1500 150 1/12/2024
7.0.0 949 11/15/2023
7.0.0-rc.16 173 11/1/2023
7.0.0-rc.15 80 11/1/2023
7.0.0-rc.14 147 10/27/2023
7.0.0-rc.13 92 10/23/2023
7.0.0-rc.12 193 10/15/2023
7.0.0-rc.11 543 9/12/2023
7.0.0-rc.10 222 8/25/2023
7.0.0-rc.9 116 8/25/2023
7.0.0-rc.8 194 8/11/2023
7.0.0-rc.7 793 7/18/2023
7.0.0-rc.6 154 7/17/2023
7.0.0-rc.5 151 7/16/2023
7.0.0-rc.4 171 7/10/2023
7.0.0-rc.3 157 6/7/2023
7.0.0-rc.2 98 5/30/2023
7.0.0-rc.1 82 5/28/2023
7.0.0-preview9 325 5/26/2023
7.0.0-preview8 183 5/23/2023
7.0.0-preview7 224 5/19/2023
7.0.0-preview6 290 5/5/2023
7.0.0-preview5 311 5/4/2023
7.0.0-preview4 255 4/30/2023
7.0.0-preview3 345 4/27/2023
7.0.0-preview2 259 4/25/2023
7.0.0-preview10 181 5/28/2023
7.0.0-preview1 403 4/25/2023
7.0.0-preview.11 78 5/28/2023
6.1.182-nightly 59 4/26/2024
6.1.180-nightly 69 4/26/2024
6.1.178-nightly 86 4/24/2024
6.1.170-nightly 143 4/12/2024
6.1.169-nightly 160 4/12/2024
6.1.161-nightly 172 4/5/2024
6.1.157-nightly 178 4/4/2024
6.1.151-nightly 188 3/29/2024
6.1.150-nightly 124 3/26/2024
6.1.149-nightly 175 3/24/2024
6.1.148 640 3/23/2024
6.1.147-nightly 168 3/19/2024
6.1.145-nightly 159 3/18/2024
6.1.137-nightly 174 3/14/2024
6.1.136-nightly 179 3/14/2024
6.1.131-nightly 76 3/13/2024
6.1.128-nightly 159 3/11/2024
6.1.126-nightly 176 3/8/2024
6.1.120-nightly 216 3/2/2024
6.1.119-nightly 179 2/29/2024
6.1.118-nightly 77 2/28/2024
6.1.115-nightly 170 2/26/2024
6.1.110-nightly 128 2/26/2024
6.1.105-nightly 180 2/18/2024
6.1.104-nightly 129 2/18/2024
6.1.103-nightly 98 2/17/2024
6.1.101-nightly 176 2/16/2024
6.1.100 298 2/14/2024
6.1.99-nightly 128 2/14/2024
6.1.98-nightly 133 2/13/2024
6.1.97-nightly 146 2/12/2024
6.1.94-nightly 150 2/7/2024
6.1.92-nightly 122 2/6/2024
6.1.79-nightly 91 1/31/2024
6.1.72-nightly 140 1/28/2024
6.1.71-nightly 107 1/28/2024
6.1.70-nightly 74 1/26/2024
6.1.69-nightly 127 1/26/2024
6.1.68-nightly 100 1/25/2024
6.1.67-nightly 102 1/23/2024
6.1.66-nightly 82 1/22/2024
6.1.63-nightly 87 1/22/2024
6.1.57-nightly 115 1/21/2024
6.1.50-nightly 66 1/19/2024
6.1.49-nightly 100 1/19/2024
6.1.45-nightly 99 1/15/2024
6.1.43-nightly 106 1/15/2024
6.1.41 203 1/12/2024
6.1.40 168 1/11/2024
6.1.37-nightly 112 1/11/2024
6.1.36-nightly 104 1/11/2024
6.1.35-nightly 151 1/11/2024
6.1.29-nightly 125 1/11/2024
6.1.28-nightly 126 1/11/2024
6.1.27-nightly 146 1/11/2024
6.1.21-nightly 147 1/10/2024
6.1.20-nightly 174 1/10/2024
6.1.14-nightly 180 1/10/2024
6.1.13-nightly 72 1/10/2024
6.1.12-nightly 116 1/10/2024
6.1.1 186 1/11/2024
6.0.1720 228 1/12/2024
6.0.1718 408 12/14/2023
6.0.1707 332 12/7/2023
6.0.1694 328 11/27/2023
6.0.1500 187 1/12/2024
6.0.0 5,342 11/15/2023
6.0.0-rc.16 113 11/1/2023
6.0.0-rc.15 91 11/1/2023
6.0.0-rc.14 14,796 10/27/2023
6.0.0-rc.13 64 10/23/2023
6.0.0-rc.12 122 10/15/2023
6.0.0-rc.11 147 9/12/2023
6.0.0-rc.10 2,158 8/25/2023
6.0.0-rc.9 115 8/25/2023
6.0.0-rc.8 137 8/11/2023
6.0.0-rc.7 4,791 7/18/2023
6.0.0-rc.5 358 7/16/2023
6.0.0-rc.4 150 7/10/2023
6.0.0-rc.3 100 6/7/2023
6.0.0-rc.2 101 5/30/2023
6.0.0-rc.1 86 5/28/2023
6.0.0-preview9 175 5/26/2023
6.0.0-preview8 152 5/23/2023
6.0.0-preview7 195 5/19/2023
6.0.0-preview6 221 5/5/2023
6.0.0-preview5 322 5/3/2023
6.0.0-preview4 239 4/30/2023
6.0.0-preview3 218 4/27/2023
6.0.0-preview2 299 4/25/2023
6.0.0-preview10 229 5/28/2023

For EF Core 8