Skip to content

feat: shell hook for auto-context loading #47

Closed

Description

@ajianaz

Problem

uteke requires explicit commands for every operation. In a typical dev workflow:

  • Switching projects requires manually recalling project context
  • No automatic context awareness based on working directory
  • Repetitive remember/recall patterns

Proposed Solution

# Setup shell integration
uteke hook bash              # Add to ~/.bashrc
uteke hook zsh               # Add to ~/.zshrc
uteke hook install           # Auto-detect shell

# Hook behavior (automatic, no manual command)
cd ~/projects/bond           # → auto-recall memories tagged 'bond'
                              # → auto-load project context
                              # → set namespace to 'bond'

cd ~/projects/gofin          # → switch context to gofin

# Manual hook trigger
uteke context                 # Show current context (from which dir/tag)
uteke context --refresh       # Force re-load context for current dir

How It Works

  1. Shell hook intercepts cd command
  2. Check .uteke-context file in target directory (or parent dirs)
  3. If found: uteke recall --tag <project> --limit 5 --json
  4. Display context summary in terminal (optional, configurable)
  5. Set UTEKE_NAMESPACE for subsequent commands
# .uteke-context file (placed in project root)
namespace = bond
tags = ["bond", "backend", "go"]
recall_limit = 5

Priority

P3 — DX

Impact

This transforms uteke from a tool you consciously invoke to ambient intelligence. Walking into a project directory automatically loads relevant context — similar to how direnv or mise work for environment variables.

Activity

  1. added a commit that references this issue on May 30, 2026
    3a5ecf3
  2. added a commit that references this issue on Aug 13, 2026
    60bf3ca
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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