Smara-CLI

module
v1.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2026 License: MIT

README ยถ

Smara CLI ๐ŸŒ€

Autonomous Multi-Agent Terminal v1.10.0

Go Version License Latest Release

Smara (Sanskerta: เคธเฅเคฎเฅƒเคคเคฟ โ€” Ingatan) adalah terminal pintar berbasis Go yang mengorkestrasi agen AI otonom dengan memori tim yang tersinkronisasi dan integrasi MCP (Model Context Protocol).


โœจ Fitur Utama

  • Multi-Agent System: Arsitektur Supervisor-Worker untuk pendelegasian tugas yang kompleks.
  • 3 Mode Agen:
    • ask (๐Ÿ’ฌ): Tanya-jawab cepat tanpa tools.
    • rush (โšก): Eksekusi cepat, langsung bertindak menggunakan tools.
    • plan (๐Ÿ“‹): Membuat rencana dan meminta persetujuan sebelum eksekusi.
  • ๐ŸŽจ Crush TUI Design: Antarmuka terminal ultra-minimalis dengan palet warna Pastel Green yang premium.
  • ๐ŸŽฌ Live Generate Animation:
    • Phase Tracking Pipeline: Visual pipeline fase otomatis (Thinking โ†’ Analyzing โ†’ Exploring โ†’ Generating) dengan deskripsi real-time.
    • Animated Thinking: Spinner dots interaktif dengan rotasi fase.
    • Real-time Stats: Timer elapsed dan statistik penggunaan token (In/Out) yang persisten.
    • Streaming Cursor: Feedback visual real-time saat teks sedang di-generate.
    • Tool Call Visualization: Tampilan langsung saat agen mengeksekusi tool (โ–ธ) dan menerima hasil (โ—‚).
  • ๐Ÿ”€ Message Selection & Clipboard: Ctrl+S untuk menyeleksi pesan historis, Enter/C untuk copy ke clipboard. Ctrl+V untuk paste dari clipboard.
  • ๐ŸŒ MCP Auto-Discovery: Auto-load MCP servers dari konfigurasi Windsurf IDE, OpenCode, dan file konfigurasi Smara-native secara paralel.
  • ๐Ÿ›œ Remote MCP Support: Koneksi ke MCP server remote via SSE/WebSocket (mcp.NewRemoteClient).
  • Platform Integration: Jalankan Smara sebagai bot di Telegram, Discord, dan WhatsApp.
  • Multi-Provider LLM: Mendukung Ollama (local), Anthropic, OpenAI, dan OpenRouter.
  • ๐Ÿ“ฆ Workspace Management: Isolasi proyek, memori, dan sesi antar ruang kerja yang berbeda.
  • ๐Ÿง  Smart Memory v2: Hybrid Search, Versioning, dan Categorization untuk basis pengetahuan agen.
  • ๐Ÿ“Š Dashboard Monitoring: TUI real-time untuk memantau metrik platform, LLM, dan MCP.
  • ๐Ÿ–ฅ๏ธ SSH Remote Control: Kelola VPS/Server langsung dari agen โ€” ssh_exec, ssh_view_file, ssh_list_dir sebagai built-in agent tools.
  • ๐Ÿ‘ค User Profile: Profil adaptif pengguna (verbosity, risk tolerance, primary domains) yang diinject ke system prompt.
  • โฐ Nudge System: Scheduled prompts/reminders dengan ekspresi cron untuk tugas rutin.
  • ๐Ÿ›ก๏ธ Two-Step Safety: Plan Mode (read-only) vs Build Mode (read-write) dengan Auto-Revert jika eksekusi gagal.
  • ๐Ÿ” LSP Integration: Language Server Protocol untuk Go, TypeScript, Python, dan Rust.
  • ๐Ÿ“œ Dedicated Audit Log: Logging terstruktur JSON Lines untuk semua tindakan agen.
  • Auto-Update: Sistem pembaruan otomatis bawaan menggunakan perintah smara update.

๐ŸŽจ TUI Experience

