{"id":25620757,"url":"https://github.com/codewell/climate","last_synced_at":"2025-06-22T11:36:57.909Z","repository":{"id":53814349,"uuid":"287326987","full_name":"codewell/climate","owner":"codewell","description":"The friendly comman line interface manager","archived":false,"fork":false,"pushed_at":"2023-12-12T11:25:11.000Z","size":31,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-15T07:48:18.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","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/codewell.png","metadata":{"files":{"readme":"README.md","changelog":null,"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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-08-13T16:18:55.000Z","updated_at":"2024-01-16T22:40:31.000Z","dependencies_parsed_at":"2025-02-22T07:28:04.375Z","dependency_job_id":"57653276-8703-45c7-8d2c-0f1077752b5c","html_url":"https://github.com/codewell/climate","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codewell/climate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fclimate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fclimate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fclimate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fclimate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewell","download_url":"https://codeload.github.com/codewell/climate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewell%2Fclimate/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261288984,"owners_count":23136044,"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":"2025-02-22T07:27:58.534Z","updated_at":"2025-06-22T11:36:52.896Z","avatar_url":"https://github.com/codewell.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLIMATE\n\nAssume you wrote a super cool script in let's say bash and want other users to be able to easily install, update or remove it and use it in their terminal. That is what `climate` is for!\n`climate` is a package manager for various scripts. Install `climate` and put a `.climate` file in your script root to make it easily installabale and updatable via command line.\n\n## Table of Contents\n\n- [CLIMATE](#climate)\n  - [Table of Contents](#table-of-contents)\n  - [Installation](#installation)\n  - [`.climate` file](#climate-file)\n    - [Example](#example)\n  - [Tutorial](#tutorial)\n    - [Shebang](#shebang)\n\n## Installation\n\nThe easiest way to install is to run this script\n```\nbash \u003c(curl -s https://raw.githubusercontent.com/codewell/climate/master/easy_install)\n```\nand export `${HOME}/.climate/bin` to your `PATH`.\n\nDepending on which shell you use you can run one of these scripts to permanently export `${HOME}/.climate/bin` to your `PATH`:\n\n**bash**\n```\necho \"export PATH=\\${HOME}/.climate/bin:\\$PATH\" \u003e\u003e ${HOME}/.bash_profile\n```\n**fish**\n```\necho \"set PATH ~/.climate/bin \\$PATH\" \u003e\u003e ~/.config/fish/config.fish\n```\n\nThen run\n\n```\nclimate\n```\n\nYou should get the following output:\n\n```\nCLIMATE\nThe minimalistic script manager\n\nAvailable commands\n  help                          Display this message\n  init                          Interactively create .climate file\n  install                       Install a script from its source\n  install \u003cgit-repository-url\u003e  Clone a script from a git repository and install\n  list                          List all installed scripts\n  remove  \u003cscript-name\u003e         Remove an installed script\n  update  \u003cscript-name\u003e         Update to the latest version of a script\n                                Requires REPOSITORY field set in .climate\n                                Otherwise use:\n                                climate install \u003cgit-repository-url\u003e\n```\n\n## `.climate` file\n\nThe only thing a project needs to be compatible with `climate` is the `.climate` file. Put `.climate` in the root of your project containing the following `key=value` pairs:\n\n- `DESCRIPTION` - A short description of the script. `climate list` will display the description.\n\n- `MAIN` - Path to the main script file relative to project root e.g. `main` or `src/somethingelse.sh`. **NOTE:**\n  All files with file ending `.sh` in the same directory as the main script will be sourced.\n\n- `NAME` - Determines the name of your script. Your program will be used like\n\n  ```\n  \u003cscript-name\u003e \u003cargs\u003e\n  ```\n\n  from your command line.\n\n- `REPOSITORY` (optional) - Used for updating an installed script. Run `climate update \u003cscript-name\u003e` to clone down the latest code from the script repository and install it.\n\n- `VERSION` - Used to keep track of what version of a script you use. `climate list` will display the version.\n\n### Example\n\n```\nNAME=climate\nVERSION=0.1.7\nDESCRIPTION=The minimalistic package manager for scripts\nMAIN=main\nREPOSITORY=git@github.com:fippli/climate.git\n```\n\nYou can also create `.climate` interactively with `climate init` from the root directory of your project.\n\n## Tutorial\n1. Create a directory where you will put all your code and navigate to it e.g.\n   ```\n   mkdir my-code \u0026\u0026 cd my-code\n   ```\n\n2. Create a script you wish to run from your terminal in let's say JavaScript. Put your code in a file `index.js` containing:\n   ```JavaScript\n   #!/usr/bin/env node\n   console.log(\"I like the climate script since is works with JavaScript!\");\n   ```\n\n3. Make your script executable with\n   ```\n   chmod +x index.js\n   ```\n\n4. Run `climate init` to create a .climate file:\n   ```\n   NAME=my-js-script\n   MAIN=index.js\n   DESCRIPTION=My cool js script\n   VERSION=0.0.1\n   REPOSITORY=\n   ```\n\n5. Run \n   ```\n   climate install\n   ```\n\n6. Run your script like \n   ```\n   my-js-script\n   \u003e I like the climate script since is works with JavaScript!\n   ```\n\n### Shebang\nYour script is run with the `exec` command which interprets the [shebang](https://en.wikipedia.org/wiki/Shebang_(Unix)) of the main file. Therefore, do not forget to put the shebang in your main script file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewell%2Fclimate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewell%2Fclimate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewell%2Fclimate/lists"}