{"id":30685164,"url":"https://github.com/putoutjs/aleman","last_synced_at":"2026-05-24T21:03:26.746Z","repository":{"id":309430728,"uuid":"1034749134","full_name":"putoutjs/aleman","owner":"putoutjs","description":"🐊Putout-based framework for web","archived":false,"fork":false,"pushed_at":"2026-05-20T21:31:02.000Z","size":357,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-21T02:00:55.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/putoutjs.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog","contributing":null,"funding":".github/FUNDING.yml","license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"coderaiser","open_collective":"cloudcmd","ko_fi":"coderaiser"}},"created_at":"2025-08-08T23:18:12.000Z","updated_at":"2026-05-20T21:31:08.000Z","dependencies_parsed_at":"2025-09-11T21:09:12.281Z","dependency_job_id":"e41a4871-1f03-4fa8-9482-22fd4b5d6a4a","html_url":"https://github.com/putoutjs/aleman","commit_stats":null,"previous_names":["putoutjs/aleman"],"tags_count":65,"template":false,"template_full_name":null,"purl":"pkg:github/putoutjs/aleman","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putoutjs%2Faleman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putoutjs%2Faleman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putoutjs%2Faleman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putoutjs%2Faleman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/putoutjs","download_url":"https://codeload.github.com/putoutjs/aleman/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/putoutjs%2Faleman/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33450404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T19:21:36.376Z","status":"ssl_error","status_checked_at":"2026-05-24T19:21:10.562Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2025-09-01T21:08:04.096Z","updated_at":"2026-05-24T21:03:26.734Z","avatar_url":"https://github.com/putoutjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/coderaiser","https://opencollective.com/cloudcmd","https://ko-fi.com/coderaiser"],"categories":[],"sub_categories":[],"readme":"# Aleman\n\n![image](https://github.com/user-attachments/assets/32b3499d-1490-43d3-bdd1-84d646432c82)\n\n\u003e **ぶしどうとはしぬこととみつけたり。**\n\u003e\n\u003e *Bushidō to wa shinu koto to mitsuketari.*\n\u003e\n\u003e **\"The way of the warrior is found in death.\"**\n\u003e\n\u003e **はがくれ』**\n\u003e\n\u003e Yamamoto Tsunetomo, Hagakure\n\n🐊Putout-based framework for web.\n\n## Install\n\n```\nbun i aleman\n```\n\n## Rules and Addons\n\nAleman supports two main concepts:\n\n- ✅ addons - events;\n- ✅ rules - 🐊**Putout** rules that changes HTML;\n\nAll interaction with DOM made by using the rules, and we interact not with DOM directly, but with JSX AST.\nIt makes testing simple, states predictable and independent.\n\n### Addons\n\nAddon responsible for UI and interaction with outer world: clicks, fetches and everything like this.\nAleman supports next types of addons:\n\n- ✅ [Global](#globals);\n- ✅ [Events](#events);\n- ✅ [Keys](#keys);\n- ✅ [Vim](#vim);\n\nWhen you need to filter out events according to `state` use `filter`:\n\n```js\nexport const filter = ({state}) =\u003e state.command === 'show';\n```\n\n#### Global\n\nAny browser event you need to listen globally:\n\n```js\nexport const events = ['click'];\nexport const listener = () =\u003e ({\n    command: 'hide',\n    index: -1,\n    showSubmenu: false,\n    insideSubmenu: false,\n});\n```\n\n#### Events\n\nAny browser event you need to listen according to element with `data-name=\"hello\":\n\n```js\nexport const name = 'hello';\nexport const events = ['click'];\nexport const listener = () =\u003e ({\n    command: 'hide',\n    index: -1,\n    showSubmenu: false,\n    insideSubmenu: false,\n});\n```\n\n#### Keys\n\n```js\nexport const keys = ['Escape'];\n\nexport const listener = ({state, options}) =\u003e {\n    options.beforeHide?.(state);\n    return {\n        command: 'hide',\n        showSubmenu: false,\n        index: -1,\n    };\n};\n```\n\n### Vim\n\n```js\nimport * as up from './up.js';\n\nexport const commands = ['gg'];\n\nexport function listener({state, options}) {\n    const {\n        insideSubmenu,\n        index,\n        submenuIndex,\n    } = state;\n    \n    const newState = {\n        ...state,\n        index: insideSubmenu ? index : 1,\n        submenuIndex: insideSubmenu ? 1 : submenuIndex,\n    };\n    \n    return up.listener({\n        state: newState,\n        options,\n    });\n}\n```\n\n## Licence\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputoutjs%2Faleman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fputoutjs%2Faleman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fputoutjs%2Faleman/lists"}