{"id":22870275,"url":"https://github.com/berquerant/fcli","last_synced_at":"2025-03-31T11:26:06.445Z","repository":{"id":61625043,"uuid":"487893807","full_name":"berquerant/fcli","owner":"berquerant","description":"utilities for function-based command-line tools","archived":false,"fork":false,"pushed_at":"2022-07-18T07:56:28.000Z","size":28,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-06T16:58:40.708Z","etag":null,"topics":["go"],"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/berquerant.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":"2022-05-02T15:21:21.000Z","updated_at":"2022-05-02T15:21:49.000Z","dependencies_parsed_at":"2022-10-18T18:15:19.542Z","dependency_job_id":null,"html_url":"https://github.com/berquerant/fcli","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/berquerant%2Ffcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/berquerant%2Ffcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/berquerant","download_url":"https://codeload.github.com/berquerant/fcli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246460284,"owners_count":20781080,"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"],"created_at":"2024-12-13T13:14:22.896Z","updated_at":"2025-03-31T11:26:06.416Z","avatar_url":"https://github.com/berquerant.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fcli\n\nPackage fcli provides utilities for function-based command-line tools.\n\n## Usage\n\n``` go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/berquerant/fcli\"\n)\n\nfunc greet(name string) {\n\tfmt.Println(\"Hello,\", name)\n}\n\n// bye prints Bye!\nfunc bye() {\n\tfmt.Println(\"Bye!\")\n}\n\nfunc main() {\n\tcli := fcli.NewCLI(\"do\")\n\t_ = cli.Add(greet)\n\t_ = cli.Add(bye)\n\t_ = cli.Start()\n}\n```\n\n```\n❯ ./do\nError: not enough arguments\nUsage: do {bye,greet}\n\n❯ ./do greet -h\nUsage of greet:\n  -name string\n\n❯ ./do greet -name world\nHello, world\n\n❯ ./do bye -h\nbye prints Bye!\n\n❯ ./do bye\nBye!\n```\n\n## Examples\n\n[examples](./examples/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Ffcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fberquerant%2Ffcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fberquerant%2Ffcli/lists"}