File size: 3,113 Bytes
3b70664
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#+TITLE: Nekomata 猫又
#+SUBTITLE: Infrastructure that rewrites itself.
#+AUTHOR: Ahmad Ali Parr Γ— SnapKitty Collective
#+LICENSE: AGPL-3.0

* What is Nekomata?

Nekomata is the first AI-native container engine built from first principles.
Not a Kubernetes alternative. A Kubernetes replacement.

The Nekomata (猫又) is a supernatural cat with two tails: code and data.
In Common Lisp, these are the same thing. Infrastructure is code.
Code is alive. It evaluates. It transforms. It rewrites itself.

* Why not Kubernetes?

Kubernetes was designed in 2014, before LLMs, before sparse MoEs,
before we understood that code should be data. It is a YAML configuration
engine running on a distributed key-value store. It is 50B of technical
debt masquerading as infrastructure.

* First Principles

| Kubernetes Assumption        | Nekomata First Principle              |
|------------------------------+---------------------------------------|
| Infrastructure is YAML       | Infrastructure is s-expressions       |
| Monolithic control plane     | Sparse mixture of experts             |
| Immutable containers         | Live REPL injection                   |
| Reactive watch loops         | Predictive LLM→ASM compilation        |
| Networking is afterthought   | Regex mathematics at socket layer     |

* Quick Start

#+BEGIN_SRC lisp
(ql:quickload :nekod)
(nekod:nekomata-main)
#+END_SRC

* Container DSL

Infrastructure expressed as s-expressions. A container is a Lisp form.
It evaluates. It transforms. It rewrites itself.

#+BEGIN_SRC lisp
(nekod:define-container my-app
  :image "nginx:latest"
  :ports '((8080 . 80))
  :env '((:NODE_ENV . "production"))
  :restart-policy :always)
#+END_SRC

* Self-Healing with Failover Chains

#+BEGIN_SRC lisp
(nekod:with-failover my-app my-app-replica my-app-standby)
#+END_SRC

* Repo Layout

#+BEGIN_EXAMPLE
nekod/
β”œβ”€β”€ nekod.asd          ← ASDF system definition
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ package.lisp      ← Package definitions
β”‚   β”œβ”€β”€ conditions.lisp   ← Error hierarchy + restarts
β”‚   β”œβ”€β”€ sexpr-infra.lisp  ← Container DSL macros + JSON serialization
β”‚   β”œβ”€β”€ eval-loop.lisp    ← Nekomata REPL
β”‚   β”œβ”€β”€ image-persist.lisp← State snapshot save/restore
β”‚   └── nekomata.lisp     ← Top-level entry point + registry
└── docker/
    β”œβ”€β”€ unix-sock.lisp    ← Raw Unix socket interface
    β”œβ”€β”€ protocol.lisp     ← HTTP/1.1-over-Unix encoder/decoder
    β”œβ”€β”€ container.lisp    ← Container lifecycle (create/start/stop/kill/list)
    β”œβ”€β”€ image.lisp        ← Image management (pull/list/tag/prune)
    β”œβ”€β”€ network.lisp      ← Network management (create/connect/disconnect)
    β”œβ”€β”€ volume.lisp       ← Volume management (create/mount/prune)
    └── inspect.lisp      ← Container and stats inspection
#+END_EXAMPLE

* License

AGPL-3.0 β€” Free to use, modify, and distribute.
Cloud providers who SaaS-ify this must contribute back.
This is the poison pill.