### Example SynapsCLI Configuration File Source: https://github.com/haseebkhalid1507/synapscli/wiki/Configuration This is an example of a SynapsCLI configuration file, demonstrating various settings for models, thinking intensity, themes, agent names, compaction, tool limits, provider keys, and keybinds. Lines starting with '#' are comments. ```ini model = claude-sonnet-4-6 thinking = high theme = neon-rain agent_name = MyAgent # Compaction compaction_model = claude-sonnet-4-6 # Tool limits bash_timeout = 30 bash_max_timeout = 300 subagent_timeout = 300 api_retries = 3 max_tool_output = 30000 # Provider keys provider.groq = gsk_... provider.cerebras = csk_... # Keybinds sidecar_toggle_key = F8 keybind.clear = ctrl+l ``` -------------------------------- ### Build and Test SynapsCLI Source: https://github.com/haseebkhalid1507/synapscli/blob/main/CONTRIBUTING.md Clone the repository, build the project in release mode, and run library tests. This is a quick way to get started with the project. ```bash git clone https://github.com/HaseebKhalid1507/SynapsCLI.git cd SynapsCLI cargo build --release # Single binary at target/release/synaps cargo test --release --lib ``` -------------------------------- ### Keybind Configuration Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Config-Reference Example of assigning a command to a specific keybind, such as F5. ```plaintext keybind.F5 = /compact ``` -------------------------------- ### Full Plugin Manifest Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Plugins A comprehensive example of a `plugin.json` manifest file demonstrating all available configuration options for a plugin. ```json { "name": "my-plugin", "version": "1.0.0", "description": "Example plugin with everything", "extension": { "command": "python3", "args": ["main.py"], "permissions": ["tools.intercept"], "hooks": [ { "hook": "before_tool_call", "tool": "bash" } ] }, "keybinds": [ { "key": "F5", "action": "slash_command", "command": "compact" } ], "commands": [ { "name": "my-command", "description": "Do something", "interactive": true } ], "provides": { "sidecar": { "command": "bin/my-sidecar", "protocol_version": 1 } }, "settings": { "category": [ { "id": "my-plugin", "label": "My Plugin Settings", "fields": [ { "key": "api_key", "label": "API Key", "editor": "text" } ] } ] } } ``` -------------------------------- ### Install SynapsCLI using Shell Installer Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation A one-liner script that automatically detects the platform and installs the correct SynapsCLI binary. Requires `xz` for decompression. ```sh curl -sSL https://github.com/HaseebKhalid1507/SynapsCLI/releases/latest/download/synaps-installer.sh | sh ``` -------------------------------- ### Manually Install SynapsCLI Plugin Source: https://github.com/haseebkhalid1507/synapscli/wiki/Plugins Manually install a plugin by creating the necessary directory structure and a plugin.json file. ```bash # Manual install mkdir -p ~/.synaps-cli/plugins/my-plugin/.synaps-plugin # then create plugin.json inside .synaps-plugin/ ``` -------------------------------- ### Agent-Engine Internal Cycle - Subagent Start Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/reviews/chrollo-architecture.md Example demonstrating a cross-module reference within agent-engine for starting subagents, confirming the cycle is contained. ```rust use crate::runtime::subagent::{SubagentHandle, …}; ``` -------------------------------- ### SynapsCLI Quick-Start Summary Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation A consolidated summary of the installation, authentication, and running steps for SynapsCLI. ```sh # 1. Install (pick one) car go install synaps # 2. Authenticate (pick one) synaps login # OAuth — Claude Pro/Max export ANTHROPIC_API_KEY="sk-ant-..." # Anthropic API key export GROQ_API_KEY="gsk_..." # Any other provider # 3. Run synaps ``` -------------------------------- ### Basic Configuration Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Config-Reference Illustrates the plain `key = value` format for configuration settings, including comments. ```plaintext # This is a comment model = claude-sonnet-4-6 thinking = high ``` -------------------------------- ### Build and Install SynapsCLI from Source Source: https://github.com/haseebkhalid1507/synapscli/blob/main/README.md Clone the SynapsCLI repository and build the release binary from source. This method requires Rust and Cargo to be installed. ```bash git clone https://github.com/HaseebKhalid1507/SynapsCLI && cd SynapsCLI cargo build --release && ./target/release/synaps ``` -------------------------------- ### Install SynapsCLI using Cargo Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Recommended method for users with Rust installed. Installs the synaps command-line tool. ```sh cargo install synaps ``` -------------------------------- ### Full plugin.json Manifest Example Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/extensions/protocol.md This is a complete example of a plugin.json file, demonstrating all supported extension fields for defining a Synapse CLI extension. ```json { "name": "rm-rf-guard", "version": "1.0.0", "description": "Blocks destructive shell commands outside of /tmp.", "author": "Your Name ", "license": "MIT", "extension": { "protocol_version": 1, "runtime": "process", "command": "python3", "args": ["main.py"], "permissions": ["tools.intercept"], "hooks": [ { "hook": "before_tool_call", "tool": "bash" } ] } } ``` -------------------------------- ### Model Shorthand Syntax Examples Source: https://github.com/haseebkhalid1507/synapscli/wiki/Models-and-Providers Demonstrates the standard `provider/model-id` syntax for non-Anthropic models, including examples with nested slashes in the model ID. ```text groq/llama-3.3-70b-versatile └─ model ID (no nested slashes) ``` ```text nvidia/meta/llama-3.3-70b-instruct └─────────────────────────── model ID (nested slashes preserved) ``` ```text fireworks/accounts/fireworks/models/llama-v3p3-70b-instruct └──────────────────────────────────────────────── model ID ``` -------------------------------- ### Local Provider URL Configuration Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Config-Reference Demonstrates setting the URL for a local provider, such as a self-hosted LLM. ```plaintext provider.local.url = http://localhost:11434/v1 ``` -------------------------------- ### Start RPC Server Source: https://github.com/haseebkhalid1507/synapscli/wiki/RPC-Protocol Execute this command to start the SynapsCLI RPC server. All logging is directed to stderr, while stdout is reserved for protocol messages. ```bash synaps rpc ``` -------------------------------- ### Install SynapsCLI using Homebrew Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Installs SynapsCLI on macOS and Linux systems with Homebrew. The tap is added automatically. ```sh brew install HaseebKhalid1507/tap/synaps ``` -------------------------------- ### Help Rendering Update Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/help-system-evolution-plan.md The `render_entry()` function will be updated to include the new `usage` and `examples` fields in the rendered help output. ```text Update `render_entry()` to render: - title - summary - body lines - usage - examples - related ``` -------------------------------- ### Install SynapsCLI using Cargo Source: https://github.com/haseebkhalid1507/synapscli/blob/main/README.md Install the SynapsCLI package from crates.io using the cargo package manager. This is the recommended method for most users. ```bash cargo install synaps # crates.io ``` -------------------------------- ### Provider API Key Configuration Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Config-Reference Shows how to configure API keys for various providers by prefixing the key with `provider.`. ```plaintext provider.groq = gsk_... ``` -------------------------------- ### Start Synaps Authentication Broker Source: https://github.com/haseebkhalid1507/synapscli/blob/main/README.md Command to start the Synaps authentication broker on a trusted host. It binds to a specified address and port, and uses a machine token file for client authentication. ```bash synaps auth-broker --bind 0.0.0.0:8181 --machine-token-file /etc/synaps/broker.token # GET /healthz -> { status } (non-200 if cred missing) # GET /token?provider=X -> { access_token, expires, ttl_ms } (Bearer machine token) ``` -------------------------------- ### Install Panic Hook for Emergency Teardown Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/116-hardening-spec.md Install a panic hook at the start of execution to call `lifecycle::emergency_teardown_terminal()` before the default hook, providing a backstop for panics on any thread. ```rust std::panic::set_hook ``` -------------------------------- ### Clone, Build, and Test SynapsCLI Source: https://github.com/haseebkhalid1507/synapscli/wiki/Contributing Quickly set up the project by cloning the repository, building the release version, and running all workspace tests. ```bash git clone https://github.com/HaseebKhalid1507/SynapsCLI.git cd SynapsCLI cargo build --release cargo test --workspace ``` -------------------------------- ### Synaps Plugin Entry Schema Example Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/specs/plugin-index.md An individual plugin entry in the Synaps index provides detailed metadata about an installable plugin version. This includes identification, versioning, source repository, checksum, compatibility requirements, capabilities, and publisher trust information. ```json { "id": "session-memory", "name": "session-memory", "version": "0.1.0", "description": "Extracts local session notes from lifecycle transcripts.", "repository": "https://github.com/example/synaps-skills.git", "subdir": "session-memory-plugin", "license": "MIT", "categories": ["memory"], "keywords": ["local-first", "session"], "checksum": { "algorithm": "sha256", "value": "64-character-hex-plugin-tree-digest" }, "compatibility": { "synaps": ">=0.1.0", "extension_protocol": "1" }, "capabilities": { "skills": ["session-memory"], "has_extension": true, "permissions": ["session.lifecycle"], "hooks": ["on_session_end"], "commands": [] }, "trust": { "publisher": "Maha Media", "homepage": "https://example.com" } } ``` -------------------------------- ### Toggle Installed Plugin Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-plugins-ui-implementation.md Toggles the enabled state of an installed plugin. Requires the plugin to be selected in the installed list. ```rust fn toggle_installed(state: &mut PluginsModalState, enabled: bool) -> InputOutcome { let rows = state.right_rows(); if let Some(super::state::RightRow::Installed(p)) = rows.get(state.selected_right) { return InputOutcome::TogglePlugin { name: p.name.clone(), enabled }; } InputOutcome::None } ``` -------------------------------- ### Server Mode Options Source: https://github.com/haseebkhalid1507/synapscli/wiki/CLI-Reference Shows how to start the WebSocket API server with custom configurations for port, host, authentication, and origins. ```bash synaps server # Start on default host/port ``` ```bash synaps server --port 8080 # Custom port ``` ```bash synaps server --host 0.0.0.0 --port 3145 # Bind to all interfaces ``` ```bash synaps server --token mySecret # Override config token ``` ```bash synaps server --token "" # Disable authentication ``` ```bash synaps server --allowed-origins "https://app.example.com,https://dash.example.com" ``` ```bash synaps server --auto-approve-confirms # Skip tool confirmations ``` ```bash synaps server --system "You are a support agent" # System prompt ``` ```bash synaps server --continue my-project # Resume a session ``` -------------------------------- ### Install Plugin Logic Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-plugins-ui-implementation.md Handles the logic for installing a plugin from the marketplace. It checks if a marketplace plugin is selected and if it's not already installed. ```rust fn install_on_row(state: &mut PluginsModalState) -> InputOutcome { use super::state::{LeftRow, RightRow}; let left = state.left_rows(); let Some(LeftRow::Marketplace(mname)) = left.get(state.selected_left) else { return InputOutcome::None; }; let rows = state.right_rows(); match rows.get(state.selected_right) { Some(RightRow::Browseable { plugin, installed: false }) => { // TOFU check done by the main loop; we just emit the intent. InputOutcome::Install { marketplace: mname.clone(), plugin: plugin.name.clone() } } Some(RightRow::Browseable { installed: true, .. }) => { state.row_error = Some("already installed".into()); InputOutcome::None } _ => InputOutcome::None, } } ``` -------------------------------- ### Load Project-Specific System Prompts Source: https://github.com/haseebkhalid1507/synapscli/wiki/Tips-and-Tricks Configure project-specific instructions by creating a .synaps-system.md file in the project root. This file is loaded automatically on startup. ```bash synaps -s ./.synaps-system.md ``` ```markdown You are a senior Rust developer working in this repository. Conventions: - Use thiserror for all error types - Prefer &str over String in function parameters - Write tests for every public function - Run cargo clippy after any code change ``` -------------------------------- ### Install SynapsCLI using Homebrew Source: https://github.com/haseebkhalid1507/synapscli/blob/main/README.md Install SynapsCLI on macOS or Linux using the Homebrew package manager. Ensure you have Homebrew installed. ```bash brew install HaseebKhalid1507/tap/synaps # macOS / Linux ``` -------------------------------- ### Create Skills Directory Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-synaps-skills-plugins-implementation.md Initial step to set up the new module structure for skills and plugins. ```bash mkdir src/skills ``` -------------------------------- ### Plugin Help Display Example Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/help-system-evolution-plan.md In `/help find`, plugin entries display their source. The detail view explicitly states the plugin source. ```text Plugin: acme-tools /acme:sync Sync Acme workspace state ``` ```text Source: plugin acme-tools ``` -------------------------------- ### Install SynapsCLI using .deb package Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Installs SynapsCLI on Debian/Ubuntu systems by downloading and installing a .deb package. Tested on Ubuntu 22.04+ and Debian 12+. ```sh curl -LO https://github.com/HaseebKhalid1507/SynapsCLI/releases/latest/download/synaps.deb sudo dpkg -i synaps.deb ``` -------------------------------- ### Verify SynapsCLI Installation Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Checks if the synaps command is installed and accessible by displaying its version. ```sh synaps --version ``` -------------------------------- ### Set Groq API Key and Run Synaps Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Example of setting an API key for a different provider (Groq) and then running Synaps. The model can be switched within the session. ```sh export GROQ_API_KEY="gsk_..." synaps ``` -------------------------------- ### Start Synaps Watcher Daemon Source: https://github.com/haseebkhalid1507/synapscli/wiki/CLI-Reference Use this command to start the agent supervisor daemon in the foreground. ```bash synaps watcher run ``` -------------------------------- ### Recommended HelpEntry JSON Schema Additions Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/help-system-evolution-plan.md Illustrates how to add an 'examples' field to the HelpEntry schema, including a command and its description for copy-pasting. ```json "examples": [ { "command": "/compact keep auth debugging context", "description": "Compact while preserving an important focus." } ] ``` -------------------------------- ### Sync Symlinks on Plugin Install Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-23-plugin-agent-symlinks.md Call the symlink synchronization function after reloading the registry during the plugin install flow. ```rust sync_plugin_agent_symlinks(&dest, &global_agents_dir()); ``` -------------------------------- ### Example Symlink Creation Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-23-plugin-agent-symlinks-design.md Illustrates the symlink creation process for a plugin agent. This symlink maps a globally discoverable name to the agent's actual location within a plugin's skill directory. ```bash ~/.synaps-cli/agents/bbe-sage.md → ~/.synaps-cli/plugins/dev-tools/skills/black-box-engineering/agents/sage.md ``` -------------------------------- ### Update Plugin Logic Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-plugins-ui-implementation.md Initiates the update process for a selected installed plugin. Only applicable if an installed plugin is currently selected. ```rust fn update_on_row(state: &mut PluginsModalState) -> InputOutcome { let rows = state.right_rows(); if let Some(super::state::RightRow::Installed(p)) = rows.get(state.selected_right) { return InputOutcome::Update(p.name.clone()); } InputOutcome::None } ``` -------------------------------- ### Launch SynapsCLI with System Prompt (Inline) Source: https://github.com/haseebkhalid1507/synapscli/wiki/Your-First-Session Start SynapsCLI with an inline system prompt to tailor the AI's behavior from the beginning of the session. ```bash synaps -s "You are a senior Rust developer. Be concise. Use idiomatic patterns." ``` -------------------------------- ### Install SynapsCLI using AUR helper Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Installs SynapsCLI on Arch Linux or EndeavourOS using an AUR helper like yay. ```sh yay -S synaps ``` -------------------------------- ### Install SynapsCLI on Debian/Ubuntu Source: https://github.com/haseebkhalid1507/synapscli/blob/main/README.md Download and install the SynapsCLI .deb package for Debian-based systems like Ubuntu. This method is specific to amd64 architecture. ```bash curl -LO https://github.com/HaseebKhalid1507/SynapsCLI/releases/latest/download/synaps_amd64.deb sudo dpkg -i synaps_amd64.deb ``` -------------------------------- ### Install Linux System Dependencies for SynapsCLI Build Source: https://github.com/haseebkhalid1507/synapscli/wiki/FAQ-and-Troubleshooting Install necessary system packages for building SynapsCLI from source on Debian/Ubuntu or Fedora/RHEL systems. ```bash # Debian/Ubuntu sudo apt install pkg-config libssl-dev # Fedora/RHEL sudo dnf install pkg-config openssl-devel ``` -------------------------------- ### Child Process Ready Event Source: https://github.com/haseebkhalid1507/synapscli/wiki/RPC-Protocol Upon startup, the child process emits a 'ready' event. The parent process must verify the 'protocol_version' before sending commands. ```json {"type":"ready","session_id":"","model":"","protocol_version":1} ``` -------------------------------- ### Navigate and Launch SynapsCLI Source: https://github.com/haseebkhalid1507/synapscli/wiki/Your-First-Session Navigate to your project directory before launching SynapsCLI to provide the AI with the correct context for its operations. ```bash cd ~/my-project synaps ``` -------------------------------- ### Basic Usage Source: https://github.com/haseebkhalid1507/synapscli/wiki/CLI-Reference Shows the general structure for using the synaps CLI. ```bash synaps [OPTIONS] [COMMAND] ``` -------------------------------- ### Set up and test pi-skills compatibility Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-synaps-skills-plugins-implementation.md This snippet clones the pi-skills repository, renames the plugin directory, and starts the Synaps chat UI to verify skill appearance and autocomplete. ```bash mkdir -p /tmp/synaps-pi-home/.synaps-cli/plugins git clone https://github.com/maha-media/pi-skills /tmp/synaps-pi-home/.synaps-cli/plugins/pi-skills find /tmp/synaps-pi-home/.synaps-cli/plugins/pi-skills -type d -name .claude-plugin -exec sh -c 'mv "$1" "${1%/.claude-plugin}/.synaps-plugin"' _ {} \; HOME=/tmp/synaps-pi-home cargo run --bin chatui # In TUI: type /help — expect Skills section listing exa-search, transcribe, etc. ``` -------------------------------- ### Security Reviewer Agent Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Named-Agents Example configuration for a security-focused code reviewer agent. It outlines specific vulnerabilities to look for and the desired reporting format. ```markdown You are a security-focused code reviewer. Look for: - Injection vulnerabilities (SQL, command, path traversal) - Authentication/authorization flaws - Secrets in source code - Unsafe deserialization - SSRF, XSS, CSRF patterns Report findings with severity (Critical/High/Medium/Low), affected code, and remediation steps. ``` -------------------------------- ### Provider Configuration Examples Source: https://github.com/haseebkhalid1507/synapscli/wiki/Configuration Configure access to various AI providers by specifying their keys or endpoint URLs. Environment variables take precedence over these settings. ```ini provider.groq = gsk_... provider.cerebras = csk_... provider.openai = sk-... provider.local.url = http://localhost:11434/v1 ``` -------------------------------- ### Start Watcher Supervisor Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/smoke/watcher-bridge.md Use this command to start the SynapsCLI watcher supervisor. Check the watcher logs for confirmation that the bridge heartbeat mirror is enabled. ```bash synaps watcher start ``` -------------------------------- ### Testing the Extension Source: https://github.com/haseebkhalid1507/synapscli/wiki/Writing-an-Extension After setting up the extension, SynapsCLI automatically loads it on startup. You can then use the bash tool to trigger events and verify that entries appear in the audit.log file. ```bash synaps # Extensions auto-load on startup # Use the bash tool — entries appear in audit.log ``` -------------------------------- ### Documentation Writer Agent Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/Named-Agents Example configuration for a technical documentation specialist agent. It specifies the desired tone, content structure, and avoidance of marketing language. ```markdown You are a technical documentation specialist. Write clear, accurate docs. Use examples. No marketing fluff. Structure with headers and tables for scanability. ``` -------------------------------- ### Rust: Local Git Repository Setup for Testing Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/2026-04-18-plugins-ui-implementation.md Helper function to create a local bare Git repository for testing plugin operations. It initializes a repository, configures user details, adds a dummy skill file, commits, and then clones it as a bare repository. ```rust #[cfg(test)] mod tests { use super::*; use std::process::Command; /// Build a throwaway local bare git repo to clone from (no network). fn mk_local_repo() -> (tempfile::TempDir, std::path::PathBuf) { let dir = tempfile::tempdir().unwrap(); let work = dir.path().join("work"); std::fs::create_dir_all(&work).unwrap(); Command::new("git").args(["init", "-q"]).current_dir(&work).status().unwrap(); Command::new("git").args(["config", "user.email", "t@t"]).current_dir(&work).status().unwrap(); Command::new("git").args(["config", "user.name", "t"]).current_dir(&work).status().unwrap(); std::fs::write(work.join("SKILL.md"), "---\nname: demo\ndescription: d\n---\nbody").unwrap(); Command::new("git").args(["add", "."]).current_dir(&work).status().unwrap(); Command::new("git").args(["commit", "-q", "-m", "init"]).current_dir(&work).status().unwrap(); let bare = dir.path().join("bare.git"); Command::new("git").args(["clone", "--bare", "-q", work.to_str().unwrap(), bare.to_str().unwrap()]).status().unwrap(); (dir, bare) } #[test] fn install_clones_and_returns_sha() { let (_tmp, bare) = mk_local_repo(); let dest_parent = tempfile::tempdir().unwrap(); let dest = dest_parent.path().join("demo"); let sha = install_plugin( &format!("file://{{}}", bare.display()), &dest, ).unwrap(); assert!(dest.join("SKILL.md").exists()); assert_eq!(sha.len(), 40); } #[test] fn install_refuses_if_target_exists() { let (_tmp, bare) = mk_local_repo(); let dest_parent = tempfile::tempdir().unwrap(); let dest = dest_parent.path().join("demo"); std::fs::create_dir_all(&dest).unwrap(); let err = install_plugin( &format!("file://{{}}", bare.display()), &dest, ).unwrap_err(); assert!(err.contains("already")); } #[test] fn uninstall_removes_directory() { let dir = tempfile::tempdir().unwrap(); let p = dir.path().join("demo"); std::fs::create_dir_all(&p).unwrap(); std::fs::write(p.join("x"), "y").unwrap(); uninstall_plugin(&p).unwrap(); assert!(!p.exists()); } #[test] fn uninstall_missing_dir_is_ok() { let dir = tempfile::tempdir().unwrap(); let p = dir.path().join("nothere"); assert!(uninstall_plugin(&p).is_ok()); } #[test] fn ls_remote_head_returns_sha_on_real_repo() { let (_tmp, bare) = mk_local_repo(); let sha = ls_remote_head(&format!("file://{{}}", bare.display())).unwrap(); assert_eq!(sha.len(), 40); } } ``` -------------------------------- ### Start Synaps RPC Mode Source: https://github.com/haseebkhalid1507/synapscli/wiki/CLI-Reference Start the line-delimited JSON-RPC server on stdin/stdout. Options allow specifying a model, profile, system prompt, or resuming a session. ```bash synaps rpc ``` ```bash synaps rpc --model claude-3-5-sonnet ``` ```bash synaps rpc --profile work ``` ```bash synaps rpc --system "You are a triage bot" ``` ```bash synaps rpc --continue last-incident ``` -------------------------------- ### Add SynapsCLI to PATH Source: https://github.com/haseebkhalid1507/synapscli/wiki/Installation Ensures the SynapsCLI binary, installed to `~/.local/bin` by the shell installer, is accessible from the command line. Add this to your shell profile (`~/.bashrc` or `~/.zshrc`) to make it persistent. ```sh export PATH="$HOME/.local/bin:$PATH" ``` -------------------------------- ### Launch SynapsCLI with System Prompt (File) Source: https://github.com/haseebkhalid1507/synapscli/wiki/Your-First-Session Launch SynapsCLI using a system prompt defined in a separate file for more complex or reusable configurations. ```bash synaps -s ./my-prompt.md ``` -------------------------------- ### Load System Prompt from File at Startup Source: https://github.com/haseebkhalid1507/synapscli/wiki/Slash-Commands To load a system prompt from a file, use the `-s` flag followed by the file path when starting the Synaps CLI. ```sh synaps -s ./prompts/rust-expert.md ``` -------------------------------- ### Create Dedicated Worktree for Extension Install Hardening Source: https://github.com/haseebkhalid1507/synapscli/blob/main/docs/plans/extension-install-post-install-hardening-plan.md Use this bash command to create a new, dedicated worktree for implementing the extension install hardening features. This ensures that development is isolated from the primary codebase. ```bash cd /home/jr/Projects/Maha-Media/SynapsCLI git fetch origin --prune git worktree add -b feat/extension-install-hardening \ /home/jr/Projects/Maha-Media/.worktrees/SynapsCLI-extension-install-hardening \ feat/extension-setup-script cd /home/jr/Projects/Maha-Media/.worktrees/SynapsCLI-extension-install-hardening ``` -------------------------------- ### MCP Server Configuration Example Source: https://github.com/haseebkhalid1507/synapscli/wiki/MCP-Integration Configure MCP servers by defining their command, arguments, and environment variables in `mcp.json`. This format is compatible with Claude Code. ```json { "mcpServers": { "filesystem": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "/home/user/allowed-dir"], "env": {} }, "postgres": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://localhost/mydb"], "env": {} }, "github": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-github"], "env": { "GITHUB_TOKEN": "ghp_..." } } } } ```