Initialize a Project
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”Navigate to your project and run:
cd ~/Projects/my-projecthyprlayer thoughts initFirst-Time Setup
Section titled “First-Time Setup”If this is your first time running init, Hyprlayer will walk you through initial configuration:
- Thoughts repository location — Where your thoughts are stored (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”If you have multiple thoughts repositories (e.g., work and personal), use 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 that’s already been initialized. Also reinstalls agent files.
Git Hooks
Section titled “Git Hooks”Initialization installs two git hooks:
Pre-commit Hook
Section titled “Pre-commit Hook”Prevents accidentally committing the thoughts/ directory to your code repository. If staged thoughts files are detected, they are unstaged and the commit is blocked.
Post-commit Hook
Section titled “Post-commit Hook”Automatically syncs thoughts to the thoughts repository after each commit. Runs in the background so it doesn’t slow down your workflow.
Both hooks are versioned and will be updated when you run init again. Existing non-Hyprlayer hooks are backed up 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. The actual thoughts content in your thoughts repository is preserved.
Next Steps
Section titled “Next Steps”Start using the development workflow.