{"id":21767007,"url":"https://github.com/setzer22/malli-instrument","last_synced_at":"2025-04-13T15:13:35.900Z","repository":{"id":52506807,"uuid":"355978594","full_name":"setzer22/malli-instrument","owner":"setzer22","description":"Instrumentation for malli mimicking the clojure.spec.alpha API","archived":false,"fork":false,"pushed_at":"2022-05-25T12:57:43.000Z","size":28,"stargazers_count":11,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-13T15:13:31.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/setzer22.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":"2021-04-08T16:28:28.000Z","updated_at":"2023-10-09T18:53:30.000Z","dependencies_parsed_at":"2022-09-17T17:33:11.646Z","dependency_job_id":null,"html_url":"https://github.com/setzer22/malli-instrument","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setzer22%2Fmalli-instrument","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setzer22%2Fmalli-instrument/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setzer22%2Fmalli-instrument/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/setzer22%2Fmalli-instrument/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/setzer22","download_url":"https://codeload.github.com/setzer22/malli-instrument/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248732488,"owners_count":21152852,"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":"2024-11-26T13:21:26.073Z","updated_at":"2025-04-13T15:13:35.840Z","avatar_url":"https://github.com/setzer22.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# malli-instrument\n\nThis repository implements instrumentation for [malli](https://github.com/metosin/malli/) with a very similar API to clojure.spec.alpha's instrumentation.\n\n## Rationale\n\nMalli is awesome, but instrumentation doesn't seem to be implemented yet, so I scratched my own itch. There are libraries like [aave](https://github.com/teknql/aave) offering similar features on top of malli. However, to the best of my knowledge this is the only library that uses the same instrumentation API as clojure.spec.alpha, where instrumentation occurs in a dedicated command, and with no special `defn` wrappers.\n\n## Tool maturity\n\nThis library is in a very early stage. It works but is not yet intended for production use. Please feel free to suggest new features or report any bugs in the issue tracker. \n\n## Installation\n\nUsing deps.edn and git dependencies:\n\n```clj\n{setzer22/malli-instrument {:git/url \"https://github.com/setzer22/malli-instrument.git\" :sha \"\u003clatest master branch sha\u003e\"}}\n```\nBeing in a very early stage, this library is not published in any maven repository, so other forms of distribution are currently unsupported.\n\n## Usage example\n\n```clojure\n(require '[malli.core :as m])\n(require '[malli-instrument.core :as mi])\n\n(m/=\u003e foo [:=\u003e [:cat int? int?] string?])\n(defn foo [x, y]\n  (+ x y))\n  \n(mi/instrument-all!)\n\n(foo 1 2) ;; Throws ex-info with message \"Function returned wrong output\"\n          ;; and data {:error [\"should be a string\"], :value 3}\n```\n\n ## Integration with existing tooling\n \n ### Spacemacs\n Currently, this library offers limited support for emacs (more specifically Spacemacs).\n This enables the following features:\n - Dedicated commands in `clojure-mode`: `, e k` (instrument all functions) and `, e K` (unstrument all functions)\n - Reloading all instrumentations on buffer reload with `, e b` (i.e. `cider-eval-buffer`)\n \n To enable this configuration, copy the contents of [spacemacs-setup.el](spacemacs-setup.el) in your `.spacemacs`' `dotspacemacs/user-config` function, or any other equivalent initialization code.\n \n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetzer22%2Fmalli-instrument","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsetzer22%2Fmalli-instrument","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsetzer22%2Fmalli-instrument/lists"}