Skip to content

Commit c9667de

Browse files
committed
Update command structure
1 parent d52cea0 commit c9667de

16 files changed

Lines changed: 218 additions & 126 deletions

README.md

Lines changed: 62 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,129 +1,90 @@
11
---
2-
# TALXIS CLI (txc)
2+
# TALXIS CLI (`txc`)
33

4-
> [!WARNING]
5-
> This project is currently in a development phase and not ready for production use.
6-
> While we actively use these tools internally, our aim is to share and collaborate with the broader community to refine and enhance their capabilities.
7-
> We are in the process of gradually open-sourcing the code, removing internal dependencies to make it universally applicable.
8-
> At this stage, it serves as a source of inspiration and a basis for collaboration.
9-
> We welcome feedback, suggestions, and contributions through pull requests.
4+
> **WARNING**
5+
> This project is in active development and not yet production-ready. We welcome feedback, suggestions, and contributions via pull requests.
106

11-
If wish to use this project for your team, please contact us at hello@networg.com for a personalized onboarding experience and customization to meet your specific needs.
7+
TALXIS CLI (`txc`) is a modular, extensible .NET global tool for automating development, data, and solution management tasks—especially for Power Platform and enterprise projects. It is designed to help developers scaffold, transform and manage code and data in local repositories.
128

13-
## Goal
9+
**MCP Server Support:**
1410

11+
This CLI can also be consumed as a Model Context Protocol (MCP) server by installing the related .NET tool `txc-mcp`. This enables integration with tools and workflows that support the MCP standard.
1512

16-
The goal of the TALXIS CLI (`txc`) is to provide a modular, extensible .NET global tool that helps Power Platform developers automate tasks across their local code repositories and data manipulation.
13+
- For setup and usage instructions, see [`src/TALXIS.CLI.MCP/README.md`](src/TALXIS.CLI.MCP/README.md) in this repository.
14+
15+
---
1716

1817
## Installation
1918

20-
You can install the TALXIS CLI as a .NET global tool using the following command:
19+
Install as a .NET global tool:
2120

2221
```sh
2322
dotnet tool install --global TALXIS.CLI
2423
```
2524

26-
After installation, you can run the CLI using the `txc` command from any terminal.
27-
28-
To update the TALXIS CLI to the latest version, use the following command:
25+
Update to the latest version:
2926

3027
```sh
3128
dotnet tool update --global TALXIS.CLI
3229
```
3330

34-
## Command Groups
31+
After installation, use the CLI via the `txc` command in any terminal.
3532

36-
The CLI is organized into modular command groups. Each group provides a set of related commands.
33+
---
3734

38-
### Data Commands (`txc data`)
35+
## Command Groups & Usage
3936

40-
Data-related utilities for ETL, Power Query, and automation scenarios.
37+
The CLI is organized into modular command groups. Each group provides a set of related commands.
4138

42-
#### `convert` command
39+
### Data Commands (`txc data`)
40+
Data utilities for modeling, migration, ETL, and integration scenarios.
4341

44-
Converts tables from an Excel `.xlsx` file into a structured CMT format. Each table in the spreadsheet is exported as an `<entity>` in the XML, with columns as fields and rows as records.
42+
- **`txc data transform`**: Data-related utilities for ETL, Power Query, and migration.
43+
- **`txc data transform server start [--port <port>]`**: Starts a local HTTP server for ETL/data transformation tasks. Default port: 50505.
44+
- **Endpoints:**
45+
- `POST /ComputePrimaryKey` — Deterministically computes a GUID primary key from entity and alternate keys.
4546

46-
**Usage:**
47+
- **`txc data package`**: Configuration migration tool (CMT) for moving data between environments.
48+
- **`txc data package convert --input <file.xlsx> --output <file.xml>`**: Converts tables from an Excel `.xlsx` file to a CMT data package XML.
4749

48-
```sh
49-
txc data convert --input <export.xlsx> --output <data.xml>
50-
```
50+
- **`txc data model`**: Data modeling utilities (see CLI help for available features).
5151

52-
#### `transform-server` command
52+
### Workspace Commands (`txc workspace`)
53+
Develop and manage solution components in your local workspace.
5354

