-
Couldn't load subscription status.
- Fork 14
Harmony Core CLI Tool

The Harmony Core CLI tool is a utility for managing, extending, and regenerating Harmony Core solutions. It is a replacement for regen.bat and includes a graphical interface that provides click-driven access to common Harmony Core tasks, such as:
- Configuring code generation options
- Regenerating Harmony Core components
- Managing OData settings and authentication
- Adding Traditional Bridge projects
The CLI tool runs on Windows where .NET 8 is available.
- Windows 11 or higher
-
.NET 8 SDK. Verify by running:
dotnet --version - A Harmony Core solution. The CLI tool can be run only in the solution directory for a Harmony Core solution.
To see if the CLI tool is installed, enter the following command at a terminal prompt:
dotnet tool list -g
To install the CLI tool, enter:
dotnet tool install -g Harmony.Core.CliTool
To update an existing installation, enter:
dotnet tool update -g Harmony.Core.CliTool
Open a terminal and navigate to a directory containing a Harmony Core solution file (.sln). Then enter:
harmonycore gui
After a brief “Loading Solution” message, the Harmony Core CLI tool GUI opens with a menu and five tabs: Solution, OData, Structures, Traditional Bridge, and Interfaces.
The CLI tool GUI has the following menus:
-
File — Save the current customization file, import regen.bat settings, or validate configuration scripts.
-
Search — Search for settings on the current screen.
-
CodeGen — Regenerate code for the current solution or synchronize files with the specified options.
-
Features — Add Traditional Bridge projects, Synergy Method Catalogs (SMCs), or unit tests.
The CLI tool GUI has the following tabbed screens:
-
Solution — Solution-level settings such as folder locations and namespaces.
-
OData — Authentication (OAuth), API, and service configuration.
-
Structures — Repository structures and related settings.
-
Traditional Bridge — Traditional Bridge settings, SMC configuration, and unit test options.
-
Interfaces — Interface definitions and related settings for Traditional Bridge.
Using the CLI tool, you can:
-
Enable OData support and generate related code (models, controllers, service files). See Enabling OData Support for more information.
-
Generate and manage sample data. See Generating Harmony Core Sample Data for more information.
-
Add OData endpoints with query and relation expansion support. See Entity Collection Endpoints, Single Entity Endpoints, OData Query Support, Alternate Key Endpoints, and Expanding Relations.
-
Generate Postman tests. See Generating and Using Postman Tests.
-
Add CRUD endpoint support (Create, Upsert, Patch, Delete). See Adding a Primary Key Factory, Adding Create Endpoints, Adding Upsert Endpoints, Adding Patch Endpoints, and Adding Delete Endpoints.
-
Implement authentication. See Tutorial 3: Authentication via Custom Code.
-
Add a Traditional Bridge project. See Tutorial 4: Implementing Traditional Bridge.
When you select an option that results in a new file being generated in the Harmony Core solution, it will not be automatically added to your Visual Studio project. You must manually add it to the project:
-
In Visual Studio, right-click the project that the new file was added for.
-
Select Add > Existing Item.
-
Browse to the new files and add it.
For an example, see Adding the Code to the Visual Studio Projects.
-
Tutorial 2: Building a Service from Scratch
- Creating a Basic Solution
- Enabling OData Support
- Configuring Self Hosting
- Entity Collection Endpoints
- API Documentation
- Single Entity Endpoints
- OData Query Support
- Alternate Key Endpoints
- Expanding Relations
- Postman Tests
- Supporting CRUD Operations
- Adding a Primary Key Factory
- Adding Create Endpoints
- Adding Upsert Endpoints
- Adding Patch Endpoints
- Adding Delete Endpoints
-
Harmony Core Code Generator
-
OData Aware Tools
-
Advanced Topics
- CLI Tool Customization
- Adapters
- API Versioning
- Authentication
- Authorization
- Collection Counts
- Customization File
- Custom Field Types
- Custom File Specs
- Custom Properties
- Customizing Generated Code
- Deploying to Linux
- Dynamic Call Protocol
- Environment Variables
- Field Security
- File I/O
- Improving AppSettings Processing
- Logging
- Optimistic Concurrency
- Multi-Tenancy
- Publishing in IIS
- Repeatable Unit Tests
- Stored Procedure Routing
- Suppressing OData Metadata
- Traditional Bridge
- Unit Testing
- EF Core Optimization
- Updating a Harmony Core Solution
- Updating to 3.1.90
- Creating a new Release
-
Background Information