sercha-cli

module
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2025 License: Apache-2.0

README

GitHub Release License Go Report Card Release Workflow CI Workflow Contributions Welcome

Sercha

A unified, compact version for local, private search

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Development
  5. Contributing
  6. License

About The Project

Sercha CLI is a powerful, privacy-focused search tool designed for local environments. Built with performance and security in mind, it provides fast, efficient search capabilities without relying on external services or compromising your data privacy.

Why Sercha?

  • Privacy First: All searches happen locally on your machine - your data never leaves your control
  • Fast & Efficient: Optimized for speed with CGO-enabled performance
  • Cross-Platform: Native builds for macOS (Apple Silicon) and Linux (x86_64 & ARM64)
  • Easy Installation: Multiple installation methods including Homebrew, apt, yum, and direct binaries

(back to top)

Built With

  • Go - Go 1.24+
  • CGO Enabled - For enhanced performance with C/C++ integration
  • GoReleaser Pro - Enterprise-grade release automation
  • GitHub Actions - Automated CI/CD pipeline

(back to top)

Getting Started

Choose your preferred installation method below based on your operating system.

macOS

brew tap custodia-labs/sercha
brew install sercha

Note: On first run, macOS may block the binary. If you see "killed", run:

xattr -d com.apple.quarantine $(which sercha)

(back to top)

Ubuntu / Debian

Ubuntu 24.04 (Noble) and 22.04 (Jammy)
curl -1sLf 'https://dl.cloudsmith.io/public/custodia-labs/sercha/setup.deb.sh' | sudo bash
sudo apt-get install -y sercha

(back to top)

RHEL / CentOS / Fedora

curl -1sLf 'https://dl.cloudsmith.io/public/custodia-labs/sercha/setup.rpm.sh' | sudo bash
sudo yum install -y sercha

(back to top)

Direct Binary Download

Download the latest release for your platform from GitHub Releases:

  • macOS (Apple Silicon): sercha_*_darwin_arm64.tar.gz
  • Linux (x86_64): sercha_*_linux_amd64.tar.gz
  • Linux (ARM64): sercha_*_linux_arm64.tar.gz

Note: Binary downloads require Xapian to be installed manually:

  • macOS: brew install xapian
  • Ubuntu/Debian: sudo apt install libxapian30
  • RHEL/CentOS: sudo yum install xapian-core-libs

Extract and move to your PATH:

tar -xzf sercha_*.tar.gz
sudo mv sercha /usr/local/bin/

(back to top)

From Source

Requires Go 1.24 or later:

go install github.com/custodia-labs/sercha-cli/cmd/sercha@latest

(back to top)

Usage

Quick Start

# 1. Add a local folder as a source
sercha source add filesystem -c path=~/Documents

# 2. Sync documents from the source
sercha sync

# 3. Search your documents
sercha search "meeting notes"

# 4. Or launch the interactive TUI
sercha tui

Documentation

For detailed guides and configuration options, visit the Sercha Documentation:

(back to top)

Development

Prerequisites

  • Go 1.24 or later
  • CGO enabled

Build

go build -o sercha ./cmd/sercha/main.go

Test

go test ./...

Run Locally

go run ./cmd/sercha/main.go

For more detailed development instructions, see CONTRIBUTING.md.

(back to top)

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".

Please read:

(back to top)

License

Distributed under the Apache 2.0 License. See LICENSE for details.

(back to top)

Directories