54-
Starts a simple local HTTP server exposing endpoints for ETL/data transformation tasks. Useful for integrating with Power Query or other local ETL tools.
55+
- **`txc workspace component`**: Manage solution components.
56+
- **`txc workspace component list`**: List available component templates.
57+
- **`txc workspace component create <ShortName> [--output <path>] [--param key=value ...]`**: Scaffold a component from a template, passing parameters as needed.
58+
- **`txc workspace component explain <Name>`**: Show details about a component template.
59+
- **`txc workspace component parameter list <ShortName>`**: List parameters required for a specific component template.
5560

56-
**Usage:**
61+
### Docs Commands (`txc docs`)
62+
Knowledge base and documentation for TALXIS CLI and its usage.
5763

58-
```sh
59-
txc data transform-server [--port <port>]
60-
```
61-
62-
- `--port` (optional): Port to run the server on. Defaults to `50505` if not specified.
64+
---
6365

64-
**Example:**
66+
## Example Usage
6567

6668
```sh
67-
txc data transform-server --port 50505
68-
```
69+
# Start the data transformation server on default port
70+
$ txc data transform server start
6971

72+
# Convert Excel to CMT XML
73+
$ txc data package convert --input export.xlsx --output data.xml
7074

71-
**Endpoints:**
75+
# List available workspace components
76+
$ txc workspace component list
7277

73-
- `POST /ComputePrimaryKey` — Accepts a JSON body with the following structure (case-insensitive):
78+
# Scaffold a new component
79+
$ txc workspace component create mycomponent --output ./src --param Name=MyComponent --param Type=Custom
7480

75-
```json
76-
{
77-
"entity": "talxis_salesorder",
78-
"alternateKeys": {
79-
"talxis_customernumber": 1234,
80-
"talxis_sapnumber": "SO34344"
81-
}
82-
}
81+
# List parameters for a component template
82+
$ txc workspace component parameter list mycomponent
8383
```
8484

85-
**About Alternate Keys:**
86-
87-
Alternate keys are a set of attributes (fields) on a record that, together, uniquely identify that record and never change for its lifetime. For the ComputePrimaryKey endpoint, alternate keys are used to calculate a deterministic primary key (GUID) for each record. This ensures that:
88-
89-
- The same record will always get the same primary key, even if the migration is run multiple times.
90-
- Records can be upserted (inserted or updated) reliably, because their identity is stable and based on business data, not on system-generated IDs.
91-
- In Microsoft Dataverse, the primary key must be a GUID, so we use alternate keys to generate a GUID that is unique and repeatable for each record.
92-
93-
This approach is especially useful for data migrations, deduplication and integration with external systems.
94-
95-
The `alternateKeys` object supports any number of key-value pairs, and values can be of any JSON type (string, number, etc). These keys should be attributes that never change for a record and together uniquely identify it. The endpoint returns a deterministic GUID as `{ "primaryKey": "..." }`. The `entity` parameter is used as a prefix to avoid collisions between entities.
96-
97-
- `POST /ComputePrimaryKey` — Accepts a JSON body with the following structure (case-insensitive):
98-
99-
```json
100-
{
101-
"entity": "talxis_salesorder",
102-
"alternateKeys": {
103-
"talxis_customernumber": 1234,
104-
"talxis_sapnumber": "SO34344"
105-
}
106-
}
107-
```
108-
109-
The `alternateKeys` object supports any number of key-value pairs, and values can be of any JSON type (string, number, etc). The endpoint returns a deterministic GUID as `{ "primaryKey": "..." }`. The `entity` parameter is used as a prefix to avoid collisions between entities.
110-
111-
**Sample request:**
112-
113-
```sh
114-
curl -X POST http://localhost:50505/ComputePrimaryKey \
115-
-H "Content-Type: application/json" \
116-
-d '{"entity":"talxis_salesorder","alternateKeys":{"talxis_customernumber":1234,"talxis_sapnumber":"SO34344"}}'
117-
```
118-
119-
120-
121-
## Collaboration
122-
We are happy to collaborate with developers and contributors interested in enhancing Power Platform development processes. If you have feedback, suggestions, or would like to contribute, please feel free to submit issues or pull requests.
123-
124-
### Local building and debugging
85+
---
12586

126-
To build and debug the CLI locally:
87+
## Local Development & Debugging
12788

12889
1. Clone the repository and restore dependencies:
12990
```sh
@@ -137,10 +98,21 @@ To build and debug the CLI locally:
13798
```
13899
3. Run the CLI directly (for example, to test the data transform server):
139100
```sh
140-
dotnet run --project src/TALXIS.CLI -- data transform-server
101+
dotnet run --project src/TALXIS.CLI -- data transform server start
141102
```
142-
4. You can also debug using Visual Studio or VS Code by opening the solution and setting breakpoints as needed.
103+
4. Debug using Visual Studio or VS Code as needed.
104+
105+
---
106+
107+
## Versioning & Release
108+
109+
- Versioning is managed in `Directory.Build.props` (Microsoft-style versioning).
110+
- Releases are published to NuGet.org via GitHub Actions.
111+
112+
---
113+
114+
## Collaboration
143115

144-
### Releasing a new version
116+
We welcome collaboration! For feedback, suggestions, or contributions, please submit issues or pull requests.
145117

146-
This project uses explicit Microsoft-style versioning (e.g., 1.0.0.0) set in the `Directory.Build.props` file. A GitHub Actions workflow publishes new releases to NuGet.org.
118+
For onboarding or customization, contact us at hello@networg.com.

TALXIS.CLI.sln

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TALXIS.CLI", "src\TALXIS.CL
1313
EndProject
1414
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TALXIS.CLI.MCP", "src\TALXIS.CLI.MCP\TALXIS.CLI.MCP.csproj", "{DFE5EC2E-21E2-42D6-B9C6-3111CE00FD0B}"
1515
EndProject
16+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TALXIS.CLI.Docs", "src\TALXIS.CLI.Docs\TALXIS.CLI.Docs.csproj", "{0914E284-15E7-4215-B72F-7195F0EB8EEA}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -71,6 +73,18 @@ Global
7173
{DFE5EC2E-21E2-42D6-B9C6-3111CE00FD0B}.Release|x64.Build.0 = Release|Any CPU
7274
{DFE5EC2E-21E2-42D6-B9C6-3111CE00FD0B}.Release|x86.ActiveCfg = Release|Any CPU
7375
{DFE5EC2E-21E2-42D6-B9C6-3111CE00FD0B}.Release|x86.Build.0 = Release|Any CPU
76+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
77+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
78+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|x64.ActiveCfg = Debug|Any CPU
79+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|x64.Build.0 = Debug|Any CPU
80+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|x86.ActiveCfg = Debug|Any CPU
81+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Debug|x86.Build.0 = Debug|Any CPU
82+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
83+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|Any CPU.Build.0 = Release|Any CPU
84+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|x64.ActiveCfg = Release|Any CPU
85+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|x64.Build.0 = Release|Any CPU
86+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|x86.ActiveCfg = Release|Any CPU
87+
{0914E284-15E7-4215-B72F-7195F0EB8EEA}.Release|x86.Build.0 = Release|Any CPU
7488
EndGlobalSection
7589
GlobalSection(SolutionProperties) = preSolution
7690
HideSolutionNode = FALSE
@@ -80,6 +94,7 @@ Global
8094
{A1B2C3D4-E5F6-7890-1234-567890ABCDEF} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
8195
{047E218E-A6A2-1C66-58E1-AFEF0AD34E7F} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
8296
{DFE5EC2E-21E2-42D6-B9C6-3111CE00FD0B} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
97+
{0914E284-15E7-4215-B72F-7195F0EB8EEA} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
8398
EndGlobalSection
8499
GlobalSection(ExtensibilityGlobals) = postSolution
85100
SolutionGuid = {53733BD6-A32A-41B7-9472-E377AF68151F}

src/Directory.Build.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<Project>
22
<PropertyGroup>
33
<!-- Shared versioning and general metadata for all projects -->
4-
<Version>1.0.3.0</Version>
5-
<AssemblyVersion>1.0.3.0</AssemblyVersion>
6-
<FileVersion>1.0.3.0</FileVersion>
7-
<PackageVersion>1.0.3.0</PackageVersion>
4+
<Version>1.0.4.0</Version>
5+
<AssemblyVersion>1.0.4.0</AssemblyVersion>
6+
<FileVersion>1.0.4.0</FileVersion>
7+
<PackageVersion>1.0.4.0</PackageVersion>
88
<Company>TALXIS</Company>
99
<RepositoryUrl>https://github.com/TALXIS/tools-cli</RepositoryUrl>
1010
<RepositoryType>git</RepositoryType>

src/TALXIS.CLI.Data/DataCliCommand.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
namespace TALXIS.CLI.Data;
44

