Skip to content

Feature: path exclusion for gbrain sync (.gbrainignore or sync.exclude) #449

@sahina

Description

@sahina

Problem

isSyncable() in src/core/sync.ts hardcodes which paths sync. Users with upstream tooling that owns directory conventions (e.g. Docusaurus blog with required slug: frontmatter that gbrain rejects) cannot exclude those dirs without:

  1. Patching the hardcoded list (lost on upgrade)
  2. Renaming to hidden dir (breaks the upstream tool)
  3. Spamming --skip-failed forever (noise + still re-fails when files edit)

Concrete case

docs-site/blog/*.md in a Docusaurus repo. Each post needs explicit slug: for clean URLs. gbrain rejects with Frontmatter slug X does not match path-derived slug Y. Repo-wide sync wants to skip the entire blog dir.

Proposed

Either:

  • .gbrainignore at repo root, gitignore syntax. Filter inside isSyncable() after the hardcoded checks.
  • sync.exclude: string[] in gbrain config (glob patterns).

Either lets users opt-out paths without forking core.

Version

gbrain 0.18.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions