New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

@zensation/cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@zensation/cli

ZenAI CLI Agent — Terminal interface with Memory, Knowledge Graph and Agent System

Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
136
871.43%
Maintainers
1
Weekly downloads
 
Created
Source

@zenai/cli

ZenAI in your Terminal -- an AI agent for knowledge work, powered by Claude.

@zenai/cli brings the full power of ZenAI to the command line: an interactive REPL with tool execution, filesystem access, and optional backend integration for persistent Memory, Knowledge Graph, and RAG retrieval.

Features

  • Interactive REPL -- conversational agent loop with streaming responses
  • One-shot mode -- pipe tasks directly: zenai "summarize this project"
  • 6 Filesystem Tools -- read, write, edit files; list directories; search content; run commands
  • Backend Bridge -- connect to a ZenAI backend for Memory (remember/recall), Knowledge Graph, and Idea Search
  • Project Detection -- auto-detects 11 project types (TypeScript, Python, Rust, Go, etc.)
  • Session Persistence -- conversation history saved to .zenai/ for continuity across sessions

Installation

npm install -g @zenai/cli

Requires Node.js 18 or later.

Quick Start

# Start interactive REPL
zenai

# One-shot mode
zenai "what files are in this project?"

# With backend connection
ZENAI_BACKEND_URL=http://localhost:3000 zenai

Environment Variables

VariableRequiredDefaultDescription
ANTHROPIC_API_KEYYes--Claude API key
ZENAI_MODELNoclaude-sonnet-4-20250514Model to use
ZENAI_MAX_TOKENSNo4096Max response tokens
ZENAI_MAX_ITERATIONSNo25Max agent loop iterations
ZENAI_BACKEND_URLNo--ZenAI backend URL for Memory/KG
ZENAI_BACKEND_API_KEYNo--API key for backend access

REPL Commands

CommandDescription
/clearClear conversation history
/statusShow session info and tool availability
exitEnd session

Tools

The agent has access to 6 filesystem tools, executed locally:

ToolDescription
read_fileRead file contents with line numbers
write_fileCreate or overwrite a file
edit_fileApply targeted edits to existing files
list_filesList directory contents with glob support
search_contentSearch file contents with regex patterns
run_commandExecute shell commands with timeout

When connected to a ZenAI backend, additional tools become available:

  • remember / recall -- persistent memory across sessions
  • search_ideas -- semantic search over your knowledge base
  • web_search -- web search via backend proxy

Architecture

The CLI follows the Claude Code agent loop pattern: a single-threaded loop that sends messages to Claude, executes tool calls, feeds results back, and repeats until the model produces a final text response or the iteration limit is reached.

User Input --> Agent Loop --> Claude API
                  ^              |
                  |         Tool Calls
                  |              |
              Tool Results <-- Execute

Session state and conversation history persist in .zenai/ within your project directory.

License

Apache-2.0. See LICENSE for details.

Keywords

ai

FAQs

Package last updated on 28 Mar 2026

Related posts