# mkrentovskiy/eknife architecture

> Architecture diagram of the GitHub repository mkrentovskiy/eknife, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/mkrentovskiy/eknife
- Repository: https://github.com/mkrentovskiy/eknife

## Overview

eknife is a small Erlang utility library, not an application with a single end-to-end workflow. Its documented capabilities are exposed as independent helpers. The tree identifies likely module responsibilities; source excerpts were unavailable, so the graph includes only documented dependency relationships.

Main entry points: [`src/ipc/pubsub.erl`](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/pubsub.erl) (Pub/Sub), [`src/ipc/rest.erl`](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/rest.erl) (REST client), [`src/ipc/oauth2c.erl`](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/oauth2c.erl) (OAuth2 client)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_erlang_app(("Erlang application"))
node_include["Macros<br/>[eknife.hrl]"]
node_pubsub["Pub/Sub<br/>[pubsub.erl]"]
node_gproc["gproc"]
node_rest["REST client<br/>[rest.erl]"]
node_oauth["OAuth2 client<br/>[oauth2c.erl]"]
node_gun["gun"]
node_images["Image checks<br/>[images.erl]"]
node_translit["Translit and slugs<br/>[tr.erl]"]
node_utilities["General utilities<br/>[utils.erl]"]
node_casting["Type casts<br/>[cast.erl]"]
node_russian_numbers["Russian number text<br/>[ru_num_to_text.erl]"]
node_logging["Log formatter"]
node_ssh_agent["SSH agent<br/>[ssh_agent.erl]"]
node_network["Networking<br/>[network.erl]"]
node_exec["Process execution<br/>[exec.erl]"]

node_pubsub -->|"based on"| node_gproc
node_rest -->|"based on"| node_gun
node_oauth -->|"based on"| node_gun

click node_include "https://github.com/mkrentovskiy/eknife/blob/master/include/eknife.hrl"
click node_pubsub "https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/pubsub.erl"
click node_rest "https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/rest.erl"
click node_oauth "https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/oauth2c.erl"
click node_images "https://github.com/mkrentovskiy/eknife/blob/master/src/media/images.erl"
click node_translit "https://github.com/mkrentovskiy/eknife/blob/master/src/utils/tr.erl"
click node_utilities "https://github.com/mkrentovskiy/eknife/blob/master/src/utils/utils.erl"
click node_casting "https://github.com/mkrentovskiy/eknife/blob/master/src/utils/cast.erl"
click node_russian_numbers "https://github.com/mkrentovskiy/eknife/blob/master/src/lang/ru/ru_num_to_text.erl"
click node_logging "https://github.com/mkrentovskiy/eknife/blob/master/src/logger/logger_colorful_formatter.erl"
click node_ssh_agent "https://github.com/mkrentovskiy/eknife/blob/master/src/agents/ssh_agent.erl"
click node_network "https://github.com/mkrentovskiy/eknife/blob/master/src/net/network.erl"
click node_exec "https://github.com/mkrentovskiy/eknife/blob/master/src/proc/exec.erl"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_erlang_app,node_gproc,node_gun toneIndigo
class node_include,node_pubsub,node_images,node_translit,node_utilities,node_casting,node_russian_numbers,node_logging,node_ssh_agent,node_network,node_exec toneTeal
class node_rest,node_oauth toneBlue
```

## Components

### Other components

- **Erlang application**
- [Macros](https://github.com/mkrentovskiy/eknife/blob/master/include/eknife.hrl): `include/eknife.hrl`
- [Pub/Sub](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/pubsub.erl): `src/ipc/pubsub.erl`
- **gproc**
- [REST client](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/rest.erl): `src/ipc/rest.erl`
- [OAuth2 client](https://github.com/mkrentovskiy/eknife/blob/master/src/ipc/oauth2c.erl): `src/ipc/oauth2c.erl`
- **gun**
- [Image checks](https://github.com/mkrentovskiy/eknife/blob/master/src/media/images.erl): `src/media/images.erl`
- [Translit and slugs](https://github.com/mkrentovskiy/eknife/blob/master/src/utils/tr.erl): `src/utils/tr.erl`
- [General utilities](https://github.com/mkrentovskiy/eknife/blob/master/src/utils/utils.erl): `src/utils/utils.erl`
- [Type casts](https://github.com/mkrentovskiy/eknife/blob/master/src/utils/cast.erl): `src/utils/cast.erl`
- [Russian number text](https://github.com/mkrentovskiy/eknife/blob/master/src/lang/ru/ru_num_to_text.erl): `src/lang/ru/ru_num_to_text.erl`
- [Log formatter](https://github.com/mkrentovskiy/eknife/blob/master/src/logger/logger_colorful_formatter.erl): `src/logger/logger_colorful_formatter.erl`
- [SSH agent](https://github.com/mkrentovskiy/eknife/blob/master/src/agents/ssh_agent.erl): `src/agents/ssh_agent.erl`
- [Networking](https://github.com/mkrentovskiy/eknife/blob/master/src/net/network.erl): `src/net/network.erl`
- [Process execution](https://github.com/mkrentovskiy/eknife/blob/master/src/proc/exec.erl): `src/proc/exec.erl`

## Connections

- Pub/Sub → gproc: based on
- REST client → gun: based on
- OAuth2 client → gun: based on