Smara CLI menggunakan sistem desain Crush yang mengutamakan estetika dan kejelasan informasi:

  • Pastel Palette: Dominasi warna hijau muda (#bef264) pada background gelap untuk kontras tinggi dan kelelahan mata rendah.
  • Harmonica Physics: Sidebar dan transisi UI menggunakan animasi spring physics yang organik.
  • Completion Footer: Detail model dan performa (durasi, token) disematkan rapi di bawah setiap respons agen.
  • Phase Pipeline: Progress bar visual yang menampilkan fase kognitif agen secara real-time.
  • Fade Wave Animation: Efek gelombang transisi antar fase untuk pengalaman visual yang halus.

๐Ÿš€ Instalasi Cepat

Linux / macOS
curl -fsSL https://raw.githubusercontent.com/gede-cahya/Smara-CLI/main/install.sh | sh
Windows (PowerShell)
irm https://raw.githubusercontent.com/gede-cahya/Smara-CLI/main/install.ps1 | iex

๐Ÿ“– Panduan Penggunaan

Untuk melihat panduan interaktif langsung di terminal, jalankan:

smara guide
1. Login ke Provider

Gunakan perintah login untuk menyimpan API key secara aman:

smara login
2. Pilih Model
smara provider select

๐Ÿ“ฆ Workspace & Proyek

Gunakan workspace untuk memisahkan konteks antar proyek:

smara workspace create "Project X"
smara workspace use "Project X"
smara workspace list

๐Ÿ–ฅ๏ธ SSH Remote Control (Agent Tools)

Agen dapat mengeksekusi perintah di VPS/Server langsung dari percakapan:

# Tambah host SSH
smara ssh add-host prod --host 192.168.1.1 --user ubuntu --key ~/.ssh/id_rsa

# Eksekusi perintah remote
smara ssh exec prod "docker ps -a"

# Sesi SSH interaktif
smara ssh connect prod

# Generate key pair
smara ssh keygen --name deploy-key --type ed25519

# Riwayat eksekusi
smara ssh logs --limit 20

Saat smara start, agen otomatis mendapatkan konteks semua host SSH yang tersimpan di system prompt.


๐Ÿ“Š Monitoring Dashboard

Pantau aktivitas bot dan performa agen secara real-time:

smara dashboard

Gunakan flag --once untuk snapshot cepat atau --refresh 5s untuk mengatur interval.


๐Ÿง  Manajemen Memori

Kelola basis pengetahuan agen Anda:

# Pencarian Hybrid (Semantic + Keyword)
smara memory search "cara deploy nextjs" --hybrid

# Kelola Kategori
smara category create "Coding" --description "Snippet dan tutorial"
smara category list

# Versi & Rollback
smara memory history [ID]
smara memory rollback [ID] [VersionID]

# Backup & Restore
smara memory export backup.zip --format zip
smara memory import backup.zip

๐ŸŒ Smara Serve (Platform Bot)

Smara dapat dijalankan sebagai layanan bot yang aktif terus-menerus.

# Jalankan semua platform yang dikonfigurasi
smara serve

# Jalankan platform spesifik dengan mode default 'plan'
smara serve --platform telegram --mode plan
๐Ÿค– Perintah Bot Messaging:
  • /ask <prompt> โ€” Kirim pertanyaan cepat.
  • /mode <ask|rush|plan> โ€” Ganti mode agen.
  • /mcp โ€” Lihat daftar tool yang tersedia.
  • /clear โ€” Reset sesi percakapan.

๐Ÿ› ๏ธ Perintah CLI Lainnya

  • smara start: Mulai sesi interaktif TUI.
  • smara provider list: Lihat provider yang tersedia.
  • smara config list: Cek konfigurasi saat ini.
  • smara update: Perbarui ke versi terbaru.
  • smara version: Tampilkan informasi versi.
  • smara ssh: Manajemen VPS via SSH (add-host, exec, connect, keygen, logs).
  • smara skill: Kelola reusable automation skill (create, run, list, delete).
  • smara explore: Eksplorasi struktur proyek secara visual.

โš™๏ธ Konfigurasi Detail (config.yaml)

provider: anthropic
model: claude-3-5-sonnet-latest
ollama_host: http://localhost:11434
platforms:
  telegram:
    enabled: true
    token: "YOUR_TOKEN"
    allowed_users: ["12345678"]
  discord:
    enabled: true
    token: "YOUR_TOKEN"
    allowed_roles: ["smara-user"]
  whatsapp:
    enabled: true

๐Ÿ“„ Lisensi

MIT License - ยฉ 2026 Gede Cahya.

Directories ยถ

Path Synopsis
cmd
smara command
Smara CLI โ€” Autonomous Multi-Agent Terminal Entry point for the smara binary.
Smara CLI โ€” Autonomous Multi-Agent Terminal Entry point for the smara binary.
internal
agent
Package agent provides the multi-agent system for Smara.
Package agent provides the multi-agent system for Smara.
audit
Package audit provides structured logging of all agent actions for observability.
Package audit provides structured logging of all agent actions for observability.
autonomy
Package autonomy implements the Multi-Timeframe Autonomy Loop (Heartbeat) with Hold State capability for Smara CLI.
Package autonomy implements the Multi-Timeframe Autonomy Loop (Heartbeat) with Hold State capability for Smara CLI.
cognitive
Package cognitive provides strict JSON Schema validation for tool function calling, enforcing the Cognitive Layer's precision requirement (Hermes concept).
Package cognitive provides strict JSON Schema validation for tool function calling, enforcing the Cognitive Layer's precision requirement (Hermes concept).
config
Package config manages Smara CLI configuration via Viper.
Package config manages Smara CLI configuration via Viper.
integrations
Package integrations wires together all new PRD features: Safety, Autonomy, Sandbox, LSP, Memory Compaction, and Audit Log.
Package integrations wires together all new PRD features: Safety, Autonomy, Sandbox, LSP, Memory Compaction, and Audit Log.
llm
Package llm provides LLM provider abstractions for Smara CLI.
Package llm provides LLM provider abstractions for Smara CLI.
lsp
Package lsp provides Language Server Protocol integration for Smara CLI.
Package lsp provides Language Server Protocol integration for Smara CLI.
mcp
Package mcp - opencode.go loads MCP server configurations from OpenCode's config file.
Package mcp - opencode.go loads MCP server configurations from OpenCode's config file.
memory
Package memory provides auto-compacting functionality to prevent context window overflow.
Package memory provides auto-compacting functionality to prevent context window overflow.
platform
Package platform provides the multi-platform integration layer for Smara CLI.
Package platform provides the multi-platform integration layer for Smara CLI.
platform/discord
Package discord provides the Discord Bot adapter for Smara.
Package discord provides the Discord Bot adapter for Smara.
platform/telegram
Package telegram provides the Telegram Bot API adapter for Smara.
Package telegram provides the Telegram Bot API adapter for Smara.
platform/whatsapp
Package whatsapp provides the WhatsApp adapter for Smara using the whatsmeow library.
Package whatsapp provides the WhatsApp adapter for Smara using the whatsmeow library.
safety
Package safety implements the Two-Step Safety layer (Plan Mode vs Build Mode) and Auto-Revert functionality for Smara CLI.
Package safety implements the Two-Step Safety layer (Plan Mode vs Build Mode) and Auto-Revert functionality for Smara CLI.
sandbox
Package sandbox provides isolated command execution with safety guards for Smara CLI's terminal operations.
Package sandbox provides isolated command execution with safety guards for Smara CLI's terminal operations.
session
Package session provides session types used across agent and memory packages.
Package session provides session types used across agent and memory packages.
ssh
sync
Package sync implements local background sync for shared team memory.
Package sync implements local background sync for shared team memory.
ui
Package ui provides the interactive terminal REPL for Smara.
Package ui provides the interactive terminal REPL for Smara.
ui/clipboard
Package clipboard provides terminal clipboard integration via OSC52.
Package clipboard provides terminal clipboard integration via OSC52.
pkg
agent
Package agent provides the multi-agent system for Smara.
Package agent provides the multi-agent system for Smara.
audit
Package audit re-exports the audit logger for public use.
Package audit re-exports the audit logger for public use.
autonomy
Package autonomy re-exports the autonomy engine for public use.
Package autonomy re-exports the autonomy engine for public use.
cognitive
Package cognitive re-exports the cognitive schema validator for public use.
Package cognitive re-exports the cognitive schema validator for public use.
config
Package config manages Smara CLI configuration via Viper.
Package config manages Smara CLI configuration via Viper.
integrations
Package integrations re-exports the integrations engine for public use.
Package integrations re-exports the integrations engine for public use.
llm
Package llm provides LLM provider abstractions for Smara CLI.
Package llm provides LLM provider abstractions for Smara CLI.
lsp
Package lsp re-exports the LSP client for public use.
Package lsp re-exports the LSP client for public use.
mcp
Package mcp - opencode.go loads MCP server configurations from OpenCode's config file.
Package mcp - opencode.go loads MCP server configurations from OpenCode's config file.
memory
Package memory provides SQLite-backed memory storage with vector search for Smara.
Package memory provides SQLite-backed memory storage with vector search for Smara.
platform
Package platform provides the multi-platform integration layer for Smara CLI.
Package platform provides the multi-platform integration layer for Smara CLI.
platform/discord
Package discord provides the Discord Bot adapter for Smara.
Package discord provides the Discord Bot adapter for Smara.
platform/telegram
Package telegram provides the Telegram Bot API adapter for Smara.
Package telegram provides the Telegram Bot API adapter for Smara.
platform/whatsapp
Package whatsapp provides the WhatsApp adapter for Smara using the whatsmeow library.
Package whatsapp provides the WhatsApp adapter for Smara using the whatsmeow library.
safety
Package safety re-exports the safety engine for public use.
Package safety re-exports the safety engine for public use.
sandbox
Package sandbox re-exports the sandbox for public use.
Package sandbox re-exports the sandbox for public use.
session
Package session provides session types used across agent and memory packages.
Package session provides session types used across agent and memory packages.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL