MCPcopy Index your code
hub / github.com/BBVA/kapow

github.com/BBVA/kapow @v0.7.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.7.1 ↗ · + Follow
377 symbols 1,633 edges 63 files 40 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Kapow! Logo

If you can script it, you can HTTP it.

<a href="https://github.com/BBVA/kapow/actions/workflows/test_and_release.yml"><img alt="Test status" src="https://github.com/BBVA/kapow/actions/workflows/test_and_release.yml/badge.svg" /></a>
<a href="https://goreportcard.com/badge/github.com/bbva/kapow"><img alt="Go Report" src="https://goreportcard.com/badge/github.com/bbva/kapow" /></a>
<a href="https://github.com/BBVA/kapow/issues/"><img alt="Open Issues" src="https://img.shields.io/github/issues/BBVA/kapow" /></a>
<a href="https://kapow.readthedocs.io"><img alt="Documentation" src="https://img.shields.io/readthedocs/kapow" /></a>
<a href="https://github.com/BBVA/kapow/releases"><img alt="Current Version" src="https://img.shields.io/github/v/release/BBVA/kapow?include_prereleases" /></a>

What's Kapow!

Say we have a nice cozy shell command that solves our problem. Kapow! lets us easily turn that into an HTTP API.

Let's see this with an example

We want to expose log entries for files not found on our Apache Web Server, as an HTTP API. With Kapow! we just need to write this executable script:

[apache-host]$ cat search-apache-errors
#!/usr/bin/env sh
kapow route add /apache-errors - <<-'EOF'
    cat /var/log/apache2/access.log | grep 'File does not exist' | kapow set /response/body
EOF
[apache-host]$ chmod +x search-apache-errors

and then, run it using Kapow!

[apache-host]$ kapow server search-apache-errors

finally, we can read from the just-defined endpoint:

[another-host]$ curl http://apache-host:8080/apache-errors
[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
[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
[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
...

Why Kapow! shines in these cases

  • We can share information without having to grant SSH access to anybody.
  • We can share information easily over HTTP.
  • We can effectively limit what gets executed.

Documentation

You can find the complete documentation and examples here.

Security

Please consider the following Security Concerns before using Kapow!

If you are not 100% sure about what you are doing we recommend not using Kapow!

Authors

Kapow! is being developed by BBVA-Labs Security team members.

Kapow! is Open Source Software and available under the Apache 2 license.

Contributions

Contributions are of course welcome. See CONTRIBUTING or skim existing tickets to see where you could help out.


Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Add
called by 44
internal/server/data/state.go
ServeHTTP
called by 34
internal/server/user/mux/mux.go
ErrorJSON
called by 34
internal/server/httperror/error.go
New
called by 31
internal/server/data/state.go
New
called by 30
internal/server/user/state.go
Get
called by 28
internal/server/user/state.go
get
called by 28
internal/server/user/mux/mux.go
Get
called by 22
internal/server/data/state.go

Shape

Function 335
Method 22
Struct 13
Class 4
Route 2
FuncType 1

Languages

Go93%
Python7%

Modules by API surface

internal/server/data/resource_test.go99 symbols
internal/server/user/state_test.go29 symbols
internal/server/data/resource.go20 symbols
internal/server/data/state_test.go16 symbols
internal/server/control/control_test.go16 symbols
internal/server/user/spawn/spawn_test.go15 symbols
spec/test/features/steps/steps.py13 symbols
internal/server/user/mux/mux_test.go13 symbols
internal/server/user/mux/handlerbuilder_test.go11 symbols
internal/http/request_test.go11 symbols
internal/server/user/mux/gorillize_test.go9 symbols
internal/server/user/state.go8 symbols

For agents

$ claude mcp add kapow \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page