{"id":13410338,"url":"https://github.com/tucnak/climax","last_synced_at":"2025-04-13T10:57:15.634Z","repository":{"id":57490435,"uuid":"45495453","full_name":"tucnak/climax","owner":"tucnak","description":"Climax is an alternative CLI with the human face","archived":false,"fork":false,"pushed_at":"2020-09-05T07:02:16.000Z","size":26,"stargazers_count":219,"open_issues_count":7,"forks_count":16,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-04-10T18:34:25.000Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://git.io/climax","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/tucnak.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":"2015-11-03T21:04:57.000Z","updated_at":"2025-03-23T06:19:46.000Z","dependencies_parsed_at":"2022-09-02T12:50:29.285Z","dependency_job_id":null,"html_url":"https://github.com/tucnak/climax","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tucnak%2Fclimax","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tucnak%2Fclimax/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tucnak%2Fclimax/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tucnak%2Fclimax/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tucnak","download_url":"https://codeload.github.com/tucnak/climax/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248703195,"owners_count":21148117,"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":[],"created_at":"2024-07-30T20:01:06.304Z","updated_at":"2025-04-13T10:57:15.599Z","avatar_url":"https://github.com/tucnak.png","language":"Go","funding_links":[],"categories":["Command Line","命令行","Build Automation"],"sub_categories":["Standard CLI","标准CLI"],"readme":"# Climax\n\u003eClimax is an alternative CLI that looks like Go command\n\n[![GoDoc](https://godoc.org/github.com/tucnak/climax?status.svg)](https://godoc.org/github.com/tucnak/climax)\n[![Travis](https://travis-ci.org/tucnak/climax.svg?branch=master)](https://travis-ci.org/tucnak/climax)\n\n**Climax** is a handy alternative CLI (command-line interface) for Go apps.\nIt looks pretty much exactly like the output of the default `go` command and\nincorporates some fancy features from it. For instance, Climax does support\nso-called topics (some sort of Wiki entries for CLI). You can define some\nannotated use cases of some command that would get displayed in the\nhelp section of corresponding command also.\n\n##### Why creating another CLI?\nI didn't like existing solutions (e.g. codegangsta/cli | spf13/cobra) either for\nbloated codebase (I dislike the huge complex libraries) or poor output\nstyle / API. This project is just an another view on the subject, it has\nslightly different API than, let's say, Cobra; I find it much more convenient.\n\u003chr\u003e\n\nA sample application output, Climax produces:\n```\nCamus is a modern content writing suite.\n\nUsage:\n\n\tcamus command [arguments]\n\nThe commands are:\n\n\tinit        starts a new project\n\tnew         creates flavored book parts\n\nUse \"camus help [command]\" for more information about a command.\n\nAdditional help topics:\n\n\twriting     markdown language cheatsheet\n\tmetadata    intro to yaml-based metadata\n\trealtime    effective real-time writing\n\nUse \"camus help [topic]\" for more information about a topic.\n```\n\nHere is an example of a trivial CLI application that does nothing,\nbut provides a single string split-like functionality:\n```go\ndemo := climax.New(\"demo\")\ndemo.Brief = \"Demo is a funky demonstation of Climax capabilities.\"\ndemo.Version = \"stable\"\n\njoinCmd := climax.Command{\n\tName:  \"join\",\n\tBrief: \"merges the strings given\",\n\tUsage: `[-s=] \"a few\" distinct strings`,\n\tHelp:  `Lorem ipsum dolor sit amet amet sit todor...`,\n\n\tFlags: []climax.Flag{\n\t\t{\n\t\t\tName:     \"separator\",\n\t\t\tShort:    \"s\",\n\t\t\tUsage:    `--separator=\".\"`,\n\t\t\tHelp:     `Put some separating string between all the strings given.`,\n\t\t\tVariable: true,\n\t\t},\n\t},\n\n\tExamples: []climax.Example{\n\t\t{\n\t\t\tUsecase:     `-s . \"google\" \"com\"`,\n\t\t\tDescription: `Results in \"google.com\"`,\n\t\t},\n\t},\n\n\tHandle: func(ctx climax.Context) int {\n\t\tvar separator string\n\t\tif sep, ok := ctx.Get(\"separator\"); ok {\n\t\t\tseparator = sep\n\t\t}\n\n\t\tfmt.Println(strings.Join(ctx.Args, separator))\n\n\t\treturn 0\n\t},\n}\n\ndemo.AddCommand(joinCmd)\ndemo.Run()\n```\n\nHave fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftucnak%2Fclimax","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftucnak%2Fclimax","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftucnak%2Fclimax/lists"}