Initialize a Project
Set up thoughts for a repository
Prerequisites
Section titled “Prerequisites”- Install Hyprlayer
- Configure your AI tool
- Have a thoughts repository (or let Hyprlayer create one)
If your team already has a shared thoughts repository, clone it first:
gh repo clone <org>/<thoughts-repo> ~/thoughtsInitialize
Section titled “Initialize”Go to your project and run:
cd ~/Projects/my-projecthyprlayer thoughts initFirst-Time Setup
Section titled “First-Time Setup”On your first init, Hyprlayer walks you through configuration:
- Thoughts repository location. Where Hyprlayer keeps your thoughts (default:
~/thoughts) - Repos directory name. Subdirectory for project-specific thoughts (default:
repos) - Global directory name. Subdirectory for cross-project thoughts (default:
global) - Username. Your identifier for personal thoughts (default: system username)
What Init Does
Section titled “What Init Does”- Creates the thoughts directory structure in your thoughts repository
- Sets up symlinks from
thoughts/in your project to the thoughts repository - Installs git hooks for protection and auto-sync
- Saves the repository mapping to your global config
After initialization, your project will have:
my-project/ └── thoughts/ ├── <username>/ → ~/thoughts/repos/my-project/<username>/ ├── shared/ → ~/thoughts/repos/my-project/shared/ └── global/ → ~/thoughts/global/Using a Profile
Section titled “Using a Profile”Point a project at a second thoughts repository (work and personal, say) with a profile:
hyprlayer thoughts init --profile workSee Profiles for more on managing multiple thoughts repositories.
Non-Interactive Mode
Section titled “Non-Interactive Mode”Skip prompts by specifying the directory name:
hyprlayer thoughts init --directory my-projectForce Reinitialize
Section titled “Force Reinitialize”hyprlayer thoughts init --forceReconfigures thoughts for a project you already initialized. Also reinstalls agent files.
Git Hooks
Section titled “Git Hooks”Initialization installs two git hooks:
Pre-commit Hook
Section titled “Pre-commit Hook”Keeps the thoughts/ directory out of your code repository. Stage a thoughts file and the hook unstages it, then blocks the commit.
Post-commit Hook
Section titled “Post-commit Hook”Syncs thoughts to the thoughts repository after each commit. It runs in the background, so it never slows you down.
Both hooks carry a version, and init updates them on a re-run. Hyprlayer backs up any existing non-Hyprlayer hook to <hook>.old.
Remove Thoughts
Section titled “Remove Thoughts”To remove thoughts setup from a repository:
hyprlayer thoughts uninitThis removes the thoughts/ symlink structure and the repository mapping from your config. Your thoughts content stays where it is, in the thoughts repository.
Next Steps
Section titled “Next Steps”Start using the development workflow.