Smara-CLI

module
v1.9.0 Latest Latest
Warning

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

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

README ยถ

Smara CLI ๐ŸŒ€

Autonomous Multi-Agent Terminal v1.8.9

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:
    • Animated Thinking: Spinner dots interaktif dengan rotasi fase (Thinking โ†’ Analyzing โ†’ Planning).
    • Real-time Stats: Timer elapsed dan statistik penggunaan token (In/Out) yang persisten.
    • Streaming Cursor: Feedback visual real-time saat teks sedang di-generate.
  • 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.
  • Auto-Update: Sistem pembaruan otomatis bawaan menggunakan perintah smara update.

๐ŸŽจ TUI Experience

Smara CLI kini 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.

๐Ÿš€ 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

๐Ÿ“Š 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.

โš™๏ธ 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.
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.
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