{"id":37038728,"url":"https://github.com/mberrishdev/dct","last_synced_at":"2026-01-14T04:36:14.142Z","repository":{"id":304991182,"uuid":"1021623275","full_name":"mberrishdev/dct","owner":"mberrishdev","description":"A .NET global CLI tool to rapidly generate CQRS and Clean Architecture components such as commands, queries, handlers, classes, and interfaces. ","archived":false,"fork":false,"pushed_at":"2025-07-22T12:36:51.000Z","size":15,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-25T10:41:47.980Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/dct","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mberrishdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T17:20:47.000Z","updated_at":"2025-08-22T19:15:40.000Z","dependencies_parsed_at":"2025-07-17T21:01:59.615Z","dependency_job_id":"fd2aee7b-18b5-44f3-be30-4b7da9866773","html_url":"https://github.com/mberrishdev/dct","commit_stats":null,"previous_names":["mberrishdev/dct"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mberrishdev/dct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberrishdev%2Fdct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberrishdev%2Fdct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberrishdev%2Fdct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberrishdev%2Fdct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mberrishdev","download_url":"https://codeload.github.com/mberrishdev/dct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mberrishdev%2Fdct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T04:36:13.555Z","updated_at":"2026-01-14T04:36:14.135Z","avatar_url":"https://github.com/mberrishdev.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dct (Dotnet CLI Tool)\n\n[![NuGet Version](https://img.shields.io/nuget/v/dct.svg?logo=nuget)](https://www.nuget.org/packages/dct)\n\nA .NET global CLI tool to rapidly generate CQRS and Clean Architecture components such as commands, queries, handlers, classes, and interfaces. Streamline your development workflow and enforce best practices with customizable templates and configuration.\n\n## Features\n- Generate CQRS artifacts: commands, queries, handlers\n- Create classes and interfaces with a single command\n- Initialize default config and templates\n- Fully customizable via templates and configuration\n- Fast, scriptable, and easy to use\n\n## Installation\nAfter publishing to NuGet, install globally with:\n\n```sh\ndotnet tool install -g dct\n```\n\nOr see the latest version on [NuGet.org](https://www.nuget.org/packages/dct).\n\n## Getting Started\n\n**Before using dct, you must initialize and configure it in your project:**\n\n```sh\ndct init\n```\n\nThis command creates a `.dct` folder in your project root, containing all templates and a `.dct-config` file. All code generation is based on these templates and your configuration. You can customize the templates and `.dct/.dct-config` to fit your project's needs. With proper configuration, dct can generate any artifact or file structure you require.\n\n## Usage\n\n### Show version\n```sh\ndct --version\n```\n\n### Initialize configuration and templates (required before first use)\n```sh\ndct init\n```\n\n### Generate an artifact (command, query, handler, class, interface, or any custom template)\n```sh\ndct create \u003cartifact\u003e \u003cpath\u003e\n```\n- `\u003cartifact\u003e`: Type of artifact to generate (e.g., `command`, `query`, `handler`, `class`, `interface`, or any custom template name)\n- `\u003cpath\u003e`: Target path or name for the generated file(s)\n\n#### Examples\n| Command | Description |\n|---------|-------------|\n| `dct --version` | Show the installed dct version |\n| `dct init` | Initialize config and templates (must be run first) |\n| `dct create command User/CreateUser` | Generate a command in `User/CreateUser` |\n| `dct create handler User/CreateUserHandler` | Generate a handler |\n| `dct create query User/GetUser` | Generate a query |\n| `dct create class Models/User` | Generate a class |\n| `dct create interface Services/IUserService` | Generate an interface |\n\n## Customization\n\n### Configuration\nCustomize generation by editing the `.dct/.dct-config` file in your project root. Example:\n\n```json\n{\n  \"templatePaths\": {\n    \"command\": \"./dct-templates/command.scriban\",\n    \"query\": \"./dct-templates/query.scriban\",\n    \"handler\": \"./dct-templates/handler.scriban\"\n  }\n}\n```\n\n### Templates\nYou can override default templates or add your own by placing them in the `.dct/Templates/` directory. Supported templates include:\n- `command.scriban`\n- `handler.scriban`\n- `query.scriban`\n- Any custom template you define\n\nEdit these files to match your coding standards and patterns. The tool will use your configuration and templates to generate code exactly as you need.\n\n## Development\n\n### Dependencies\n- [Spectre.Console.Cli](https://www.nuget.org/packages/Spectre.Console.Cli)\n- [Scriban](https://www.nuget.org/packages/Scriban)\n\n## Contributing\n\nContributions are welcome! To contribute:\n\n1. Fork this repository and create your branch from `master`.\n2. Make your changes and add tests if applicable.\n3. Ensure all tests pass (`dotnet test`).\n4. Submit a pull request describing your changes.\n\nFor feature requests, bug reports, or questions, please open an issue or visit the [NuGet package page](https://www.nuget.org/packages/dct).\n\n## License\n\nMIT License\n\n---\n\n© 2024 Mikheil Berishvili. See [LICENSE](LICENSE) for details. ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberrishdev%2Fdct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmberrishdev%2Fdct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmberrishdev%2Fdct/lists"}