55
[CliCommand(
6-
Description = "Data-related utilities for ETL, Power Query and migration scenarios",
7-
Children = new[] { typeof(TransformServerCliCommand), typeof(ConvertDataCliCommand) }
6+
Description = "Data utilities for modeling, demostration, migration and integration",
7+
Children = new[] { typeof(TransformCliCommand), typeof(DataPackageCliCommand), typeof(DataModelCliCommand) }
88
)]
99
public class DataCliCommand
1010
{
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using DotMake.CommandLine;
2+
3+
namespace TALXIS.CLI.Data;
4+
5+
[CliCommand(
6+
Name = "model",
7+
Description = "Data modeling utilities"
8+
)]
9+
public class DataModelCliCommand
10+
{
11+
public void Run(CliContext context)
12+
{
13+
context.ShowHelp();
14+
}
15+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using DotMake.CommandLine;
2+
3+
namespace TALXIS.CLI.Data;
4+
5+
[CliCommand(
6+
Name = "package",
7+
Description = "Configuration migration tool (CMT) for moving data between different environments",
8+
Children = new[] { typeof(DataPackageConvertCliCommand) }
9+
)]
10+
public class DataPackageCliCommand
11+
{
12+
public void Run(CliContext context)
13+
{
14+
context.ShowHelp();
15+
}
16+
}

src/TALXIS.CLI.Data/ConvertDataCliCommand.cs renamed to src/TALXIS.CLI.Data/DataPackageConvertCliCommand.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,20 @@ namespace TALXIS.CLI.Data;
44

55
[CliCommand(
66
Name = "convert",
7-
Description = "Convert tables from an XLSX file to XML."
7+
Description = "Convert tables from an XLSX file to CMT data package XML"
88
)]
9-
public class ConvertDataCliCommand
9+
public class DataPackageConvertCliCommand
1010
{
1111
[CliOption(
1212
Name = "--input",
13-
Description = "Path to the input XLSX file.",
13+
Description = "Path to the input XLSX file",
1414
Required = true
1515
)]
1616
public string? InputPath { get; set; }
1717

1818
[CliOption(
1919
Name = "--output",
20-
Description = "Path to the output XML file.",
20+
Description = "Path to the output XML file",
2121
Required = true
2222
)]
2323
public string? OutputPath { get; set; }
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
using DotMake.CommandLine;
2+
3+
namespace TALXIS.CLI.Data;
4+
5+
[CliCommand(
6+
Description = "Data-related utilities for ETL, Power Query and migration scenarios"
7+
)]
8+
public class TransformCliCommand
9+
{
10+
public void Run(CliContext context)
11+
{
12+
context.ShowHelp();
13+
}
14+
[CliCommand(
15+
Description = "HTTP server for ETL and data transformation tasks",
16+
Children = new[] { typeof(TransformServerStartCliCommand) },
17+
Name = "server")]
18+
public class TransformServerCliCommand
19+
{
20+
public void Run(CliContext context)
21+
{
22+
context.ShowHelp();
23+
}
24+
}
25+
}

src/TALXIS.CLI.Data/TransformServerCliCommand.cs renamed to src/TALXIS.CLI.Data/TransformServerStartCliCommand.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@
33
namespace TALXIS.CLI.Data;
44

55
[CliCommand(
6+
Name = "start",
67
Description = "Starts a local HTTP server exposing endpoints for ETL/data transformation tasks. Useful for integrating with Power Query or other local ETL tools. " +
78
"\n\nAvailable endpoints:" +
89
"\n POST /ComputePrimaryKey — Accepts a JSON body with 'entity' and 'alternateKeys' to return a deterministic GUID primary key. " +
910
"\n The 'alternateKeys' are a set of attributes that together uniquely identify a record and never change for its lifetime. "
1011
)]
11-
public class TransformServerCliCommand
12+
public class TransformServerStartCliCommand
1213
{
1314
[CliOption(Description = "Optional. Port to run the server on (default: 50505)")]
1415
public int Port { get; set; } = 50505;
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
using DotMake.CommandLine;
2+
3+
namespace TALXIS.CLI.Docs;
4+
5+
[CliCommand(
6+
Description = "Knowledge base for TALXIS CLI and building software with it"
7+
)]
8+
public class DocsCliCommand
9+
{
10+
public void Run(CliContext context)
11+
{
12+
context.ShowHelp();
13+
}
14+
}

0 commit comments

Comments
 (0)