You need to configure thts before using it in any project.
thts setupThis creates ~/.config/thts/config.json with your thoughts repo location and
username.
thts requires your code to be in a git repository.
git init
thts initSymptoms: thoughts/ directory exists but contains broken symlinks or no
files.
Check symlink targets:
ls -la thoughts/Common causes:
- Thoughts repo moved or deleted - update config with
thts config --edit - Project not initialized - run
thts init - Central directories don't exist -
thts synccreates them
Symptoms: thts sync fails with rebase errors.
Resolution:
cd ~/thoughts # Go to thoughts repo
git status # See conflicting files
# Edit files to resolve conflicts
git add .
git rebase --continue
cd - # Return to project
thts sync # RetrySymptoms: Thoughts don't sync after commits.
Check hooks are installed:
ls -la .git/hooks/post-commit
cat .git/hooks/post-commitReinstall hooks:
thts init --forceCheck config:
thts config
# Verify autoSyncInWorktrees is true (if in a worktree)Symptoms: searchable/ is empty or missing files.
Rebuild it:
thts syncCross-filesystem warning: If your thoughts repo and project are on different filesystems, hard links won't work. thts will warn about this. Consider moving your thoughts repo to the same filesystem.
Symptoms: Can't write to thoughts directory or repo.
Check permissions:
ls -la ~/thoughts
ls -la thoughts/Common causes:
- Thoughts repo owned by different user
- Directory permissions too restrictive
Symptoms: Git shows thoughts/ files as staged.
The pre-commit hook should prevent this, but if it happens:
git reset HEAD thoughts/Verify gitignore:
grep thoughts .gitignore
# Or check .git/info/exclude depending on your gitIgnore settingSymptoms: Project mapped to wrong directory in thoughts repo.
Reinitialize with explicit name:
thts uninit --all --force
thts init --name correct-nameUse --all so the shared repo mapping is removed before reinitializing.
Symptoms: thts uninit removed local thoughts/ but repo still appears mapped.
thts uninit removes local setup only. To fully detach the repository mapping:
thts uninit --allSymptoms: thts init --profile foo fails.
List available profiles:
thts profile listCreate the profile:
thts profile create foo --repo ~/foo-thoughts# Check current configuration
thts config --json
# Check status and mappings
thts status
# Verify symlinks
ls -la thoughts/
# Check git hooks
ls -la .git/hooks/
# Check thoughts repo status
git -C ~/thoughts status
# Verify hard links (same inode = working)
stat thoughts/{user}/file.md thoughts/searchable/{user}/file.mdIf you're still stuck:
- Check
thts statusoutput for clues - Verify config with
thts config --json - Try
thts init --forceto reinitialize - Check the User Guide for correct usage