{"id":44775023,"url":"https://github.com/crackcomm/actions-cli","last_synced_at":"2026-02-16T06:35:43.893Z","repository":{"id":73539645,"uuid":"49222318","full_name":"crackcomm/actions-cli","owner":"crackcomm","description":"Build cli apps from actions","archived":false,"fork":false,"pushed_at":"2016-01-07T22:46:57.000Z","size":27,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-04T05:23:34.025Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crackcomm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-01-07T18:25:24.000Z","updated_at":"2023-08-04T05:23:34.026Z","dependencies_parsed_at":"2023-03-22T21:50:48.338Z","dependency_job_id":null,"html_url":"https://github.com/crackcomm/actions-cli","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/crackcomm/actions-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crackcomm%2Factions-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crackcomm%2Factions-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crackcomm%2Factions-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crackcomm%2Factions-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crackcomm","download_url":"https://codeload.github.com/crackcomm/actions-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crackcomm%2Factions-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29501919,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-16T05:57:17.024Z","status":"ssl_error","status_checked_at":"2026-02-16T05:56:49.929Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":[],"created_at":"2026-02-16T06:35:43.113Z","updated_at":"2026-02-16T06:35:43.887Z","avatar_url":"https://github.com/crackcomm.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# actions-cli\n\nApplication for constructing command line applications using just json or yaml files.\n\nTo construct a command line application we need two things\n\n1. [Actions](https://github.com/crackcomm/actions)\n2. Commands\n\n## Example\n\nTo simply see what its capable of build of [example](https://github.com/crackcomm/actions-cli/tree/master/example) application can be done using `make example`.\n\n### Example YAML application\n\n```yaml\nname: \"music\"\nusage: \"command {args...}\"\ndescription: \"Looks for music on the internet\"\nsources:\n  - \"./music-app/actions\"\n  - \"http://127.0.0.1:3000/crackcomm/music-app/actions/\"\ncommands:\n  -\n    name: youtube\n    usage: {title}\n    example: 2pac\n    description: Finds music on youtube.com\n    action: youtube.find\n    arguments:\n      -\n        name: \"title\"\n        required: true\n        push: \"query.search_query\"\n\n```\n\n#### Result\n\nYou can build this app or run straight from json file.\n\nBuild\n\n\t$ go get github.com/crackcomm/actions-cli/app-build\n\t$ app-build -app=music.json -o=music\n\t$ music help\n\tmusic - Looks for music on the internet\n\t...\n\nRun\n\n\t$ go get github.com/crackcomm/actions-cli/app\n\t$ APP_FILE=music.json\n\t$ app help\n\tmusic - Looks for music on the internet\n\t...\n\n```sh\n$ music\nmusic - Looks for music on the internet\n\nCommands:\n\n    youtube     Looks for music on YouTube\n\nUse \"music help \u003ccommand\u003e\" for more information about a command.\n\n\nOptions:\n  -format=\"table\": result display format\n  -q=false: only print error and warning messages, all other output will be suppressed\n$ music help youtube\nUsage: music youtube {title}\n\nLooks for music on YouTube\n\nexample:\n\n    $ music youtube 2pac\n\nOptions:\n  -format=\"table\": result display format\n  -q=false: only print error and warning messages, all other output will be suppressed\n$ music youtube 2pac letter to my unborn child\n|-----------------------------------------------------------------------------------------------------------------------|\n| title       | 2pac-Tupac Letter To My UnBorn                                                                          |\n|-----------------------------------------------------------------------------------------------------------------------|\n| url         | http://www.youtube.com/watch?v=SyBjzRrEdE0                                                              |\n|-----------------------------------------------------------------------------------------------------------------------|\n| author      | 2Pac for life                                                                                           |\n|-----------------------------------------------------------------------------------------------------------------------|\n| views       | 4362727                                                                                                 |\n|-----------------------------------------------------------------------------------------------------------------------|\n| keywords    | 2pac, tupac, letter, to, my, unborn                                                                     |\n|-----------------------------------------------------------------------------------------------------------------------|\n| description | Album:Until The End Of Time Disk 1 Song\"Letter To My UnBorn\" By:Tupac A. Shakur Tha Song And Tha Pic    |\n|-----------------------------------------------------------------------------------------------------------------------|\n| image       | http://i1.ytimg.com/vi/SyBjzRrEdE0/hqdefault.jpg                                                        |\n|-----------------------------------------------------------------------------------------------------------------------|\n| rating      | {\"dislikes\":\"129\",\"likes\":\"13609\"}                                                                      |\n|-----------------------------------------------------------------------------------------------------------------------|\n```\n\n## Usage\n\nApplication is JSON marshaled set of commands.\n\nCommand structure is following\n\n```Go\ntype Argument struct {\n\tName     string `json:\"name\"`\n\tPush     string `json:\"push\"` // Name in context\n\tRequired bool   `json:\"required\"`\n\tValue    string `json:\"default\"`\n}\n\ntype Command struct {\n\tName        string      `json:\"name\"`\n\tUsage       string      `json:\"usage\"`\n\tExample     string      `json:\"example\"`     // one line example\n\tDescription string      `json:\"description\"`\n\tArguments   Arguments   `json:\"arguments\"`\n\tIAction     interface{} `json:\"action\"`      // action to run (string or map)\n\tCommands    Commands    `json:\"commands\"`    // list of subcommands\n}\n```\n\nTo use a .json application first you have to register a source of actions.\n\nFor example a file source in directory `./actions`.\n\n```Go\npackage main\n\nimport (\n\t\"github.com/crackcomm/go-actions/core\"\n\t_ \"github.com/crackcomm/go-actions/source/file\"\n\t_ \"github.com/crackcomm/go-actions/source/http\"\n\t// ...\n)\n\n// ...\n\nfunc init() {\n\t// Add file source to default core registry\n\tcore.Source(\"http://127.0.0.1:3000/api/v1.0/crackcomm/action-app/actions/\")\n\tcore.Source(\"file://actions\")\n}\n```\n\nNow `youtube/find.json` file becomes `youtube.find` action and you can use it in your application.\n\nApplication now can be unmarshaled from a file and runned.\n\n```Go\npackage main\n\nimport (\n\t// ...\n\t\"github.com/crackcomm/actions-cli/cmd\"\n\t\"log\"\n\t\"os\"\n)\n\n// ...\n\nfunc main() {\n\t// Read application from .json file\n\tapp, err := cmd.ReadFile(\"./app.json\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\t// Run application\n\terr = app.Run(os.Args)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrackcomm%2Factions-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrackcomm%2Factions-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrackcomm%2Factions-cli/lists"}