{"id":20464343,"url":"https://github.com/osl-incubator/makim","last_synced_at":"2025-04-10T02:19:36.036Z","repository":{"id":65750602,"uuid":"591983877","full_name":"osl-incubator/makim","owner":"osl-incubator","description":"Makim is inspired by tools like Make and Ansible, focusing on improving task definition and dependency management. Instead of using the Makefile format, it utilizes YAML for defining tasks.","archived":false,"fork":false,"pushed_at":"2025-04-03T03:41:27.000Z","size":3305,"stargazers_count":14,"open_issues_count":9,"forks_count":24,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-04-10T02:19:29.518Z","etag":null,"topics":["automation","devops","task-runner","tasks"],"latest_commit_sha":null,"homepage":"https://osl-incubator.github.io/makim/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/osl-incubator.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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},"funding":{"github":["opensciencelabs","osl-incubator"]}},"created_at":"2023-01-22T15:13:15.000Z","updated_at":"2025-04-03T03:41:32.000Z","dependencies_parsed_at":"2023-12-13T01:33:52.655Z","dependency_job_id":"4a879a35-48d1-460d-9a63-9227d138e4b2","html_url":"https://github.com/osl-incubator/makim","commit_stats":null,"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osl-incubator%2Fmakim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osl-incubator%2Fmakim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osl-incubator%2Fmakim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/osl-incubator%2Fmakim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/osl-incubator","download_url":"https://codeload.github.com/osl-incubator/makim/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248142908,"owners_count":21054672,"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":["automation","devops","task-runner","tasks"],"created_at":"2024-11-15T13:14:43.859Z","updated_at":"2025-04-10T02:19:36.010Z","avatar_url":"https://github.com/osl-incubator.png","language":"Python","funding_links":["https://github.com/sponsors/opensciencelabs","https://github.com/sponsors/osl-incubator"],"categories":[],"sub_categories":[],"readme":"# Makim\n\n![CI](https://img.shields.io/github/actions/workflow/status/osl-incubator/makim/main.yaml?logo=github\u0026label=CI)\n[![Python Versions](https://img.shields.io/pypi/pyversions/makim)](https://pypi.org/project/makim/)\n[![Package Version](https://img.shields.io/pypi/v/makim?color=blue)](https://pypi.org/project/makim/)\n![License](https://img.shields.io/pypi/l/makim?color=blue)\n![Discord](https://img.shields.io/discord/796786891798085652?logo=discord\u0026color=blue)\n\n**Makim** is inspired by tools like **Make** and **Ansible**, focusing on\nimproving task definition and dependency management. Instead of using the\n**Makefile** format, it utilizes **YAML** for defining tasks.\n\n- License: BSD 3 Clause\n- Documentation: [Makim Docs](https://osl-incubator.github.io/makim)\n\n---\n\n## Features\n\n- **Help Text as First-Class:** Add detailed `help` text to tasks and arguments\n  for clear documentation.\n- **Task Arguments:** Define and manage arguments with types, defaults, and\n  descriptions.\n- **Dependencies with Conditional Control:** Set task dependencies with `if`\n  conditionals to manage execution dynamically.\n- **Environment Variables:** Scope variables globally, by group, or by task to\n  reduce redundancy and maintain modularity.\n- **Jinja2 Templating:** Access arguments, variables, or environment variables\n  via Jinja2 templates.\n- **Matrix Configuration:** Automate tasks across multiple parameter\n  combinations (ideal for CI/CD workflows).\n- **Hooks:** Use `pre-run` and `post-run` hooks to customize task lifecycles.\n- **Scheduler:** Cron-like scheduling with APScheduler integration for periodic\n  tasks.\n- **Remote Execution:** Execute tasks on remote servers via SSH with flexible\n  configurations.\n- **File Logging:** Log outputs to files with custom formatting and stream\n  control.\n- **Retry Mechanism:** Adds resilience by retrying tasks that encounter errors.\n- **Validation:** Ensures `.makim.yaml` configurations are correct with schema\n  validation.\n\n---\n\n## How to use it\n\nFirst you need to place the config file `.makim.yaml` in the root of your\nproject. This is an example of a configuration file:\n\n```yaml\ngroups:\n  build:\n    env:\n      GROUP_ENV: group_value\n    tasks:\n      clean:\n        help: Clean build artifacts\n        args:\n          cache:\n            type: bool\n            action: store_true\n            help: Remove all cache files\n        log:\n          path: ./logs/clean.txt\n          level: err\n          format: \"%(asctime)s - %(file)s - %(levelname)s - %(message)s\"\n        run: |\n          echo \"Cleaning build directory...\"\n          rm -rf build/\n      compile:\n        help: Compile the project\n        hooks:\n          pre-run:\n            - task: build.clean # Run 'clean' before 'compile'\n        run: |\n          echo \"Compiling the project...\"\n\n# Scheduler for automated tasks\nscheduler:\n  daily-clean:\n    task: build.clean\n    schedule: \"0 0 * * *\" # Every day at midnight\n```\n\nSome examples of how to use it:\n\n- run the `compile` task: `makim build.compile`\n\n- run the `clean` task with argument: `makim build.clean --cache`\n\nThe help menu for the `.makim.yaml` file would looks like this:\n\n```\n$ makim --help\n\n Usage: makim [OPTIONS] COMMAND [ARGS]...\n\n Makim is a tool that helps you to organize and simplify your helper commands.\n\n╭─ Options ────────────────────────────────────────────────────────────────────╮\n│ --version             -v            Show the version and exit                │\n│ --file                        TEXT  Makim config file [default: .makim.yaml] │\n│ --dry-run                           Execute the command in dry mode          │\n│ --verbose                           Execute the command in verbose mode      │\n│ --skip-hooks                        Skip hooks while executing the command   │\n│ --install-completion                Install completion for the current       │\n│                                     shell.                                   │\n│ --show-completion                   Show completion for the current shell,   │\n│                                     to copy it or customize the              │\n│                                     installation.                            │\n│ --help                              Show this message and exit.              │\n╰──────────────────────────────────────────────────────────────────────────────╯\n╭─ build ──────────────────────────────────────────────────────────────────────╮\n│ build.clean                         Clean build artifacts                    │\n│ build.compile                       Compile the project                      │\n╰──────────────────────────────────────────────────────────────────────────────╯\n╭─ Extensions ─────────────────────────────────────────────────────────────────╮\n│ cron                                Tasks Scheduler                          │\n╰──────────────────────────────────────────────────────────────────────────────╯\n\n If you have any problem, open an issue at: https://github.com/osl-incubator/makim\n```\n\nAs you can see, the help menu automatically adds information defined by all the\n`help` key, inside the `.makim.yaml` file.\n\n## Playground\n\nExperience **makim** directly in your browser using Google Colab! Google Colab\nis an online platform that allows you to write, run, and share Python code\nthrough your browser. It is especially useful for machine learning, data\nanalysis, and education.\n\nTo try makim, simply click the following link, make a copy of the notebook to\nyour drive, and then you can modify and execute the code as needed:\n\n[Experiment with makim on Google Colab](https://colab.research.google.com/drive/1m131pqi6Bjq8Hp8YN_Cbuyezn61f19lB?usp=sharing)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosl-incubator%2Fmakim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fosl-incubator%2Fmakim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fosl-incubator%2Fmakim/lists"}