Install
$ agentstack add mcp-sir-chawakorn-sanook-cli Open-source listing, not yet scanned by AgentStack. Follow the source repository for install instructions.
Security review
β Flagged1 finding(s); flagged for manual review. Β· v0.1.0 How review works β
- β’ Prompt-injection patterns
- β’ Secret / credential exfiltration
- β’ Dangerous shell & filesystem operations
- β’ Untrusted network calls
- β’ Known-malicious package signatures
- high Pipes remote content directly into a shell (remote code execution).
What it can access
- β Network access Used
- β Filesystem access No
- β Shell / process execution No
- β Environment & secrets Used
- β Dynamic code execution No
From automated source analysis of v0.1.0. βUsedβ means the capability is present in the source β more access means more to trust, not that itβs unsafe.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work βAbout
Sanook CLI
The terminal AI coding agent with a memory that outlives the session.
Bring your own key Β· 9 providers Β· MCP Β· Obsidian second brain Β· gateway & cron
πΉπ ΰΈΰΉΰΈ²ΰΈΰΈ ΰΈ²ΰΈ©ΰΈ²ΰΉΰΈΰΈ’
Install Sanook CLI
Pick one command below β all roads lead to sanook. Requires Node.js β₯ 22 Β· node -v to check Β· npx sanook doctor auto-fixes PATH / Node issues
π macOS Β· π§ Linux Β· WSL
Recommended β npm
npm install -g sanook-cli
# or run once without installing:
npx sanook-cli
One-liner install script (checks Node, then installs via npm)
# GitHub raw (default)
curl -fsSL https://raw.githubusercontent.com/Sir-chawakorn/sanook-cli/main/scripts/install.sh | bash
# GitHub Pages mirror
curl -fsSL https://sir-chawakorn.github.io/sanook-cli/install.sh | bash
# jsDelivr CDN
curl -fsSL https://cdn.jsdelivr.net/gh/Sir-chawakorn/sanook-cli@main/scripts/install.sh | bash
Homebrew
brew trust Sir-chawakorn/tap # once on newer Homebrew
brew tap Sir-chawakorn/tap
brew install sanook-cli
πͺ Windows
Recommended β npm (PowerShell or cmd)
npm install -g sanook-cli
# or:
npx sanook-cli
One-liner install script
# GitHub raw (default)
irm https://raw.githubusercontent.com/Sir-chawakorn/sanook-cli/main/scripts/install.ps1 | iex
# GitHub Pages mirror
irm https://sir-chawakorn.github.io/sanook-cli/install.ps1 | iex
WinGet (after PR #391114 merges)
winget install Sanook.SanookCLI
Portable zip (no WinGet yet): sanook-cli-win-x64.zip
π All install methods β status & links
| Method | Command | Status | |--------|---------|--------| | npm / npx | npm install -g sanook-cli | β
npm Β· latest 0.5.7 | | curl \| bash | curl -fsSL β¦/install.sh \| bash | β
raw Β· Pages Β· jsDelivr | | irm \| iex | irm β¦/install.ps1 \| iex | β
raw Β· Pages | | Homebrew | brew tap Sir-chawakorn/tap && brew install sanook-cli | β
homebrew-tap | | GitHub Pages | curl -fsSL https://sir-chawakorn.github.io/sanook-cli/install.sh \| bash | β
Live | | WinGet | winget install Sanook.SanookCLI | β³ PR #391114 Β· CLA signed Β· release zip ready | | sanook.ai (optional short URL) | curl -fsSL https://sanook.ai/install.sh \| bash | β³ DNS at GoDaddy β run bash scripts/configure-sanook-ai-dns.sh |
Full maintainer guide: [docs/INSTALLINFRA.md](docs/INSTALLINFRA.md)
> Troubleshooting > > | Symptom | Fix | > |---------|-----| > | 'sanook' is not recognized | You ran npm i sanook-cli without -g β reinstall with npm install -g sanook-cli, or use npx sanook | > | Node too old | Install Node β₯ 22 Β· scripts refuse older versions | > | Homebrew refuses tap | Run brew trust Sir-chawakorn/tap once, then retry | > | Not sure what's wrong | npx sanook doctor β prints OS-specific fixes (incl. Windows PATH one-liner) |
First run β setup wizard & API key
Install Β· Quickstart Β· Memory Β· Persona Β· Dashboard Β· Providers Β· Usage Β· Gateway Β· MCP Β· Security
Overview
> Close the terminal. Come back tomorrow. Sanook still knows what you decided.
Sanook is a transparent coding agent for your terminal β one loop, no magic:
prompt β LLM β tool call β result β loop β answer
Wrapped in the things real work needs: a permission gate, structured memory across sessions, a long-running gateway with cron and chat channels, on-demand skills, MCP servers, and first-class git awareness.
BYOK by design. Every provider uses a direct API key from that provider's console β Sanook never reuses OAuth or subscription credentials, because that violates provider terms and gets accounts banned.
How it compares
The agent loop, BYOK, and MCP are table stakes now. What Sanook has that the big vendor CLIs don't is memory that survives the session β a structured Obsidian "second brain" the agent reads at the start of every run.
| | Sanook | Claude Code | Codex CLI | Gemini CLI | |---|:---:|:---:|:---:|:---:| | Open-source | β | β | β | β | | Bring your own key | β | β | β | β | | Providers | 9 | 1 | 1 | 1 | | Local models (Ollama / LM Studio) | β | β | β | β | | MCP (stdio + remote HTTP) | β | β | β | β | | OS sandbox (Seatbelt / bubblewrap) | β | β | β | β | | Checkpoint / rewind | β | β | β | β | | Image / vision input | β | β | β | β | | Prompt caching | β | β | β | β | | Durable cross-session memory | β | β | β | β | | Local gateway + cron + messaging | β | β | β | β |
On raw benchmark scores the frontier vendors win β Sanook's bet is portability + persistent memory, not beating Opus on SWE-bench. Use whatever fits; this one remembers.
Memory & second brain
Sanook does not dump everything into one folder. Memory is layered β some lives in your Obsidian vault, some in ~/.sanook/ for speed and resume. Both are wired together at runtime.
flowchart LR
START([Startsanook / gateway / cron / resume]):::start
CFG["Load config~/.sanook/config.json"]:::local
MODE{"brainPath is setand vault is reachable?"}:::gate
LOCALONLY([Fallback endanswer works with local session + usage only]):::warn
subgraph read["1. Read path Β· gather memory before the turn"]
direction TB
HIER["Hierarchical SANOOK.mdglobal -> repo -> cwd instructions"]:::inject
AM["Auto-memory~/.sanook/memory/memory.json"]:::local
RESUME["Resume context~/.sanook/sessions/*.json"]:::local
HOT["Vault hot filesAI-Context-Index + current-state + inbox"]:::vault
PROJECT["Project hot contextProjects/<slug>/ matched from cwd"]:::vault
PACK["Context packShared/Context-Packs/*.md selected by task"]:::vault
SEARCH["Per-turn retrievalsearch/index.json over vault + memory + sessions + skills"]:::local
end
subgraph inject["2. Injection Β· build the model input"]
direction TB
STATIC["Static brain blockstable context injected at session start"]:::inject
RECALLED["Recalled context blockfresh matches for this prompt"]:::inject
SYS["System promptpolicy + tools + memory + repo state"]:::inject
USER["User promptor incoming gateway message"]:::process
end
subgraph loop["3. Agent loop Β· act, observe, answer"]
direction TB
LLM["LLM reasoning step"]:::process
NEED{"Need tools?"}:::gate
TOOLS["Tool callsfiles, shell, git, MCP, skills"]:::process
RESULT["Tool resultsfed back into context"]:::process
ANSWER["Final answerterminal or gateway reply"]:::finish
end
subgraph write["4. Write-back Β· make the next session smarter"]
direction TB
REMEMBER["remember toolredact -> merge -> rank"]:::write
MEMJSON["Persist auto-memorymemory.json + MEMORY.md mirror"]:::write
INBOX["Append candidate factShared/Memory-Inbox/memory-inbox.md"]:::write
WORKLOG["Append daily worklogSessions/YYYY-MM-DD-worklog.md"]:::write
CHAT["Append full transcriptSessions/*-chat.md when enabled"]:::write
SESSION["Save session JSON~/.sanook/sessions/*.json"]:::write
USAGE["Record usage~/.sanook/usage/events.jsonl"]:::write
INDEX["Re-index changed sourcessanook index -> search/index.json"]:::write
END([Endanswer returned + memory ready for resume/retrieval]):::finish
end
START -->|entrypoint starts| CFG
CFG --> MODE
MODE -->|yes| HOT
MODE -->|no vault path| LOCALONLY
CFG --> AM
CFG --> RESUME
CFG --> SEARCH
HIER --> STATIC
AM --> STATIC
HOT --> STATIC
PROJECT --> STATIC
PACK --> RECALLED
RESUME --> RECALLED
SEARCH --> RECALLED
STATIC --> SYS
RECALLED --> SYS
USER --> LLM
SYS -->|injected every turn| LLM
LLM --> NEED
NEED -->|yes| TOOLS
TOOLS --> RESULT
RESULT --> LLM
NEED -->|no| ANSWER
LLM -->|durable fact found| REMEMBER
REMEMBER --> MEMJSON
REMEMBER --> INBOX
ANSWER --> WORKLOG
ANSWER --> CHAT
ANSWER --> SESSION
ANSWER --> USAGE
MEMJSON --> INDEX
INBOX --> INDEX
WORKLOG --> INDEX
CHAT --> INDEX
SESSION --> INDEX
ANSWER --> END
classDef start fill:#064e3b,stroke:#34d399,color:#ffffff,stroke-width:3px
classDef finish fill:#0f766e,stroke:#5eead4,color:#ffffff,stroke-width:3px
classDef gate fill:#7c2d12,stroke:#fdba74,color:#ffffff,stroke-width:2px
classDef local fill:#172554,stroke:#60a5fa,color:#ffffff
classDef vault fill:#312e81,stroke:#a78bfa,color:#ffffff
classDef inject fill:#164e63,stroke:#22d3ee,color:#ffffff
classDef process fill:#1f2937,stroke:#94a3b8,color:#ffffff
classDef write fill:#78350f,stroke:#fbbf24,color:#ffffff
classDef warn fill:#7f1d1d,stroke:#fca5a5,color:#ffffff,stroke-width:2px
How to read the flow: green nodes mark start/end, orange diamonds are decisions, blue nodes are local runtime state, purple nodes live inside the Obsidian-style vault, cyan nodes are injected into the system prompt, dark nodes are the active agent loop, amber nodes write memory back after/during the turn, and the red node is the safe fallback when no vault is configured.
What goes where
| Data | Stored at | When | Purpose | |---|---|---|---| | Worklog | {brainPath}/Sessions/YYYY-MM-DD-worklog.md | After every agent turn (REPL + headless) | Daily trace of prompts & cost summary | | Full transcript (opt-in) | {brainPath}/Sessions/YYYY-MM-DD--chat.md | After every turn, when brainTranscript is on | The actual conversation β your prompt and the AI's reply | | Session note | {brainPath}/Sessions/YYYY-MM-DD--session.md | On REPL exit (/quit or Ctrl+C at empty prompt) | AI/heuristic summary + key facts | | Memory inbox | {brainPath}/Shared/Memory-Inbox/memory-inbox.md | When the agent calls remember | Candidate facts for vault curation | | Project workspace | {brainPath}/Projects// | Setup wizard / sanook brain init links your repo | Project-scoped notes & hot context | | Persona profile | {brainPath}/Shared/User-Persona/persona.md | sanook persona or /persona in REPL | Who you are + how you want the agent to work | | Auto-memory | ~/.sanook/memory/memory.json | When the agent calls remember, or sanook persona (protected) | Structured facts (merge, rank, inject) | | Session JSON | ~/.sanook/sessions/*.json | Every turn | --continue / --resume transcript | | Search index | ~/.sanook/search/ | sanook index (incremental) | BM25 / hybrid retrieval | | Usage ledger | ~/.sanook/usage/events.jsonl | Every turn | Token/cost tracking β not semantic memory |
Read at session start: hierarchical SANOOK.md (global β project root β cwd), auto-memory block, vault hot files (AI-Context-Index, current-state, inbox, matched Projects//), plus per-turn retrieval over vault + memory + past sessions.
Setup links your repo to the vault: the first-run wizard (or sanook brain init) saves brainPath in ~/.sanook/config.json, scaffolds Projects// inside the vault, and creates SANOOK.md in your repo if missing.
sanook brain init # pick vault folder + identity
sanook brain context # inspect what gets injected from cwd
sanook brain projects list # vault projects β repo paths
sanook memory stats # auto-memory store overview
sanook usage daily # token/cost ledger (ccusage-style)
Want the entire conversation in your vault? Turn on full transcripts β every prompt and reply is appended to Sessions/*-chat.md per session:
sanook config set brainTranscript on # or env: SANOOK_BRAIN_TRANSCRIPT=1
> It is opt-in because verbatim transcripts of long coding sessions grow a vault fast. Worklog (always on) keeps a lighter daily trace; the full transcript is the complete record.
Disable persistence: SANOOK_DISABLE_PERSISTENCE=1 Β· worklog only: SANOOK_DISABLE_WORKLOG=1 Β· usage ledger: SANOOK_DISABLE_USAGE=1
Quickstart
Already installed? Jump straight to setup β see [Install](#install) if you haven't yet.
Run the setup wizard or set an API key manually:
sanook setup # provider + model wizard; offers to create a second brain
sanook model # re-run provider/model setup later
sanook persona # tell the agent who you are + how you like to work
sanook auth add anthropic --api-key sk-ant-... --use
export ANTHROPIC_API_KEY=sk-ant-... # macOS / Linux
setx ANTHROPIC_API_KEY "sk-ant-..." # Windows (export won't work in cmd) β then open a NEW terminal
sanook "read package.json and list the dependencies"
Run sanook with no task to drop into an interactive REPL. On the very first run with no key configured, a setup wizard walks you through picking a provider, pasting a key, and choosing a model.
sanook # interactive REPL
sanook "fix the failing test" # one-shot, headless
sanook chat -q "fix the failing test" --provider anthropic
sanook -z "summarise the diff" # one-shot, final output only
sanook --json "..." # JSONL output for CI / scripts
sanook status # redacted provider/key/brain/gateway status
sanook web status # true web-search/fetch readiness + grounding policy
sanook sessions # list saved sessions for this project
sanook --resume "continue here"
sanook dump # support snapshot; raw secrets are never printed
Features
| Area | What you get | |---|---| | Agent loop | Built on the Vercel AI SDK 6 (streamText + stopWhen + fullStream), with streamed output, a cost meter, a budget cap, Anthropic prompt caching on the static preamble, and rate-limit-aware retry/backoff (distinct from auth failures) with model fallback. | | Tools | read_file Β· write_file Β· edit_file (multi-tier matcher) Β· list_dir Β· glob Β· grep Β· run_bash Β· run_python Β· run_rust, plus git tools β gated by a permission layer that denies destructive commands, protected paths, and paths outside the workspace/brain by default. Non-bash tools are timeout-guarded so a runaway read/grep can't hang the loop. | | Sandbox | run_bash is confined by an OS sandbox β Seatbelt on macOS, bubblewrap on Linux β so shell writes stay inside the workspace/brain/tmp (reads + network unaffected). Opt out with SANOOK_NO_SANDBOX=1. | | Approval | ask mode is the default and prompts y/n before any file write or shell command. --yes for auto-approve; headless ask-mode safely denies mutations when no approval UI exists. | | Input | Multiline editing, β/β persisted prompt history, readline keys (Ctrl-A/E/U/K/W), and @file mentions that inline a file's contents (or attach an image for vision-capable models). | | Checkpoint | A shadow-git snapshot is taken before each turn; /rewind restores the files and truncates the conversation β recoverable (it stashes the current state first). | | Memory | Layered memory: remember / recall, hierarchical `
β¦
Source & license
This open-source MCP server is cataloged on AgentStack and links to its original source β we do not rehost the code.
- Author: Sir-chawakorn
- Source: Sir-chawakorn/sanook-cli
- License: Apache-2.0
- Homepage: https://www.npmjs.com/package/sanook-cli
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.