{"id":20151936,"url":"https://github.com/scottames/cmder","last_synced_at":"2025-08-22T10:21:13.599Z","repository":{"id":45363206,"uuid":"411129677","full_name":"scottames/cmder","owner":"scottames","description":"Cmder implements builder functionality wrapping os/exec for easily constructing shell commands.","archived":false,"fork":false,"pushed_at":"2025-04-06T01:35:30.000Z","size":47,"stargazers_count":1,"open_issues_count":4,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T02:27:51.076Z","etag":null,"topics":["go","go-scripts","golang","magefile"],"latest_commit_sha":null,"homepage":"","language":"Go","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/scottames.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","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":"2021-09-28T03:54:14.000Z","updated_at":"2024-04-05T10:59:39.000Z","dependencies_parsed_at":"2024-02-07T20:29:27.027Z","dependency_job_id":"1c9b142a-13a4-4ffb-a3f6-ebdeaa4bf1e0","html_url":"https://github.com/scottames/cmder","commit_stats":{"total_commits":21,"total_committers":4,"mean_commits":5.25,"dds":0.5238095238095238,"last_synced_commit":"e72eaa2760d5b593d534cefe1dd9fd9c5a306af6"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottames%2Fcmder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottames%2Fcmder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottames%2Fcmder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottames%2Fcmder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottames","download_url":"https://codeload.github.com/scottames/cmder/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111957,"owners_count":21049576,"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","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":["go","go-scripts","golang","magefile"],"created_at":"2024-11-13T23:08:00.671Z","updated_at":"2025-04-09T20:51:18.856Z","avatar_url":"https://github.com/scottames.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cmder\n\n[![Lint \u0026 Test](https://github.com/scottames/cmder/actions/workflows/pull_request.yml/badge.svg)](https://github.com/scottames/cmder/actions/workflows/pull_request.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/scottames/cmder.svg)](https://pkg.go.dev/github.com/scottames/cmder)\n[![Go Report Card](https://goreportcard.com/badge/github.com/scottames/cmder)](https://goreportcard.com/report/github.com/scottames/cmder)\n\nCmder implements builder functionality wrapping os/exec for easily constructing shell commands. The\ninitial intended use for this package was simple scripting with [Mage](https://github.com/magefile/mage), but there is nothing that\nshould stop it from being used in other implementations.\n\nHeavily inspired by [Mage](https://github.com/magefile/mage)'s own [sh](https://github.com/magefile/mage/tree/master/sh) library and many more great projects who have come before.\n\n## Usage\n\n### Examples\n\nExamples can be found in the [`_examples/magefile.go`](_examples/magefile.go)\n[Magefile](https://magefile.org/).\n\nRun the following to execute any of the example targets from the above Magefile.\n\n```shell\ncd _examples\nmage -l\n```\n\nAdditionally many of the tests can provide some example usage.\n\n### Logging\n\nCmder logs all commands being run, using the `Logger` method, which implements the [`Logger`](https://github.com/scottames/cmder/blob/master/pkg/log/logger.go#L10-L27) interface:\n\n```golang\ntype Logger interface {\n  // Log inserts a log entry. Arguments may be handled in the manner\n  // of fmt.Print, but the underlying logger may also decide to handle\n  // them differently.\n  Log(v ...interface{})\n\n  // Logf inserts a log entry. Arguments are handled in the manner of\n  // fmt.Printf.\n  Logf(format string, v ...interface{})\n}\n```\n\nBy default (if none specified with the `Cmder.Logger()` method) the built-in [logger](pkg/log/logger.go) will be used. See Additional `log.Logger*` variables for configuration\noptions.\n\nColor is disabled by default, but can be enabled by setting either `MAGEFILE_ENABLE_COLOR` or\n`CMDER_ENABLE_COLOR` environment variables to true.\n\nThe default logger will check the terminal width and if the command to be printed is wider than the terminal width, it will be broken up into multiple lines, similar to a shell command represented on multiple lines.\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). Contributors should follow the [Go Community Code of Conduct\n](https://golang.org/conduct).\n\n### Tests\n\nRequires:\n\n- [mage](https://magefile.org/)\n- [golangci-lint](https://golangci-lint.run/)\n\nRun:\n\n```shell\nmage check\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottames%2Fcmder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottames%2Fcmder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottames%2Fcmder/lists"}