这是indexloc提供的服务,不要输入任何密码
Skip to content

Support multiple thoughts repositories via profiles/contexts #843

@ryanrozich

Description

@ryanrozich

Currently, hlyr only supports a single global thoughts repository configured in ~/.config/humanlayer/humanlayer.json. This creates friction for users working across multiple organizational boundaries.

Use Case

I work on:

  • Personal projects (thoughts repo in my personal GitHub org)
  • Freelance projects for multiple clients (separate thoughts repos for each client)

I frequently switch between these projects throughout the day, and each needs to sync to a different thoughts repository.

Current Limitations

  • Only one thoughtsRepo can be configured globally
  • The --config-file workaround requires specifying the flag on every command
  • Easy to accidentally commit thoughts to the wrong repository
  • Soft-linking between different thoughts repos is error-prone and cumbersome

Proposed Solution

Add a profile/context system that allows:

  1. Named profiles - Define multiple thoughts configurations (e.g., "personal", "client-acme", "client-globex")
  2. Per-repo configuration - Store profile selection in a local file (e.g., .thoughts-profile)
  3. Automatic switching - Commands like humanlayer thoughts sync automatically use the correct thoughts repo based on the current directory
  4. Simple management - Commands to create, list, and switch profiles

Example Workflow

# One-time setup
humanlayer thoughts profile create personal --repo ~/thoughts-personal
humanlayer thoughts profile create client-acme --repo ~/thoughts-acme

# Per-project setup (stores in .thoughts-profile)
cd ~/projects/personal-app
humanlayer thoughts init --profile personal

cd ~/projects/acme-project  
humanlayer thoughts init --profile client-acme

# Normal usage - automatically uses correct repo
cd ~/projects/personal-app
humanlayer thoughts sync  # → syncs to ~/thoughts-personal

cd ~/projects/acme-project
humanlayer thoughts sync  # → syncs to ~/thoughts-acme

This would eliminate manual config file management and prevent cross-contamination between thoughts repositories.


Happy to submit a PR for this if you're open to the approach!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions