ErikEJ.EFCorePowerTools.Cli 6.1.298-nightly

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
This is a prerelease version of ErikEJ.EFCorePowerTools.Cli.
There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global ErikEJ.EFCorePowerTools.Cli --version 6.1.298-nightly
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 6.1.298-nightly
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=ErikEJ.EFCorePowerTools.Cli&version=6.1.298-nightly&prerelease
nuke :add-package ErikEJ.EFCorePowerTools.Cli --version 6.1.298-nightly

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 net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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.299-nightly 48 6/25/2024
8.1.298-nightly 116 6/24/2024
8.1.267-nightly 111 6/15/2024
8.1.264-nightly 58 6/11/2024
8.1.262-nightly 58 6/11/2024
8.1.260-nightly 65 6/10/2024
8.1.254-nightly 60 6/7/2024
8.1.251-nightly 68 6/4/2024
8.1.250-nightly 76 6/3/2024
8.1.244-nightly 107 6/1/2024
8.1.240-nightly 79 5/28/2024
8.1.239-nightly 71 5/27/2024
8.1.238-nightly 65 5/27/2024
8.1.229-nightly 112 5/23/2024
8.1.228-nightly 99 5/23/2024
8.1.226-nightly 114 5/22/2024
8.1.220 2,383 5/20/2024
8.1.219-nightly 102 5/15/2024
8.1.218-nightly 70 5/15/2024
8.1.217-nightly 65 5/14/2024
8.1.215-nightly 69 5/13/2024
8.1.210-nightly 58 5/12/2024
8.1.209-nightly 58 5/12/2024
8.1.207-nightly 83 5/10/2024
8.1.206 885 5/9/2024
8.1.206-nightly 70 5/10/2024
8.1.204-nightly 111 5/8/2024
8.1.202-nightly 101 5/8/2024
8.1.200-nightly 110 5/2/2024
8.1.199-nightly 97 5/2/2024
8.1.198-nightly 130 5/1/2024
8.1.197-nightly 117 5/1/2024
8.1.195-nightly 175 4/30/2024
8.1.193-nightly 133 4/30/2024
8.1.192-nightly 122 4/30/2024
8.1.188-nightly 86 4/29/2024
8.1.186-nightly 90 4/29/2024
8.1.182-nightly 129 4/26/2024
8.1.180-nightly 129 4/26/2024
8.1.178-nightly 139 4/24/2024
8.1.170-nightly 243 4/12/2024
8.1.169-nightly 122 4/12/2024
8.1.161-nightly 266 4/5/2024
8.1.157-nightly 182 4/4/2024
8.1.151-nightly 225 3/29/2024
8.1.150-nightly 246 3/26/2024
8.1.149-nightly 164 3/24/2024
8.1.148 3,144 3/23/2024
8.1.147-nightly 176 3/19/2024
8.1.145-nightly 126 3/18/2024
8.1.137-nightly 186 3/14/2024
8.1.136-nightly 205 3/14/2024
8.1.131-nightly 176 3/13/2024
8.1.128-nightly 112 3/11/2024
8.1.126-nightly 213 3/8/2024
8.1.120-nightly 185 3/2/2024
8.1.119-nightly 132 2/29/2024
8.1.118-nightly 125 2/28/2024
8.1.115-nightly 148 2/26/2024
8.1.110-nightly 171 2/26/2024
8.1.105-nightly 174 2/18/2024
8.1.104-nightly 134 2/18/2024
8.1.103-nightly 122 2/17/2024
8.1.101-nightly 135 2/16/2024
8.1.100 2,458 2/14/2024
8.1.99-nightly 80 2/14/2024
8.1.98-nightly 188 2/13/2024
8.1.97-nightly 138 2/12/2024
8.1.94-nightly 212 2/7/2024
8.1.92-nightly 89 2/6/2024
8.1.79-nightly 107 1/31/2024
8.1.72-nightly 104 1/28/2024
8.1.71-nightly 135 1/28/2024
8.1.70-nightly 104 1/26/2024
8.1.69-nightly 104 1/26/2024
8.1.68-nightly 113 1/25/2024
8.1.67-nightly 121 1/23/2024
8.1.66-nightly 77 1/22/2024
8.1.63-nightly 96 1/22/2024
8.1.57-nightly 91 1/21/2024
8.1.50-nightly 127 1/19/2024
8.1.49-nightly 85 1/19/2024
8.1.45-nightly 94 1/15/2024
8.1.43-nightly 168 1/15/2024
8.1.41 1,549 1/12/2024
8.1.40 201 1/11/2024
8.1.37-nightly 131 1/11/2024
8.1.36-nightly 196 1/11/2024
8.1.35-nightly 138 1/11/2024
8.1.29-nightly 134 1/11/2024
8.1.28-nightly 135 1/11/2024
8.1.27-nightly 125 1/11/2024
8.1.21-nightly 150 1/10/2024
8.1.20-nightly 129 1/10/2024
8.1.14-nightly 115 1/10/2024
8.1.13-nightly 95 1/10/2024
8.1.12-nightly 127 1/10/2024
8.1.1 271 1/11/2024
8.0.1720 498 1/12/2024
8.0.1718 1,519 12/14/2023
8.0.1707 1,217 12/7/2023
8.0.1694 972 11/27/2023
8.0.1500 189 1/12/2024
8.0.0 1,739 11/15/2023
8.0.0-rc.16 165 11/1/2023
8.0.0-rc.15 120 11/1/2023
8.0.0-rc.14 115 10/27/2023
8.0.0-rc.13 123 10/23/2023
8.0.0-rc.12 177 10/15/2023
8.0.0-rc.11 258 9/12/2023
8.0.0-rc.10 296 8/25/2023
8.0.0-rc.9 149 8/25/2023
8.0.0-rc.8 262 8/11/2023
7.1.299-nightly 41 6/25/2024
7.1.298-nightly 116 6/24/2024
7.1.267-nightly 77 6/15/2024
7.1.264-nightly 47 6/11/2024
7.1.262-nightly 46 6/11/2024
7.1.260-nightly 54 6/10/2024
7.1.254-nightly 53 6/7/2024
7.1.251-nightly 60 6/4/2024
7.1.250-nightly 67 6/3/2024
7.1.244-nightly 94 6/1/2024
7.1.240-nightly 68 5/28/2024
7.1.239-nightly 60 5/27/2024
7.1.238-nightly 57 5/27/2024
7.1.229-nightly 91 5/23/2024
7.1.228-nightly 84 5/23/2024
7.1.226-nightly 104 5/22/2024
7.1.220 350 5/20/2024
7.1.219-nightly 86 5/15/2024
7.1.218-nightly 64 5/15/2024
7.1.217-nightly 56 5/14/2024
7.1.215-nightly 64 5/13/2024
7.1.210-nightly 55 5/12/2024
7.1.209-nightly 52 5/12/2024
7.1.207-nightly 61 5/10/2024
7.1.206 276 5/9/2024
7.1.206-nightly 68 5/10/2024
7.1.204-nightly 104 5/8/2024
7.1.202-nightly 101 5/8/2024
7.1.200-nightly 104 5/2/2024
7.1.199-nightly 106 5/2/2024
7.1.198-nightly 110 5/1/2024
7.1.197-nightly 114 5/1/2024
7.1.195-nightly 160 4/30/2024
7.1.193-nightly 125 4/30/2024
7.1.192-nightly 132 4/30/2024
7.1.188-nightly 87 4/29/2024
7.1.186-nightly 86 4/29/2024
7.1.182-nightly 144 4/26/2024
7.1.180-nightly 127 4/26/2024
7.1.178-nightly 131 4/24/2024
7.1.170-nightly 251 4/12/2024
7.1.169-nightly 196 4/12/2024
7.1.161-nightly 214 4/5/2024
7.1.157-nightly 155 4/4/2024
7.1.151-nightly 176 3/29/2024
7.1.150-nightly 225 3/26/2024
7.1.149-nightly 164 3/24/2024
7.1.148 417 3/23/2024
7.1.147-nightly 155 3/19/2024
7.1.145-nightly 174 3/18/2024
7.1.137-nightly 141 3/14/2024
7.1.136-nightly 179 3/14/2024
7.1.131-nightly 192 3/13/2024
7.1.128-nightly 149 3/11/2024
7.1.126-nightly 117 3/8/2024
7.1.120-nightly 172 3/2/2024
7.1.119-nightly 129 2/29/2024
7.1.118-nightly 180 2/28/2024
7.1.115-nightly 160 2/26/2024
7.1.110-nightly 201 2/26/2024
7.1.105-nightly 106 2/18/2024
7.1.104-nightly 149 2/18/2024
7.1.103-nightly 78 2/17/2024
7.1.101-nightly 91 2/16/2024
7.1.100 360 2/14/2024
7.1.99-nightly 107 2/14/2024
7.1.98-nightly 144 2/13/2024
7.1.97-nightly 146 2/12/2024
7.1.94-nightly 95 2/7/2024
7.1.92-nightly 97 2/6/2024
7.1.79-nightly 111 1/31/2024
7.1.72-nightly 132 1/28/2024
7.1.71-nightly 108 1/28/2024
7.1.70-nightly 99 1/26/2024
7.1.69-nightly 98 1/26/2024
7.1.68-nightly 98 1/25/2024
7.1.67-nightly 86 1/23/2024
7.1.66-nightly 80 1/22/2024
7.1.63-nightly 75 1/22/2024
7.1.57-nightly 97 1/21/2024
7.1.50-nightly 78 1/19/2024
7.1.49-nightly 105 1/19/2024
7.1.45-nightly 102 1/15/2024
7.1.43-nightly 105 1/15/2024
7.1.41 217 1/12/2024
7.1.40 159 1/11/2024
7.1.37-nightly 65 1/11/2024
7.1.36-nightly 104 1/11/2024
7.1.35-nightly 137 1/11/2024
7.1.29-nightly 118 1/11/2024
7.1.28-nightly 96 1/11/2024
7.1.27-nightly 115 1/11/2024
7.1.21-nightly 120 1/10/2024
7.1.20-nightly 112 1/10/2024
7.1.14-nightly 155 1/10/2024
7.1.13-nightly 128 1/10/2024
7.1.12-nightly 99 1/10/2024
7.1.1 229 1/11/2024
7.0.1720 277 1/12/2024
7.0.1718 497 12/14/2023
7.0.1707 396 12/7/2023
7.0.1694 393 11/27/2023
7.0.1500 175 1/12/2024
7.0.0 1,120 11/15/2023
7.0.0-rc.16 175 11/1/2023
7.0.0-rc.15 81 11/1/2023
7.0.0-rc.14 149 10/27/2023
7.0.0-rc.13 93 10/23/2023
7.0.0-rc.12 194 10/15/2023
7.0.0-rc.11 547 9/12/2023
7.0.0-rc.10 258 8/25/2023
7.0.0-rc.9 117 8/25/2023
7.0.0-rc.8 195 8/11/2023
7.0.0-rc.7 956 7/18/2023
7.0.0-rc.6 156 7/17/2023
7.0.0-rc.5 153 7/16/2023
7.0.0-rc.4 172 7/10/2023
7.0.0-rc.3 160 6/7/2023
7.0.0-rc.2 100 5/30/2023
7.0.0-rc.1 83 5/28/2023
7.0.0-preview9 326 5/26/2023
7.0.0-preview8 185 5/23/2023
7.0.0-preview7 226 5/19/2023
7.0.0-preview6 291 5/5/2023
7.0.0-preview5 318 5/4/2023
7.0.0-preview4 257 4/30/2023
7.0.0-preview3 346 4/27/2023
7.0.0-preview2 260 4/25/2023
7.0.0-preview10 182 5/28/2023
7.0.0-preview1 404 4/25/2023
7.0.0-preview.11 80 5/28/2023
6.1.299-nightly 48 6/25/2024
6.1.298-nightly 97 6/24/2024
6.1.267-nightly 87 6/15/2024
6.1.264-nightly 53 6/11/2024
6.1.262-nightly 47 6/11/2024
6.1.260-nightly 54 6/10/2024
6.1.254-nightly 54 6/7/2024
6.1.251-nightly 54 6/4/2024
6.1.250-nightly 70 6/3/2024
6.1.244-nightly 96 6/1/2024
6.1.240-nightly 54 5/28/2024
6.1.239-nightly 59 5/27/2024
6.1.238-nightly 57 5/27/2024
6.1.229-nightly 101 5/23/2024
6.1.228-nightly 84 5/23/2024
6.1.226-nightly 109 5/22/2024
6.1.220 288 5/20/2024
6.1.219-nightly 87 5/15/2024
6.1.218-nightly 67 5/15/2024
6.1.217-nightly 57 5/14/2024
6.1.215-nightly 59 5/13/2024
6.1.210-nightly 49 5/12/2024
6.1.209-nightly 52 5/12/2024
6.1.207-nightly 63 5/10/2024
6.1.206 106 5/9/2024
6.1.206-nightly 64 5/10/2024
6.1.204-nightly 104 5/8/2024
6.1.202-nightly 98 5/8/2024
6.1.200-nightly 116 5/2/2024
6.1.199-nightly 105 5/2/2024
6.1.198-nightly 117 5/1/2024
6.1.197-nightly 121 5/1/2024
6.1.195-nightly 151 4/30/2024
6.1.193-nightly 138 4/30/2024
6.1.192-nightly 122 4/30/2024
6.1.188-nightly 95 4/29/2024
6.1.186-nightly 89 4/29/2024
6.1.182-nightly 127 4/26/2024
6.1.180-nightly 135 4/26/2024
6.1.178-nightly 142 4/24/2024
6.1.170-nightly 148 4/12/2024
6.1.169-nightly 165 4/12/2024
6.1.161-nightly 177 4/5/2024
6.1.157-nightly 183 4/4/2024
6.1.151-nightly 195 3/29/2024
6.1.150-nightly 129 3/26/2024
6.1.149-nightly 180 3/24/2024
6.1.148 799 3/23/2024
6.1.147-nightly 173 3/19/2024
6.1.145-nightly 164 3/18/2024
6.1.137-nightly 178 3/14/2024
6.1.136-nightly 183 3/14/2024
6.1.131-nightly 80 3/13/2024
6.1.128-nightly 163 3/11/2024
6.1.126-nightly 181 3/8/2024
6.1.120-nightly 220 3/2/2024
6.1.119-nightly 184 2/29/2024
6.1.118-nightly 81 2/28/2024
6.1.115-nightly 174 2/26/2024
6.1.110-nightly 132 2/26/2024
6.1.105-nightly 183 2/18/2024
6.1.104-nightly 132 2/18/2024
6.1.103-nightly 101 2/17/2024
6.1.101-nightly 179 2/16/2024
6.1.100 310 2/14/2024
6.1.99-nightly 131 2/14/2024
6.1.98-nightly 136 2/13/2024
6.1.97-nightly 149 2/12/2024
6.1.94-nightly 153 2/7/2024
6.1.92-nightly 126 2/6/2024
6.1.79-nightly 96 1/31/2024
6.1.72-nightly 143 1/28/2024
6.1.71-nightly 110 1/28/2024
6.1.70-nightly 77 1/26/2024
6.1.69-nightly 130 1/26/2024
6.1.68-nightly 103 1/25/2024
6.1.67-nightly 105 1/23/2024
6.1.66-nightly 85 1/22/2024
6.1.63-nightly 91 1/22/2024
6.1.57-nightly 119 1/21/2024
6.1.50-nightly 69 1/19/2024
6.1.49-nightly 104 1/19/2024
6.1.45-nightly 101 1/15/2024
6.1.43-nightly 108 1/15/2024
6.1.41 215 1/12/2024
6.1.40 186 1/11/2024
6.1.37-nightly 114 1/11/2024
6.1.36-nightly 106 1/11/2024
6.1.35-nightly 154 1/11/2024
6.1.29-nightly 127 1/11/2024
6.1.28-nightly 128 1/11/2024
6.1.27-nightly 148 1/11/2024
6.1.21-nightly 150 1/10/2024
6.1.20-nightly 176 1/10/2024
6.1.14-nightly 182 1/10/2024
6.1.13-nightly 74 1/10/2024
6.1.12-nightly 125 1/10/2024
6.1.1 213 1/11/2024
6.0.1720 308 1/12/2024
6.0.1718 422 12/14/2023
6.0.1707 347 12/7/2023
6.0.1694 350 11/27/2023
6.0.1500 208 1/12/2024
6.0.0 8,175 11/15/2023
6.0.0-rc.16 116 11/1/2023
6.0.0-rc.15 92 11/1/2023
6.0.0-rc.14 16,394 10/27/2023
6.0.0-rc.13 65 10/23/2023
6.0.0-rc.12 123 10/15/2023
6.0.0-rc.11 149 9/12/2023
6.0.0-rc.10 2,160 8/25/2023
6.0.0-rc.9 116 8/25/2023
6.0.0-rc.8 138 8/11/2023
6.0.0-rc.7 4,793 7/18/2023
6.0.0-rc.5 360 7/16/2023
6.0.0-rc.4 151 7/10/2023
6.0.0-rc.3 102 6/7/2023
6.0.0-rc.2 103 5/30/2023
6.0.0-rc.1 95 5/28/2023
6.0.0-preview9 176 5/26/2023
6.0.0-preview8 153 5/23/2023
6.0.0-preview7 196 5/19/2023
6.0.0-preview6 222 5/5/2023
6.0.0-preview5 324 5/3/2023
6.0.0-preview4 241 4/30/2023
6.0.0-preview3 219 4/27/2023
6.0.0-preview2 301 4/25/2023
6.0.0-preview10 231 5/28/2023

For EF Core 6