CoreIdent ships a .NET tool package that provides a dotnet coreident command.
dotnet tool install -g CoreIdent.Clidotnet coreident --helpScaffolds a minimal appsettings.json with a CoreIdent section and writes a development-only symmetric signing key. It also updates your target .csproj with CoreIdent package references.
dotnet coreident init --project /path/to/MyApp.csprojOptions:
--project <path>- Path to the
.csprojto modify. - If omitted, the current directory must contain exactly one
.csproj.
- Path to the
--force- Overwrite
appsettings.jsonif it already exists.
- Overwrite
Generates an RSA or ECDSA key pair in PEM format.
dotnet coreident keys generate rsadotnet coreident keys generate ecdsaOptions:
--out <path>- If omitted, writes PEM to stdout.
- If a directory, writes
<dir>/<rsa|ecdsa>.private.pemand<dir>/<rsa|ecdsa>.public.pem. - If a file path, writes private key to
<path>and public key to<path>with.public.pem.
--size <bits>(RSA only)- Default:
2048.
- Default:
Interactive client registration helper. Generates:
client_id- (confidential only)
client_secret - A C# snippet you can paste into your seeding/registration code.
dotnet coreident client addNon-interactive options:
--name <clientName>--type <public|confidential>--client-id <clientId>--redirect-uri <uri>--scopes "openid profile offline_access"
Notes:
- This command outputs a snippet; it does not currently persist the client to a store.
Applies EF Core schema creation for CoreIdentDbContext. Supports multiple database providers.
# SQLite (default)
dotnet coreident migrate --connection "Data Source=coreident.db"
# SQL Server
dotnet coreident migrate --provider sqlserver --connection "Server=localhost;Database=CoreIdent;Trusted_Connection=True;"
# PostgreSQL
dotnet coreident migrate --provider postgres --connection "Host=localhost;Database=coreident;Username=postgres;Password=secret"Behavior:
- Attempts to apply EF migrations if present.
- If no migrations exist, it falls back to creating the schema directly.
Options:
--provider <sqlite|sqlserver|postgres>(or-p)- Database provider to use. Default:
sqlite. - Aliases:
mssqlfor SQL Server,postgresqlornpgsqlfor PostgreSQL.
- Database provider to use. Default:
--connection <connectionString>(or-c)- Connection string for the target database.