CLAI

Command Line Agent Interface

Pipeline architecture untuk agents yang perlu read/write/list/edit/del file atau data dari berbagai transport. Composable. Safe by default. HITL-aware.

Pipeline Architecture

Agent → CLAI → transport(input) → entity → [filter] → transport(output) → result

Composable

Setiap layer bisa di-swap. Ganti transport dari local ke SSH tanpa ubah entity atau filter.

Safe by Default

Entity selalu deploy ke filter safety. env → temp, write → backup. Tanpa flag tambahan.

HITL Contract

--hitl flag mengaktifkan Human-In-The-Loop contract. Level: AUTO, CONFIRM, EDITABLE, BLOCK.

140 Tests

Core pipeline, transport adapters, filter adapters, dan CLAI operations — semua covered.

3 Layers

Transport

I/O layer — baca/tulis data dari berbagai sumber:

local · ssh · http · github · gitlab · stdout · file · email

Entity

Data format layer — representasi data terstruktur:

env · pm2 · json

Filter

Transform layer — proses data sebelum output:

--json · --grep · --redact · --temp · --backup · --hitl

Pipeline Diagram

tr(input) → entity → [filter] → tr(output)

Setiap stage adalah composable adapter. Filter bersifat opsional dan bisa di-stack.

Safety Design

Transactional Backup

env → temp — backup sebelum ubah environment variables. Disable dengan --no-temp.

History Backup

write → backup — backup sebelum tulis file. Disable dengan --no-backup.

HITL Gates

Level kontrol manusia: AUTO (jalan terus), CONFIRM (minta izin), EDITABLE (edit dulu), BLOCK (tolak).

Entity → Safety

Entity layer selalu deploy ke filter safety. Ini bukan opt-in — ini default behavior.

CLAI Operations

list   — daftar file/directory
read   — baca isi file
edit   — modifikasi file yang ada
add    — buat file/directory baru
del    — hapus file/directory

Setiap operasi melewati pipeline penuh: transport → entity → filter → transport.

Source Code

# Coming soon to npm
# Source: https://github.com/yus-ham/maintenis

Lihat juga: GitHub · Docs