{"id":36420724,"url":"https://github.com/timabilov/ibuilder","last_synced_at":"2026-01-11T17:33:58.270Z","repository":{"id":57723628,"uuid":"155232895","full_name":"timabilov/ibuilder","owner":"timabilov","description":"Mini framework for building handy customizable command-line interface","archived":false,"fork":false,"pushed_at":"2018-12-21T20:35:26.000Z","size":30,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-06T06:19:28.250Z","etag":null,"topics":["builder","cli","clibuilder","cmd","command","commandline","customize","fluent","interactive","interface","java","line"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/timabilov.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":"2018-10-29T15:12:14.000Z","updated_at":"2018-12-21T20:35:28.000Z","dependencies_parsed_at":"2022-09-26T21:50:30.796Z","dependency_job_id":null,"html_url":"https://github.com/timabilov/ibuilder","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timabilov/ibuilder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timabilov%2Fibuilder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timabilov%2Fibuilder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timabilov%2Fibuilder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timabilov%2Fibuilder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timabilov","download_url":"https://codeload.github.com/timabilov/ibuilder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timabilov%2Fibuilder/sbom","scorecard":{"id":885521,"data":{"date":"2025-08-11","repo":{"name":"github.com/timabilov/ibuilder","commit":"a5c7a95597c884f92bf932bd357a8374d0120e04"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/5 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-24T09:52:59.880Z","repository_id":57723628,"created_at":"2025-08-24T09:52:59.881Z","updated_at":"2025-08-24T09:52:59.881Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28315879,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-11T14:58:17.114Z","status":"ssl_error","status_checked_at":"2026-01-11T14:55:53.580Z","response_time":60,"last_error":"SSL_read: 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":["builder","cli","clibuilder","cmd","command","commandline","customize","fluent","interactive","interface","java","line"],"created_at":"2026-01-11T17:33:57.695Z","updated_at":"2026-01-11T17:33:58.265Z","avatar_url":"https://github.com/timabilov.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ibuilder\nMini framework for building customizable command-line interface\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.timabilov\u003c/groupId\u003e\n    \u003cartifactId\u003eibuilder\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\nEach program section (and following sections) consists from `Loop`. You can create your app from integrated (with each other) loops.\nwith Java =\u003e 1.8 it should be more comfortable to use.\n\n```java\npublic class MyApplication {\n    public static void main(String[] args){\n      \n        Loop.create(\"Main\")\n                \n                .explicitCommand(\"\u003caction\u003e\", new CommandCallback() {\n                                                   \n                       public String call(String param, Scanner s) {\n                           // Your business..\n                           return \"My task completed\";\n                       }\n                   }\n        \n                )\n                .command(\"logs\", \"to explore server logs\", new CommandCallback() {\n                \n                    public String call(String param, Scanner s) {\n                        System.out.println(\"Some API call..\");\n                        System.out.println(\"1. Log entry \");\n                        System.out.println(\"2. Log entry\");\n                        System.out.println(\"3. Log entry\");\n                        System.out.println(\"4. Log entry\");\n                        return \"Log info completed\";\n                    }\n                })\n                .launch();\n\n    }\n}\n```\n```\n\n---------------------------------------------------------------------------------------\niBuilder © 2018 \n\u003eYou're in Main section. Available options: \n (type the number of action) \n-\u003e1. \u003caction\u003e\n-\u003e2. If you want to explore server logs (type: logs)\n-\u003e3. If you want to exit (type: exit)\ntype\u003e\n---------------------------------------------------------------------------------------\n\n```\n`Loop` itself can be used instead of `CommandCallback`.  \nYou can nest loops with each other wherever and however you want:\n\n```\n         Loop.create()\n             .command(\"bitcoin\", \"to exchange bitcoin\",\n                         Loop.create()\n                             .command(\"buy\", \"to buy bitcoin\", new CommandCallback() {\n \n                                 public Object call(String param, Scanner sc) {\n                                     System.out.println(\"Please type value you want to buy:\");\n                                     // your form\n                                     CLIUtils.waitInput(\"value\");\n                                     return \"You successfully bought {} BTC\".replace(\"{}\", \"\");\n                                 }\n                             })\n                             .command(\"sell\", \"to sell bitcoin\", new CommandCallback() {\n \n \n                                 public Object call(String param, Scanner sc) {\n                                     System.out.println(\"Please type value you want to sell:\");\n                                     // your form\n                                     CLIUtils.waitInput(\"value\");\n \n                                     return \"You successfully sold {} BTC\".replace(\"{}\", \"value\");\n                                 }\n                             })\n \n             )\n             .launch();\n```\nor \n\n```\n\n Loop.create()\n        // explicit custom description of command, nothing more\n        .explicitCommand(\"employees-info\",\n                // returns Loop\n                Loop.of(\n                        // your array.. overridden toString() is enough.\n                        new Person(\"Mark\", 18, \"Doctor\"),\n                        new Person(\"Zuckerberg\", 20, \"Founder\"),\n                        new Person(\"Mike\", 46, \"No one\")\n                )\n\n        )\n        \n   \n   \n---------------------------------------------------------------------------------------\niBuilder © 2018 \n\u003eYou're in Loop section. Available options: \n (type the number of action) \n-\u003e1. employees-info\n-\u003e2. If you want to exit (type: exit)\ntype\u003e1\n---\u003eYou're in List loop section. Available options: \n (type the number of action) \n----\u003e1. Mark 18 Doctor (read only)\n----\u003e2. Zuckerberg 20 Founder (read only)\n----\u003e3. Mike 46 No one (read only)\n----\u003e4. If you want to exit (type: exit)\ntype\u003e\n---------------------------------------------------------------------------------------\n\n```\n\n\nAlso you can pass callbacks for each list item to take some action.\n\n\nIf you want change the way how item renders, you can override `renderItem` method of `Loop` \n\n---\n\nYou can use ask user to authenticate - to proceed some API calls as major requirement. \n`Loop.create().auth(new APIAuthStrategy()).command(\"my-info\", callback)`\n\nany `AuthStrategy` implementation can be used as argument. You have to handle input.\nFor further state manipulation you can use `Loop.setState` `Loop.getState`.\n\n```text\n    @Override\n    public boolean authenticate() {\n        // i.e. if token is not set through constructor\n        if (token == null)\n            token = CLIUtils.waitInput(\"Your token\");\n\n        Loop.setState(\"token\", token);\n        return true;\n    }\n```\n\nUser will see\n\n```text\niBuilder © 2018 \n\u003ePlease login to continue 'APIAuthStrategy' ...\n\u003eYou're in 'APIAuthStrategy - Login' section. Available options: \n (type the number of action) \n-\u003e1. If you want to login\n-\u003e2. If you want to register\n-\u003e3. If you want to exit (type: exit)\ntype\u003e\n```\n\n\n\nYou can define your loop as new module and do your own customizations:\n\n```java\n\n\npublic class MyApplication {\n\n\n\n    public static void main(String[] args) throws Exception {\n            \n        \n            // we ask github token to proceed following API's\n            Loop.create(\"Main\").header(\"Welcome to hell\").auth(new GithubAuth())\n                    .command(\"to see repos\",\n                           new GithubRepoLoop()\n                    )\n                    .launch();\n\n\n    }\n\n\n}\n\n\n```\n\n```java\n\nimport com.github.timabilov.irequest.request.Method;\nimport com.icmd.ibuilder.Loop;\nimport com.icmd.ibuilder.LoopCallback;\n\n\npublic class GithubRepoLoop extends Loop {\n\n    private static String API_URL = \"https://api.github.com\";\n\n    // this method will be called EACH TIME BEFORE Loop is rendered. \n    // This is not necessary, same old actions can be declared in constructor or instance initializer for instant(!) calculation.\n    public void preRender(){\n        list(\n            // get toString() overridden Repo array from your API and map callback for each item.\n            HttpCallback.api(API_URL + \"/user/repos?affiliation=owner\", Method.GET, getState(\"token\"), Repo[].class),\n            new LoopCallback\u003cRepo\u003e() {\n\n                public Loop call(final Repo item) {\n                    String starURL = API_URL + \"/user/starred/\" + item.getFull_name();\n                    return create(item.getFull_name())\n                            // Our custom handler. We overridden CommandCallback to use direct Http calls. See following. \n                            .command(\"to ⭐\", new HttpCallback(starURL, Method.PUT, getState(\"token\"), null))\n                            .command(\"to remove ⭐\", new HttpCallback(starURL, Method.DELETE, getState(\"token\"), null));\n\n                }\n            }\n\n        );\n\n    }\n}\n\n```\n\n\n\n```java\nimport com.github.timabilov.irequest.request.Method;\nimport com.github.timabilov.irequest.request.Request;\nimport com.icmd.ibuilder.CommandCallback;\n\nimport java.util.Scanner;\n\npublic class HttpCallback\u003cE\u003e implements CommandCallback {\n\n    String url;\n    Method method;\n    String token;\n    Class\u003cE\u003e returnType;\n\n    HttpCallback(String url, Method method, String token, Class\u003cE\u003e returnType){\n\n        this.url = url;\n        this.method = method;\n        this.token = token;\n        this.returnType = returnType;\n    }\n    \n    // Your api library and appropriate calls..\n    public static \u003cE\u003e E api(String url, Method method, String token, Class\u003cE\u003e type){\n\n        try {\n            \n            if (type == null) {\n                Request.url(url, method)\n                        .header(\"Authorization\", \"token \" + token).send();\n                return null;\n            }\n            return Request.url(url, method)\n                    .header(\"Authorization\", \"token \" + token).fetchJson(type);\n\n\n        } catch (Exception e){\n            System.out.println(e);\n            return null;\n        }\n    }\n\n\n    public Object call(String param, Scanner sc) {\n        api(this.url, method, token, returnType);\n        return \"Done!\";\n    }\n}\n\n```\n\n\n```text\n\niBuilder © 2018 \n\u003ePlease login to continue 'GithubAuth' ...\n\u003eYou're in 'GithubAuth - Login' section. Available options: \n (type the number of action) \n-\u003e1. If you want to login\n-\u003e2. If you want to exit (type: exit)\ntype\u003e1\nGithub Token:XXXXXXXXX\nSuccessfully logged in\n\u003eWelcome to hell\n\u003eYou're in Main section. Available options: \n (type the number of action) \n-\u003e1. If you want to see repos\n-\u003e2. If you want to exit (type: exit)\ntype\u003e1\n---\u003eYou're in GithubRepoLoop section. Available options: \n (type the number of action) \n----\u003e1. ⭐ 2 useful-af-repo\n        Useful repo description\n        https://github.com/username/useful-af-repo\n----\u003e2. ⭐ 0 starme\n        Repo description\n        https://github.com/username/starme\ntype\u003e2\n------\u003eYou're in username/starme. Available options: \n (type the number of action) \n-------\u003e1. If you want to ⭐\n-------\u003e2. If you want to remove ⭐\n-------\u003e3. If you want to exit (type: exit)\ntype\u003e\n\n```\n\nAt this example i used iRequest http library. You can use your own.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.timabilov\u003c/groupId\u003e\n    \u003cartifactId\u003eirequest\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.3\u003c/version\u003e\n\u003c/dependency\u003e\n```   \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimabilov%2Fibuilder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimabilov%2Fibuilder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimabilov%2Fibuilder/lists"}