SynapsCLI AGENTS.md

Developer instructions for SynapsCLI, a Rust terminal-based AI agent made of several Cargo workspace crates. A Cargo workspace is one Rust project containing multiple related packages.

In plain words
What is it for?
They are for working on the agent's configuration, providers, tools, memory, extensions, terminal interface, and command-line runtime.
Why use it?
They provide the project layout and request lifecycle that contributors need before changing the code.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/haseebkhalid1507/synapscli/agents-md
Clone the repo
git clone --depth 1 https://github.com/HaseebKhalid1507/SynapsCLI

Made for: Codex, OpenCode.

Per session 12,858 This file is loaded in full into every session.
When invoked 12,858 The same file — it is already loaded in full.
Security scan B 1 finding. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.12858 $0.12858
Opus 5 $0.06429 $0.06429
Sonnet 5 $0.02572 $0.02572
Haiku 4.5 $0.01286 $0.01286

Measured 2d ago against content hash ff59cad28795, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

SynapsCLI AGENTS.md scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

│ ├── secret_prompt.rs — secure sudo password prompt handling
AGENTS.md · 767 lines

How it starts

The opening of the file, as written. The whole thing — 767 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — SynapsCLI Developer & Agent Guide

This is the onboarding doc for any agent (Cursor, Aider, or SynapsCLI itself) touching this codebase. Read this first. If you only read one file, read this one.

SynapsCLI is a terminal-native AI agent runtime written in Rust. ~210K LOC across the workspace (counts drift — verify with find src crates -name '*.rs' -not -path '*/target/*' | xargs wc -l). Cargo workspace with three library crates + a root binary crate:

  • synaps-core (crates/agent-core/) — config, session, auth, credential broker, models, memory, orchestration policy, prompt manifests, pricing, protocol primitives
  • synaps-engine (crates/agent-engine/) — runtime, provider catalogs, credential routing, tools, memory tools, reactive subagent lifecycle, MCP, skills, events, extensions, sidecar, watcher
  • synaps-tui (crates/agent-tui/) — the ratatui TUI
  • synaps (src/main.rs) — the binary; CLI dispatch

Each crate has extern crate self as synaps_cli; and re-exports its dependencies, so internal synaps_cli:: paths still resolve for contributors navigating older references. Talks to Anthropic, OpenAI Codex, xAI, GitHub Copilot, Google Gemini, Azure OpenAI, Amazon Bedrock, Google Vertex AI, and Kimi natively, plus any OpenAI-compatible provider (Groq, Cerebras, NVIDIA, OpenRouter, local Ollama, etc.) via the built-in provider engine. Streams SSE, dispatches tools, renders a TUI.


Build & Test

cargo build --release                    # full release build (lto, single codegen unit, strip)
cargo build                              # dev build — faster compile, slower runtime
cargo test --workspace                   # all crates + integration tests
cargo test -p synaps-engine              # single crate
cargo test -p synaps-engine -- --test-threads=1  # required for PTY tests (TTY fd contention)
cargo test --test extensions_e2e         # end-to-end with real extension process
cargo clippy --all-targets -- -D warnings  # linting (CI gate)

Read the full file on GitHub · 767 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 767 lines · 12,858 tokens per session scan B ff59cad28795

Subscribe to this mod's changes

SynapsCLI AGENTS.md is an instructions file published in the GitHub repository HaseebKhalid1507/SynapsCLI (40 stars, last pushed 12d ago), licensed Apache-2.0. It adds 12,858 tokens to every session, about $0.0643 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.