sbctl

command module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 1 Imported by: 0

README ΒΆ

sbctl β€” Second Brain Controller

CI codecov Go Report Card

sbctl is a Go-based CLI tool designed to be the backbone of an AI-powered Second Brain. It manages the synchronization between Google Drive and a local SQLite database, exposing the data via an MCP (Model Context Protocol) server for seamless integration with AI agents like Claude.

πŸš€ Key Features

  • GDrive Sync: Incremental metadata and content synchronization.
  • SQLite Persistence: All your file metadata and Markdown content stored locally.
  • MCP Server: Directly query your database from Claude via the Model Context Protocol.
  • Systemd Integration: Runs as a reliable background service on Linux.
  • Google Sheets Indexing: Automatically maintains a "Second Brain Index" in Google Sheets.

πŸ› οΈ Tech Stack

  • Language: Go 1.21+
  • CLI Framework: Cobra
  • Database: SQLite (Pure Go, no CGO)
  • Transport: MCP over HTTP/SSE
  • Dependency: gog CLI for Google Drive access

πŸ“¦ Installation

# Clone the repository
git clone https://github.com/kilip/sbctl.git
cd sbctl

# Build the binary
go build -o sbctl .

🚦 Quick Start

  1. Initialise the environment:

    ./sbctl init
    

    This creates ~/.sbctl/config.json and ~/.sbctl/sbctl.db.

  2. Configure your account:

    ./sbctl config gdrive.account="your-email@gmail.com"
    
  3. Run your first sync:

    ./sbctl sync gdrive
    

πŸ“‚ Project Structure

  • cmd/: CLI commands implementation.
  • internal/config/: Configuration handling (JSON).
  • internal/db/: SQLite database and migrations.
  • internal/worker/: Background worker logic (gdrive, mcp).
  • internal/gog/: Wrapper for the gog CLI.

πŸ“„ License

MIT Β© 2026-present Anthonius Munthi https://kilip.github.io

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
internal
config
Package config handles the application configuration for sbctl.
Package config handles the application configuration for sbctl.
db
Package db manages the SQLite database connection and schema migrations.
Package db manages the SQLite database connection and schema migrations.
gog
systemd
Package systemd provides utilities for managing the sbctl systemd user service.
Package systemd provides utilities for managing the sbctl systemd user service.

Jump to

Keyboard shortcuts

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