Metadata-Version: 2.4
Name: second-brain-opencode
Version: 0.1.0
Summary: Local-first, deterministic knowledge repository tooling
Author: Second Brain contributors
License: MIT
License-File: LICENSE
Requires-Python: <3.15,>=3.11
Requires-Dist: mcp<2,>=1.27
Requires-Dist: pathspec<1,>=0.12
Requires-Dist: platformdirs<5,>=4
Requires-Dist: pydantic<3,>=2
Requires-Dist: rich<15,>=13
Requires-Dist: ruamel-yaml<1,>=0.18
Requires-Dist: typer<1,>=0.12
Provides-Extra: dev
Requires-Dist: build<2,>=1.2; extra == 'dev'
Requires-Dist: mypy<2,>=1.13; extra == 'dev'
Requires-Dist: pytest-cov<7,>=5; extra == 'dev'
Requires-Dist: pytest<9,>=8; extra == 'dev'
Requires-Dist: ruff<1,>=0.8; extra == 'dev'
Requires-Dist: twine<7,>=5; extra == 'dev'
Description-Content-Type: text/markdown

# Second Brain 2

Second Brain 2 is a local-first knowledge repository toolkit for Markdown and Git.
It uses deterministic SQLite FTS5 retrieval plus explicit structural signals. There
are no embeddings, ANN indexes, model downloads, or similarity-service dependencies.

## Quick start

```console
$ pip install second-brain-opencode
$ mkdir knowledge && cd knowledge
$ git init -b main
$ sb2 init .
$ sb2 index rebuild --apply
$ sb2 search "project decision" --explain
```

Initialization creates a `.secondbrain` control directory and a `wiki` workspace
without overwriting existing notes. Canonical changes are designed to be reviewed,
validated, and committed through Git.

## Security model

Repository content is untrusted data. Paths are constrained to the repository,
generated local artifacts are write-protected, and remote egress is classification
aware: restricted content cannot leave the machine and confidential content requires
explicit confirmation by default.

Install the project-local OpenCode integration after reviewing its dry run:

```console
$ sb2 opencode diff --repo .
$ sb2 opencode install --repo . --apply
```

See [Quick start](docs/quickstart.md), [architecture](docs/architecture.md),
[CLI reference](docs/cli.md), [OpenCode integration](docs/opencode.md),
[team workflow](docs/team-mode.md), and [security](docs/security.md).

## Development

```console
$ python -m pytest --cov=second_brain --cov-fail-under=80
$ python -m ruff check src tests
$ python -m mypy src/second_brain
```

Licensed under the [MIT License](LICENSE).
