{"id":22866846,"url":"https://github.com/insomnimus/cmdc","last_synced_at":"2026-05-07T11:33:42.122Z","repository":{"id":45811769,"uuid":"514704627","full_name":"insomnimus/cmdc","owner":"insomnimus","description":"Compile a command line into a Windows executable!","archived":false,"fork":false,"pushed_at":"2024-08-12T15:18:30.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-13T08:48:00.294Z","etag":null,"topics":["assembly","cli","compiler","rust","win32","windows"],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/insomnimus.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}},"created_at":"2022-07-16T23:22:03.000Z","updated_at":"2024-08-12T15:18:34.000Z","dependencies_parsed_at":"2022-08-31T20:40:36.429Z","dependency_job_id":"0b544980-99fa-4c99-b2b6-1bc801a668a8","html_url":"https://github.com/insomnimus/cmdc","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/insomnimus/cmdc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insomnimus%2Fcmdc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insomnimus%2Fcmdc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insomnimus%2Fcmdc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insomnimus%2Fcmdc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insomnimus","download_url":"https://codeload.github.com/insomnimus/cmdc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insomnimus%2Fcmdc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32735201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["assembly","cli","compiler","rust","win32","windows"],"created_at":"2024-12-13T12:17:41.309Z","updated_at":"2026-05-07T11:33:42.106Z","avatar_url":"https://github.com/insomnimus.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CMDC - Command Compiler\nThis program saves a command along with its arguments into a 32 or 64-bit PE executable (Windows only).\n\nIt receives the command and an output file, writes the serialized command into a pre-determined location in an executable template and saves the modified template into the output file.\n\nFor that, the executable template needs to be compiled first; for full control and minimal size, the template is written in assembly.\n\n## But this is what a shell script should do! Why did you write this?!\nNo particular reason, take it or leave it :^).\n\nThere is actually one use case that I know of, though: `cargo` style subcommand plugins sometimes need `.exe` extensions.\nSo instead of writing a small program that basically calls a shell script with an interpreter, you can use `cmdc` to do it for you.\n\n## Install\nGrab a pre-built binary from the [releases page](https://github.com/insomnimus/cmdc/releases) ([here's the latest release](https://github.com/insomnimus/cmdc/releases/latest)).\n\nOr build from source:\n\n## Building\nSince the templates are written in assembly and make use of macros provided by [flat-assembler](https://flatassembler.net), you must have the `fasm.exe` installed on your system.\nYou will also need a recent enough version of rust (tested with 1.73.0).\n\n1. Install flat-assembler from [here](https://flatassembler.net) or optionally from [scoop](https://github.com/ScoopInstaller/scoop).\n2. If flat-assembler's `INCLUDE` directory is not in your `$INCLUDE` env variable, put it there. Or optionally set the `FASM_INCLUDE` env variable to the directory.\n3. If `fasm.exe` is not in `$PATH`, set the `FASM` environment variable to the full path where `fasm.exe` is located; e.g `D:\\fasm\\fasm.exe`.\n4. Build like the usual: `cargo build --release`. The build script will take care of assembling the assembly files.\n\n## Usage\nProvide a command, an output file and optional arguments.\nYou can optionally specify a different arch than the one the program was compiled on with `--arch=x32|x64`.\n\n```powershell\n# cmd style ls\ncmdc -o dir.exe -- cmd.exe /c dir\n# Inspect the generated executable:\ncmdc -i dir.exe\n# prints: \"cmd.exe\" /c dir\n# ls using wsl\n# note that wsl.exe only works on 64 bit\ncmdc -a x64 -o ls.exe -- wsl.exe ls\n# Inspect the executable:\ncmdc --inspect ls.exe\n# prints: \"wsl.exe\" ls\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsomnimus%2Fcmdc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsomnimus%2Fcmdc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsomnimus%2Fcmdc/lists"}