{"id":31104713,"url":"https://github.com/genexuslabs/gxcli","last_synced_at":"2025-09-17T03:40:54.427Z","repository":{"id":40858603,"uuid":"258265880","full_name":"genexuslabs/gxcli","owner":"genexuslabs","description":"GeneXus command line tool","archived":false,"fork":false,"pushed_at":"2022-12-07T20:38:58.000Z","size":290,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-29T08:41:39.988Z","etag":null,"topics":["cli","command-line-tool","genexus","msbuild"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/genexuslabs.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}},"created_at":"2020-04-23T16:33:11.000Z","updated_at":"2025-04-17T17:15:18.000Z","dependencies_parsed_at":"2023-01-24T14:01:04.268Z","dependency_job_id":null,"html_url":"https://github.com/genexuslabs/gxcli","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/genexuslabs/gxcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genexuslabs%2Fgxcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genexuslabs%2Fgxcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genexuslabs%2Fgxcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genexuslabs%2Fgxcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/genexuslabs","download_url":"https://codeload.github.com/genexuslabs/gxcli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/genexuslabs%2Fgxcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275531136,"owners_count":25481325,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"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":["cli","command-line-tool","genexus","msbuild"],"created_at":"2025-09-17T03:40:51.891Z","updated_at":"2025-09-17T03:40:54.417Z","avatar_url":"https://github.com/genexuslabs.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GeneXus CLI\n[![](https://github.com/genexuslabs/gxcli/workflows/Build/badge.svg?branch=master)](https://github.com/genexuslabs/gxcli/actions?query=workflow%3ABuild+branch%3Amaster)\n```\n   ____               ___  __\n  / ___| ___ _ __   ___\\ \\/ /   _ ___\n | |  _ / _ \\ '_ \\ / _ \\\\  / | | / __|\n | |_| |  __/ | | |  __//  \\ |_| \\__ \\\n  \\____|\\___|_| |_|\\___/_/\\_\\__,_|___/\n\nWelcome to the cool new GeneXus CLI!\n```\n\nWe're excited to introduce *GeneXus CLI*, our next-generation command line tool for GeneXus.\n\n**Note:** GeneXus CLI currenty works only with [GeneXus Beta](http://genexus.com/beta). \n\n## Why a command line tool?\n\nWe believe there are times where you want to perform some tasks in batch. Like firing a `Rebuild All` or a big `Update` from GXserver.\n\nThis is for power users. Users that know how to move around in a command line interface, and actually prefer to do some heavy dutty tasks from there. \n\nGeneXus has plenty of support for MSBuild tasks, so you can pretty much do everything with MSBuild scripts. But sometimes you don't have the time (or will) to set up the scripts, remember the MSBuild syntax, dig into the documentation for parameters and so on.\n\nFYI: as you will see, this tool in built on top of the existing MSBuild tasks ecosystem.\n\n## Introducing GeneXus CLI\n\n*GeneXus CLI* is a small command line tool that allows you to run every batch task you can think of via the command line, without the need of firing up the whole IDE.\n\nIt is also based on MSBuild, so whatever this tool does, it can be done via MSBuild scripts. As a matter of fact, every module has an MSBuild script to support the exposed commands.\n\n\n## Usage\n\n```\ngx [command] [parameters]|help [global options]\n```\n\nLike any modern cli tool, *GeneXus CLI* contains commands (or verbs) that allows you to easily learn about the tool.\n\n### Commands\nCommands (or verbs) are all the tasks the tool can perform. You can learn more about the needed parameters for those commands by typing the `help` subcommand.\n```\ngx build help\n```\n\n### Parameters\nParameters are space-separated and the `=` (equals) sign is used to assign a value. Boolean values are not required to be assigned a `true` value. If the parameter is present with no value, `true` is assumed.\n```\ngx build kbpath=C:\\Models\\MyKB forceRebuild\n```\n\n### Global Options\nGlobal options are not specific to any command, it's a way of sending general properties to the engine, like its output verbosity.\n```\ngx build kbpath=C:\\Models\\MyKB failIfReorg verbosity=minimal\n```\n\n## Installation\nDownload the [latest release](https://github.com/genexuslabs/gxcli/releases/latest) and unzip the gxcli.zip file into any folder you wish.  \nMake sure you install the tool first by running `gx install \u003cGeneXus Path\u003e`. If you copy the gxcli in the same folder of a GeneXus installation, this installation will be used and there's no need to pass the `\u003cGenexus Path\u003e` argument.\n\nIf you run *GeneXus CLI* from PowerShell you can have auto-completion of commands and their parameters.  \nAfter running the `install` command, execute the [`Generate-AutocompleteScript.ps1`](./tools/Generate-AutocompleteScript.ps1) script located where the *GeneXus CLI* was copied, as follows:\n\n```powershell\n.\\Generate-AutocompleteScript.ps1\n```\n\nAfter executing the script you will have autocompletion support for commands and their parameters (only in Powershell).\n\n![](./res/Autocomplete.gif)\n\n## Build\nClone this project and open a PowerShell window in that folder. Run the following command to build the solution.\n\n```powershell\ndotnet build .\\gxcli.sln\n```\n\n*You can also open the `gxcli.sln` solution in Visual Studio 2019 and build it from there.*\n\nThe [deploy](./deploy.ps1) script receives a path argument and will copy the artifacts to that folder.\n```powershell\n.\\deploy.ps1 \u003cgxcli path\u003e\n```\n\nIf you don't set a path argument, a `bin` folder will be created under this repository and the files will be copied there.\n\n## GeneXus CLI Platform\nWant to create your own modules? Maybe you want to call your own extensions.  \nIn Visual Studio create a new `Class Library (.NET Framework 4.7.1)` project and add a reference to the `gxcli.common` project of this repo (it'll also be a NuGet package soon).\nThese are the needed steps to create a class that exposes commands (verbs).  \n\n1 - In you project's AssemblyInfo.cs file, add the `GXCliVerbProvider` attribute as follows:\n\n```c#\nusing gxcli.common;\n[assembly: GXCliVerbProvider]\n```\n\n2 - Add a .msbuild file to you project that will hold the targets GeneXus CLI will eventually call. This file must be named after your assembly and must have the extension .msbuild or .targets.\n\n3 - Create your Verb provider class, that must implement the `IGXCliVerbProvider` interface. Keep in mind this is what every property is for:\n\n- Name : The name of the command, it will be what the user type to fire your command.\n- Description: A brief description that helps the user understand what the commands does.\n- Target : The target this command will call in your script created in 2.\n- Parameters: List of parameters your commands need or accept. Make sure you use the `Required` property accordingly.\n- Examples: You can also add a few examples that will be shown to the users when they want to know more about your command.\n\nHere's an example of the actual `build` verb.\n```cs\npublic class BuildProvider : IGXCliVerbProvider\n{\n  public string Name =\u003e \"build\";\n\n  public string Description =\u003e \"Build All for the working environment\";\n\n  public string Target =\u003e \"Build\";\n\n  public List\u003cVerbParameter\u003e Parameters =\u003e new List\u003cVerbParameter\u003e(KBBasedVerbProvider.KBParameters)\n  {\n    new VerbParameter { Name = \"ForceRebuild\", Description = \"Force rebuild the objects\" },\n    new VerbParameter { Name = \"DoNotExecuteReorg\", Description = \"Do not execute reorg, just create it\" },\n    new VerbParameter { Name = \"FailIfReorg\", Description = \"Generate, but do not make a build if a reorg is needed\" },\n    new VerbParameter { Name = \"CompileMains\", Description = \"Compile all main objects, if false only compile the Developer Menu.\" },\n    new VerbParameter { Name = \"DetailedNavigation\", Description = \"Show detailed navigation\" },\n  };\n\n  public List\u003cExample\u003e Examples =\u003e new List\u003cExample\u003e\n  {\n    new Example{ Command = \"gx build kbpath=C:\\\\Models\\\\MyKB forceRebuild\", Description = \"Rebuild All on your Knowledge Base\" }, \n    new Example{ Command = \"gx build kbpath=C:\\\\Models\\\\MyKB failIfReorg\", Description = \"Build All on your Knowledge Base, but fail if a database reorganization is found\" }\n  };\n}\n```\nso when you run `gx build help` this is what you'll see  \n```\nUsage: gx build [parameters]|help [global options]\n\n    build                     : Build All for the working environment\n\nParameters\n    KBPath                    : Path to the Knowledge Base directory. [Required]\n    Version                   : Name of the Knowledge Base version to use.\n    Environment               : Name of the Environment to use.\n    ForceRebuild              : Force rebuild the objects\n    DoNotExecuteReorg         : Do not execute reorg, just create it\n    FailIfReorg               : Generate, but do not make a build if a reorg is needed\n    CompileMains              : Compile all main objects, if false only compile the Developer Menu.\n    DetailedNavigation        : Show detailed navigation\n\nExamples\n    Rebuild All on your Knowledge Base\n        gx build kbpath=C:\\Models\\MyKB forceRebuild\n\n    Build All on your Knowledge Base, but fail if a database reorganization is found\n        gx build kbpath=C:\\Models\\MyKB failIfReorg\n```\n\n4 - Compile your module and that's it. In order to try it copy it into the `\\gxclimodules` folder with its `.msbuild` or `.targets` file. Run `gx install` so the *GeneXus CLI* can pick it up and have it available for future use.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenexuslabs%2Fgxcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgenexuslabs%2Fgxcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgenexuslabs%2Fgxcli/lists"}