11 KiB
Use this bootstrap-vault.sh:
#!/bin/bash
set -e
echo ""
echo "======================================"
echo " SecondBrain Vault Bootstrap"
echo "======================================"
echo ""
folders=(
"00 Inbox/MeetMic"
"10 Knowledge/CTO Academy/Data"
"10 Knowledge/CTO Academy/Project Management"
"10 Knowledge/CTO Academy/Infrastructure"
"10 Knowledge/CTO Academy/Security"
"10 Knowledge/Quotes"
"10 Knowledge/Templates"
"20 Work/Contracts/Active"
"20 Work/Contracts/Archive"
"20 Work/Decisions"
"20 Work/Ideas"
"20 Work/Journal"
"20 Work/KPIs"
"20 Work/Meetings/Internal"
"20 Work/Meetings/Vendors"
"20 Work/Projects"
"20 Work/Team"
"20 Work/Tracking"
"20 Work/Weekly Review"
"90 Archives"
)
for folder in "${folders[@]}"; do
mkdir -p "$folder"
if [ ! -f "$folder/.gitkeep" ]; then
touch "$folder/.gitkeep"
fi
echo "✓ $folder"
done
echo ""
echo "Vault structure created."
echo ""
echo "Important:"
echo "- Employee folders under 20 Work/Team are created dynamically by Templater."
echo "- Month folders under employee 1-1 folders are also created dynamically."
echo "- Templates themselves should already exist in Git under 10 Knowledge/Templates."
echo ""
echo "SecondBrain bootstrap complete."
echo ""
Save it as:
scripts/bootstrap-vault.sh
Then:
chmod +x scripts/bootstrap-vault.sh
And commit it.
For the README, I’d use something like this:
SecondBrain
Personal work and leadership knowledge system built with Obsidian.
The vault is backed up through Git and a private Gitea repository.
The goal is to make the environment easy to restore on a new computer with minimal manual reconstruction.
Quick Restore
1. Clone the vault
git clone <GITEA_REPOSITORY_URL>
cd SecondBrain
2. Restore the folder structure
./scripts/bootstrap-vault.sh
3. Open the vault in Obsidian
Open Obsidian and choose:
Open folder as vault
Select the cloned SecondBrain directory.
4. Restore plugins
Enable Community Plugins in Obsidian and install the plugins listed below.
Some plugin configuration is stored in .obsidian/ and may already be restored by Git depending on what is tracked.
Machine-specific workspace state is intentionally excluded.
Obsidian Plugins
Core Workflow
These plugins are important to the functionality of SecondBrain.
Templater
Used for dynamic note creation, automatic file naming, folder creation, dates, and structured templates.
Templates are stored in:
10 Knowledge/Templates/
Important: YAML/frontmatter must remain at the very beginning of templates. Do not place Templater JavaScript before the YAML block.
Dataview
Used to generate dynamic lists and views from note properties and metadata.
Obsidian Git
Provides Git integration and automatic backup from the desktop vault.
Repository synchronization is done against a private Gitea repository.
Auto GitKeep
Automatically creates .gitkeep files inside empty directories so the vault structure can be preserved by Git.
This is particularly useful because Git does not normally track empty directories.
Navigation and Editing
These plugins improve the Obsidian interface but are not required for the underlying vault structure.
Notebook Navigator
Replaces the standard Obsidian file explorer with a two-pane navigation interface.
Folder Links
Allows folder links to reveal the corresponding folder in the navigation interface.
Editing Toolbar
Provides a more visual editing toolbar with commonly used Markdown commands.
Iconic
Adds custom icons to folders, files, properties, bookmarks, and other Obsidian interface elements.
Omnisearch
Provides enhanced full-vault search.
Integration
Local REST API with MCP
Provides a local REST API and MCP interface for interacting with the vault from external tools and local automation.
This is an advanced integration and is not required for basic vault operation.
Do not expose the REST API directly to the public Internet.
Optional / Disabled Plugins
Settings Search
Provides search across Obsidian settings.
Currently installed but disabled.
Vault Structure
00 Inbox/
└── MeetMic/
10 Knowledge/
├── CTO Academy/
├── Quotes/
├── Templates/
└── Principles.md
20 Work/
├── Contracts/
│ ├── Active/
│ └── Archive/
├── Decisions/
├── Ideas/
├── Journal/
├── KPIs/
├── Meetings/
│ ├── Internal/
│ └── Vendors/
├── Projects/
├── Team/
├── Tracking/
└── Weekly Review/
90 Archives/
Employee and monthly 1-1 folders are created dynamically by Templater.
Example:
20 Work/Team/
└── Employee Name/
└── 1-1/
└── 08/
MeetMic Integration
MeetMic is used for local meeting transcription and/or summaries.
MeetMic should output Markdown or transcript files into:
00 Inbox/MeetMic/
The Inbox is intentionally a temporary landing area.
After reviewing a MeetMic note:
-
move useful meeting information into
20 Work/Meetings -
extract decisions into
20 Work/Decisions -
extract action items into Jira, Twos, or Monday
-
delete/archive the raw MeetMic output when no longer useful
MeetMic Machine Setup
MeetMic itself is not stored in this vault.
On a new computer:
-
Install MeetMic.
-
Configure its output folder to point to:
<VAULT_PATH>/00 Inbox/MeetMic
-
Confirm Markdown output is enabled.
-
Test with a short recording.
Contract Processing Integration
Contract PDFs are deliberately not stored inside the Obsidian vault.
The local contract processor lives separately, typically at:
~/Herd/scripts/obsidian-contracts
Expected source structure:
obsidian-contracts/
├── Algolia/
│ └── 2024/
│ └── contract.pdf
├── Directus/
│ └── 2026/
│ └── contract.pdf
├── process_contracts.py
├── prompt.md
├── .env
└── logs/
The vendor folder name is the canonical vendor name.
Example:
Directus/2026/
will generate:
Directus - 2026-2027.md
even if the contract itself names TFO as the purchaser.
Generated contract notes are written to:
20 Work/Contracts/Active/
Contract Processor Requirements
Python
Create a virtual environment:
cd ~/Herd/scripts/obsidian-contracts
python3 -m venv .venv
source .venv/bin/activate
pip install requests python-dotenv
When returning to the project later:
cd ~/Herd/scripts/obsidian-contracts
source .venv/bin/activate
When finished:
deactivate
PDF Extraction
Install Poppler:
brew install poppler
This provides:
pdftotext
Local AI
Ollama is used for local contract extraction.
Install Ollama and confirm:
ollama --version
The current contract model is:
contract-reader
Example base model:
qwen3:1.7b
The dedicated model should use a limited context to avoid excessive memory usage.
Example Modelfile:
FROM qwen3:1.7b
PARAMETER num_ctx 4096
PARAMETER temperature 0.1
PARAMETER num_predict 1200
Create it:
ollama create contract-reader -f Modelfile
Contract Processor Environment
The local .env file is not committed to Git.
Example:
OBSIDIAN_VAULT="/Users/YOUR_USER/Documents/Obsidian Vault/SecondBrain"
CONTRACT_OUTPUT="20 Work/Contracts/Active"
OLLAMA_BASE_URL="http://127.0.0.1:11434"
OLLAMA_MODEL="contract-reader"
MAX_CONTEXT_CHARS="5000"
Process one contract:
python3 process_contracts.py --folder Algolia/2024
Force regeneration:
python3 process_contracts.py --folder Algolia/2024 --force
Contract Processor Behavior
The processor:
-
extracts PDF text locally using
pdftotext -
reduces the contract to important sections
-
sends only those excerpts to local Ollama
-
extracts commercial and renewal information
-
validates important renewal clauses against the actual PDF text
-
creates an Obsidian Markdown contract record
Nothing is intentionally sent to a cloud AI provider.
Important renewal fields include:
auto_renewal
renewal_term_months
customer_notice_days
vendor_notice_days
notice_deadline
renewal_increase_percent
renewal_pricing_rule
The generated note also contains source evidence from the PDF.
Git Configuration
Recommended .gitignore
# macOS
.DS_Store
# Obsidian machine-specific state
.obsidian/workspace.json
.obsidian/workspace-mobile.json
# PDFs should never be stored in the vault repository
*.pdf
The contract automation repository should additionally ignore:
.env
.venv/
logs/
token.json
credentials.json
*.pdf
.obsidian Strategy
Do not ignore the entire .obsidian/ directory.
Keeping selected Obsidian configuration in Git makes it much easier to reproduce the vault on another computer.
Machine-specific state such as the following should remain ignored:
.obsidian/workspace.json
.obsidian/workspace-mobile.json
Plugin configuration can be synchronized where appropriate.
Mobile
The mobile vault may use GitSync rather than the Obsidian Git community plugin.
Mobile and desktop should synchronize against the same private Gitea repository.
Avoid making conflicting edits to the same note simultaneously on multiple devices.
Machine-specific mobile workspace state is excluded through:
.obsidian/workspace-mobile.json
What Is NOT Backed Up By This Vault
The following must be restored separately:
-
Ollama models
-
MeetMic application/settings
-
contract PDFs
-
~/Herd/scripts/obsidian-contractsunless stored in its own private repository -
.env -
authentication tokens
-
local application settings
-
Git/Gitea credentials
-
GitSync application configuration
Recommended Recovery Strategy
Maintain two private Git repositories:
SecondBrain
└── Obsidian content, templates, configuration and structure
obsidian-automation
└── scripts, prompts, Modelfiles and setup documentation
Never commit:
-
contracts
-
PDFs
-
secrets
-
.env -
authentication tokens
Recovery Checklist
After moving to a new computer:
Vault
-
Install Git
-
Clone SecondBrain from Gitea
-
Run
bootstrap-vault.sh -
Install Obsidian
-
Open SecondBrain as a vault
Obsidian Plugins
-
Install Templater
-
Install Dataview
-
Install Obsidian Git
-
Install Auto GitKeep
-
Install Notebook Navigator
-
Install Folder Links
-
Install Editing Toolbar
-
Install Iconic
-
Install Omnisearch
-
Install Local REST API with MCP
-
Verify Templater template folder
-
Verify Git configuration
-
Verify plugin settings
Integrations
-
Configure MeetMic output
-
Install Python
-
Install Poppler
-
Install Ollama
-
Restore/create
contract-reader -
Clone/copy contract automation scripts
-
Recreate
.env -
Test contract extraction
Synchronization
-
Test Git pull
-
Test Git commit/push
-
Configure GitSync on mobile if required
-
Test mobile pull
-
Test mobile push