{"id":28042272,"url":"https://github.com/bbva/kapow","last_synced_at":"2025-05-11T14:25:14.279Z","repository":{"id":34975974,"uuid":"183197059","full_name":"BBVA/kapow","owner":"BBVA","description":"Kapow! If you can script it, you can HTTP it.","archived":false,"fork":false,"pushed_at":"2024-10-23T18:09:00.000Z","size":8282,"stargazers_count":615,"open_issues_count":32,"forks_count":28,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-04T11:37:07.704Z","etag":null,"topics":["api","http","microframework","microservice","posix","shell"],"latest_commit_sha":null,"homepage":"https://kapow.readthedocs.io","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BBVA.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-24T09:37:55.000Z","updated_at":"2025-03-22T10:49:09.000Z","dependencies_parsed_at":"2024-06-18T21:14:18.363Z","dependency_job_id":"f7e949f6-2083-4fe5-8741-9f26de3b6410","html_url":"https://github.com/BBVA/kapow","commit_stats":{"total_commits":998,"total_committers":13,"mean_commits":76.76923076923077,"dds":0.6202404809619239,"last_synced_commit":"1a028930ccc788e3750437d34a9487e58ec5f728"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVA%2Fkapow","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVA%2Fkapow/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVA%2Fkapow/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BBVA%2Fkapow/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BBVA","download_url":"https://codeload.github.com/BBVA/kapow/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253578377,"owners_count":21930540,"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":["api","http","microframework","microservice","posix","shell"],"created_at":"2025-05-11T14:25:13.630Z","updated_at":"2025-05-11T14:25:14.250Z","avatar_url":"https://github.com/BBVA.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg alt=\"Kapow! Logo\" src=\"https://raw.githubusercontent.com/BBVA/kapow/master/docs/source/_static/logo.png\" width=300 /\u003e\n  \u003ch3 align=\"center\"\u003eIf you can script it, you can HTTP it.\u003c/h3\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/BBVA/kapow/actions/workflows/test_and_release.yml\"\u003e\u003cimg alt=\"Test status\" src=\"https://github.com/BBVA/kapow/actions/workflows/test_and_release.yml/badge.svg\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/badge/github.com/bbva/kapow\"\u003e\u003cimg alt=\"Go Report\" src=\"https://goreportcard.com/badge/github.com/bbva/kapow\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/BBVA/kapow/issues/\"\u003e\u003cimg alt=\"Open Issues\" src=\"https://img.shields.io/github/issues/BBVA/kapow\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://kapow.readthedocs.io\"\u003e\u003cimg alt=\"Documentation\" src=\"https://img.shields.io/readthedocs/kapow\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/BBVA/kapow/releases\"\u003e\u003cimg alt=\"Current Version\" src=\"https://img.shields.io/github/v/release/BBVA/kapow?include_prereleases\" /\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n---\n\n## What's *Kapow!*\n\nSay we have a nice cozy **shell command** that solves our problem. *Kapow!* lets\nus easily **turn that into an HTTP API**.\n\n\n### Let's see this with an example\n\nWe want to expose **log entries** for files not found on our **Apache Web\nServer**, as an HTTP API.  With *Kapow!* we just need to write this\n*executable* script:\n\n``` console\n[apache-host]$ cat search-apache-errors\n#!/usr/bin/env sh\nkapow route add /apache-errors - \u003c\u003c-'EOF'\n\tcat /var/log/apache2/access.log | grep 'File does not exist' | kapow set /response/body\nEOF\n[apache-host]$ chmod +x search-apache-errors\n```\n\nand then, run it using *Kapow!*\n\n```bash\n[apache-host]$ kapow server search-apache-errors\n```\n\nfinally, we can read from the just-defined endpoint:\n\n```bash\n[another-host]$ curl http://apache-host:8080/apache-errors\n[Fri Feb 01 22:07:57.154391 2019] [core:info] [pid 7:tid 140284200093440] [client 172.17.0.1:50756] AH00128: File does not exist: /usr/var/www/mysite/favicon.ico\n[Fri Feb 01 22:07:57.808291 2019] [core:info] [pid 8:tid 140284216878848] [client 172.17.0.1:50758] AH00128: File does not exist: /usr/var/www/mysite/favicon.ico\n[Fri Feb 01 22:07:57.878149 2019] [core:info] [pid 8:tid 140284208486144] [client 172.17.0.1:50758] AH00128: File does not exist: /usr/var/www/mysite/favicon.ico\n...\n```\n\n### Why *Kapow!* shines in these cases\n\n- We can share information **without having to grant SSH access** to anybody.\n- We can share information easily **over HTTP**.\n- We can effectively **limit** what gets executed.\n\n\n## Documentation\n\nYou can find the complete documentation and examples [here](https://kapow.readthedocs.io).\n\n## Security\n\nPlease consider the following\n[Security Concerns](https://kapow.readthedocs.io/en/stable/the_project/security.html#security-concerns)\n**before** using *Kapow!*\n\nIf you are not 100% sure about what you are doing we recommend not using *Kapow!*\n\n## Authors\n\n*Kapow!* is being developed by [BBVA-Labs Security team members](https://github.com/BBVA/kapow/blob/master/AUTHORS.rst).\n\n*Kapow!* is Open Source Software and available under the [Apache 2\nlicense](https://raw.githubusercontent.com/BBVA/kapow/master/LICENSE).\n\n\n## Contributions\n\nContributions are of course welcome.  See\n[CONTRIBUTING](https://raw.githubusercontent.com/BBVA/kapow/master/CONTRIBUTING.rst)\nor skim existing tickets to see where you could help out.\n\n---\n\n* [Did you spot the UUoC?](https://github.com/BBVA/kapow/issues/118) Congrats! We are hoping [to win](http://porkmail.org/era/unix/award.html) this year :)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbva%2Fkapow","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbbva%2Fkapow","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbbva%2Fkapow/lists"}