{"id":13608974,"url":"https://github.com/cotowali/cotowali","last_synced_at":"2025-04-04T19:13:01.863Z","repository":{"id":42705843,"uuid":"338686646","full_name":"cotowali/cotowali","owner":"cotowali","description":"A statically typed scripting language that transpile into POSIX sh","archived":false,"fork":false,"pushed_at":"2023-09-04T23:18:32.000Z","size":3677,"stargazers_count":613,"open_issues_count":5,"forks_count":8,"subscribers_count":5,"default_branch":"taika-dev","last_synced_at":"2024-10-30T05:57:46.564Z","etag":null,"topics":["cotowari","language","programming-language","shell-script","transpiler"],"latest_commit_sha":null,"homepage":"","language":"V","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cotowali.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},"funding":{"github":null,"patreon":null,"open_collective":"cotowali","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2021-02-13T22:55:28.000Z","updated_at":"2024-10-25T12:52:38.000Z","dependencies_parsed_at":"2023-02-18T12:16:59.808Z","dependency_job_id":null,"html_url":"https://github.com/cotowali/cotowali","commit_stats":{"total_commits":2806,"total_committers":6,"mean_commits":467.6666666666667,"dds":"0.0028510334996436626","last_synced_commit":"b827b55ff38f320670c7b3aebbbe5fe20d276fc7"},"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotowali%2Fcotowali","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotowali%2Fcotowali/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotowali%2Fcotowali/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cotowali%2Fcotowali/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cotowali","download_url":"https://codeload.github.com/cotowali/cotowali/tar.gz/refs/heads/taika-dev","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246043453,"owners_count":20714409,"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":["cotowari","language","programming-language","shell-script","transpiler"],"created_at":"2024-08-01T19:01:31.434Z","updated_at":"2025-03-28T18:14:35.294Z","avatar_url":"https://github.com/cotowali.png","language":"V","funding_links":["https://opencollective.com/cotowali"],"categories":["Uncategorized","V","Other","Applications"],"sub_categories":["Uncategorized","Interpreters/Compilers"],"readme":"# We need financial support to continue development.  Please [become a sponsor](https://opencollective.com/cotowali).\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"200\" src=\"https://raw.githubusercontent.com/cotowali/design/main/assets/cotowali.svg?sanitize=true\"\u003e\n  \u003ch1\u003eCotowali\u003c/h1\u003e\n  \u003cp\u003eA statically typed scripting language that transpile into POSIX sh\u003c/p\u003e\n  \u003cp\u003e\u003ca href=\"https://cotowali.org/\" ref=\"nofollow\" target=\"_blank\"\u003eWebsite\u003c/a\u003e\u003c/p\u003e\n  \u003cp\u003e\n    \u003ca href=\"http://mozilla.org/MPL/2.0/\" rel=\"nofollow\"\u003e\n      \u003cimg  alt=\"License: MPL 2.0\" src=\"https://img.shields.io/badge/License-MPL%202.0-blue.svg?style=flat-square\"\u003e\n    \u003ca href=\"https://discord.com/invite/nwEad5dNYg\" rel=\"nofollow\"\u003e\n      \u003cimg alt=\"Join Cotowali Discord\" src=https://img.shields.io/static/v1?label=Discord\u0026logo=discord\u0026logoColor=white\u0026message=Join\u0026color=\u0026style=flat-square\n    \u003c/a\u003e\n  \u003c/p\u003e\n\u003c/div\u003e\n\n## Concepts of Cotowali\n\n- Outputs shell script that is fully compliant with POSIX standards.\n- Simple syntax.\n- Simple static type system.\n- Syntax for shell specific feature like pipe and redirection.\n\n## Example\n\n```v\nfn fib(n: int): int {\n  if n \u003c 2 {\n    return n\n  }\n  return fib(n - 1) + fib(n - 2)\n}\n\nfn int |\u003e twice() |\u003e int {\n   var n = 0\n   read(\u0026n)\n   return n * 2\n}\n\nassert(fib(6) == 8)\nassert((fib(6) |\u003e twice()) == 16)\n\nfn ...int |\u003e sum() |\u003e int {\n  var v: int\n  var res = 0\n  while read(\u0026v) {\n    res += v\n  }\n  return res\n}\n\nfn ...int |\u003e twice_each() |\u003e ...int {\n  var n: int\n  while read(\u0026n) {\n    yield n * 2\n  }\n}\n\nassert((seq(3) |\u003e sum()) == 6)\nassert((seq(3) |\u003e twice_each() |\u003e sum()) == 12)\n\n// Call command by `@command` syntax with pipeline operator\nassert(((1, 2) |\u003e @awk('{print $1 + $2}')) == '3')\n```\n\n[There are more examples](./examples)\n\n## Installation\n\n### Use [Konryu](https://github.com/cotowali/konryu) (cotowali installer written in cotowali)\n\n```sh\ncurl -sSL https://konryu.cotowali.org | sh\n# add to your shell config like .bashrc\nexport PATH=\"$HOME/.konryu/bin:$PATH\"\neval \"$(konryu init)\"\n```\n\n### Build from source\n\n0. Install required tools\n\n    - [The V Programming Language](https://github.com/vlang/v)\n        ```sh\n        git clone https://github.com/vlang/v\n        cd v\n        make\n        ```\n\n    - [zakuro9715/z](https://github.com/zakuro9715/z)\n        ```sh\n        go install github.com/zakuro9715/z\n        # or\n        curl -sSL gobinaries.com/zakuro9715/z | sh\n        ```\n\n1. Build\n\n    ```sh\n    z build\n    ```\n\n2. Install\n\n    ```sh\n    sudo z symlink\n    # or\n    sudo z install\n    ```\n\n## How to use\n\n```sh\n# compile\nlic examples/add.li\n\n# execution\nlic examples/add.li | sh\n# or\nlic run examples/add.li\n```\n\n## Development\n\nSee [docs/development.md](./docs/development.md)\n\n### Docker\n\n```\ndocker compose run dev\n```\n\n## Author\n\n[zakuro](https://twitter.com/zakuro9715) \u0026lt;z@kuro.red\u0026gt;\n\n## Acknowledgements\n\nCotowali is supported by 2021 Exploratory IT Human Resources Project ([The MITOU Program](https://www.ipa.go.jp/english/humandev/third.html) by IPA: Information-technology Promotion Agency, Japan.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotowali%2Fcotowali","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcotowali%2Fcotowali","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcotowali%2Fcotowali/lists"}