Path Synopsis
cgo
Package cgo provides CGO bindings for native libraries.
Package cgo provides CGO bindings for native libraries.
hnsw
Package hnsw provides CGO bindings for HNSWlib.
Package hnsw provides CGO bindings for HNSWlib.
xapian
Package xapian provides CGO bindings for the Xapian search engine.
Package xapian provides CGO bindings for the Xapian search engine.
cmd
sercha command
internal
adapters/driven/ai
Package ai provides factory functions for creating AI service adapters.
Package ai provides factory functions for creating AI service adapters.
adapters/driven/config/file
Package file provides file-based implementations of driven port interfaces.
Package file provides file-based implementations of driven port interfaces.
adapters/driven/embedding/ollama
Package ollama provides an embedding service adapter using Ollama.
Package ollama provides an embedding service adapter using Ollama.
adapters/driven/embedding/openai
Package openai provides an embedding service adapter using OpenAI API.
Package openai provides an embedding service adapter using OpenAI API.
adapters/driven/llm/anthropic
Package anthropic provides an LLM service adapter using Anthropic API.
Package anthropic provides an LLM service adapter using Anthropic API.
adapters/driven/llm/ollama
Package ollama provides an LLM service adapter using Ollama.
Package ollama provides an LLM service adapter using Ollama.
adapters/driven/llm/openai
Package openai provides an LLM service adapter using OpenAI API.
Package openai provides an LLM service adapter using OpenAI API.
adapters/driven/oauth
Package oauth provides OAuth token exchange functionality for external providers.
Package oauth provides OAuth token exchange functionality for external providers.
adapters/driven/storage/memory
Package memory provides in-memory implementations of driven ports.
Package memory provides in-memory implementations of driven ports.
adapters/driven/storage/sqlite
Package sqlite provides a unified SQLite-based implementation of driven port interfaces.
Package sqlite provides a unified SQLite-based implementation of driven port interfaces.
adapters/driven/storage/sqlite/migrations
Package migrations embeds SQL migration files for the SQLite store.
Package migrations embeds SQL migration files for the SQLite store.
adapters/driving/mcp
Package mcp provides an MCP (Model Context Protocol) server adapter for Sercha.
Package mcp provides an MCP (Model Context Protocol) server adapter for Sercha.
adapters/driving/oauth
Package oauth provides OAuth callback server and browser utilities.
Package oauth provides OAuth callback server and browser utilities.
adapters/driving/tui
Package tui provides an interactive terminal user interface for sercha.
Package tui provides an interactive terminal user interface for sercha.
adapters/driving/tui/components/input
Package input provides text input components for the TUI.
Package input provides text input components for the TUI.
adapters/driving/tui/components/list
Package list provides list display components for the TUI.
Package list provides list display components for the TUI.
adapters/driving/tui/components/status
Package status provides status bar components for the TUI.
Package status provides status bar components for the TUI.
adapters/driving/tui/keymap
Package keymap defines keybindings for the TUI.
Package keymap defines keybindings for the TUI.
adapters/driving/tui/messages
Package messages defines Bubbletea message types for the TUI.
Package messages defines Bubbletea message types for the TUI.
adapters/driving/tui/styles
Package styles provides colour themes and styling for the TUI.
Package styles provides colour themes and styling for the TUI.
adapters/driving/tui/views/addsource
Package addsource provides the add source wizard view for the TUI.
Package addsource provides the add source wizard view for the TUI.
adapters/driving/tui/views/doccontent
Package doccontent provides the document content view component for the TUI.
Package doccontent provides the document content view component for the TUI.
adapters/driving/tui/views/docdetails
Package docdetails provides the document details view component for the TUI.
Package docdetails provides the document details view component for the TUI.
adapters/driving/tui/views/documents
Package documents provides the documents list view component for the TUI.
Package documents provides the documents list view component for the TUI.
adapters/driving/tui/views/menu
Package menu provides the main navigation menu view for the TUI.
Package menu provides the main navigation menu view for the TUI.
adapters/driving/tui/views/search
Package search provides the main search view for the TUI.
Package search provides the main search view for the TUI.
adapters/driving/tui/views/settings
Package settings provides the settings configuration view for the TUI.
Package settings provides the settings configuration view for the TUI.
adapters/driving/tui/views/sourcedetail
Package sourcedetail provides the source detail view component for the TUI.
Package sourcedetail provides the source detail view component for the TUI.
adapters/driving/tui/views/sources
Package sources provides the sources view component for the TUI.
Package sources provides the sources view component for the TUI.
connectors
Package connectors provides implementations of the Connector interface for various document sources.
Package connectors provides implementations of the Connector interface for various document sources.
connectors/filesystem
Package filesystem provides a Connector implementation for local filesystem directories.
Package filesystem provides a Connector implementation for local filesystem directories.
connectors/github
Package github implements a connector for GitHub repositories.
Package github implements a connector for GitHub repositories.
connectors/google
Package google provides shared infrastructure for Google API connectors.
Package google provides shared infrastructure for Google API connectors.
connectors/microsoft
Package microsoft provides OAuth2 and connector support for Microsoft Graph API.
Package microsoft provides OAuth2 and connector support for Microsoft Graph API.
core/domain
Package domain defines the core business entities for Sercha.
Package domain defines the core business entities for Sercha.
core/ports/driven
Package driven defines the interfaces that core calls OUT to infrastructure.
Package driven defines the interfaces that core calls OUT to infrastructure.
core/ports/driving
Package driving defines interfaces that external actors (UI, CLI) use to interact with core services.
Package driving defines interfaces that external actors (UI, CLI) use to interact with core services.
core/services
Package services implements the driving port interfaces.
Package services implements the driving port interfaces.
logger
Package logger provides verbose logging for the Sercha CLI.
Package logger provides verbose logging for the Sercha CLI.
normalisers
Package normalisers provides implementations of the Normaliser interface for various document formats.
Package normalisers provides implementations of the Normaliser interface for various document formats.
normalisers/docx
Package docx provides a Normaliser implementation for Microsoft Word DOCX files.
Package docx provides a Normaliser implementation for Microsoft Word DOCX files.
normalisers/github
Package github provides normalisers for GitHub-specific content types.
Package github provides normalisers for GitHub-specific content types.
normalisers/html
Package html provides a Normaliser implementation for HTML documents.
Package html provides a Normaliser implementation for HTML documents.
normalisers/markdown
Package markdown provides a Normaliser implementation for Markdown files.
Package markdown provides a Normaliser implementation for Markdown files.
normalisers/notion
Package notion provides normalisers for Notion documents.
Package notion provides normalisers for Notion documents.
normalisers/pdf
Package pdf provides a Normaliser implementation for PDF files.
Package pdf provides a Normaliser implementation for PDF files.
normalisers/plaintext
Package plaintext provides a Normaliser implementation for plain text files.
Package plaintext provides a Normaliser implementation for plain text files.
postprocessors
Package postprocessors provides document content processing implementations.
Package postprocessors provides document content processing implementations.
postprocessors/chunker
Package chunker provides a fixed-size text chunking processor.
Package chunker provides a fixed-size text chunking processor.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL