Compare commits
1 Commits
main
...
macos-adap
| Author | SHA1 | Date | |
|---|---|---|---|
| 1526077e00 |
13
.gitconfig
13
.gitconfig
@@ -6,11 +6,6 @@
|
||||
[credential]
|
||||
helper = store
|
||||
[safe]
|
||||
directory = /home/komodo/stacks/librechat/LibreChat
|
||||
directory = /home/komodo/stacks/librechat
|
||||
directory = /home/komodo/stacks/meta-mcp
|
||||
directory = /home/komodo/stacks/meta-mcp
|
||||
directory = /home/vasceannie/apps/meta-mcp
|
||||
[core]
|
||||
sshCommand = ssh -i ~/.ssh/gitlab_ed25519 -F /dev/null
|
||||
autocrlf = input
|
||||
@@ -19,8 +14,8 @@
|
||||
[gpg]
|
||||
format = ssh
|
||||
|
||||
[gpg "ssh"]
|
||||
program = "/mnt/c/Users/PC/AppData/Local/1Password/app/8/op-ssh-sign-wsl"
|
||||
# [gpg "ssh"]
|
||||
# program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
|
||||
|
||||
[commit]
|
||||
gpgsign = true
|
||||
# [commit]
|
||||
# gpgsign = true
|
||||
|
||||
183
.zshrc
183
.zshrc
@@ -30,9 +30,9 @@ export NVM_DIR="$HOME/.nvm"
|
||||
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||
|
||||
export PATH="$PATH:/home/vasceannie/.local/bin"
|
||||
export PATH="$PATH:$HOME/.local/bin"
|
||||
|
||||
export OPENHANDS_STATE_DIR=/home/vasceannie/.openhands-state
|
||||
export OPENHANDS_STATE_DIR=$HOME/.openhands-state
|
||||
source ~/.autoenv/autoenv.plugin.zsh
|
||||
|
||||
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
|
||||
@@ -57,7 +57,7 @@ ZSH_AUTOSUGGEST_STRATEGY=(history completion)
|
||||
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh
|
||||
source ~/.zsh/zsh-autoswitch-virtualenv/autoswitch_virtualenv.plugin.zsh
|
||||
export PATH="/home/vasceannie/.local/bin:$PATH"
|
||||
export PATH="$HOME/.local/bin:$PATH"
|
||||
# 1Password CLI Integration (Windows Desktop App + WSL)
|
||||
# Since you have 1Password desktop app running with CLI integration enabled,
|
||||
# the CLI should automatically connect to your Windows app
|
||||
@@ -145,7 +145,7 @@ function op-setup() {
|
||||
fi
|
||||
}
|
||||
|
||||
# SSH Agent setup - ensure clean startup
|
||||
# SSH Agent setup - ensure clean startup (macOS)
|
||||
function ensure-ssh-agent() {
|
||||
# Check if SSH agent is running and working
|
||||
if ssh-add -l &>/dev/null; then
|
||||
@@ -156,18 +156,21 @@ function ensure-ssh-agent() {
|
||||
killall ssh-agent 2>/dev/null || true
|
||||
eval $(ssh-agent -s)
|
||||
|
||||
# Fix line endings in SSH keys if needed and add them
|
||||
# Add SSH keys if they exist (no dos2unix needed on macOS)
|
||||
if [[ -f ~/.ssh/id_ed25519 ]]; then
|
||||
dos2unix ~/.ssh/id_ed25519 &>/dev/null
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-add ~/.ssh/id_ed25519 &>/dev/null
|
||||
fi
|
||||
|
||||
if [[ -f ~/.ssh/gitlab_ed25519 ]]; then
|
||||
dos2unix ~/.ssh/gitlab_ed25519 &>/dev/null
|
||||
chmod 600 ~/.ssh/gitlab_ed25519
|
||||
ssh-add ~/.ssh/gitlab_ed25519 &>/dev/null
|
||||
fi
|
||||
|
||||
if [[ -f ~/.ssh/id_rsa ]]; then
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-add ~/.ssh/id_rsa &>/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
# Auto-start SSH agent when shell loads (optional)
|
||||
@@ -177,108 +180,33 @@ function ensure-ssh-agent() {
|
||||
# SSH Agent setup for 1Password integration (Modern WSL2 approach)
|
||||
# 1Password 8+ has better WSL2 integration
|
||||
|
||||
# Function to set up modern 1Password SSH agent bridge
|
||||
# macOS 1Password SSH agent setup
|
||||
function setup-op-ssh() {
|
||||
echo "Setting up modern 1Password SSH agent for WSL2..."
|
||||
echo "Setting up 1Password SSH agent for macOS..."
|
||||
|
||||
# Method 1: Try using 1Password's built-in WSL2 support
|
||||
# 1Password 8+ can expose SSH agent to WSL2 directly
|
||||
local op_ssh_socket="/mnt/c/Users/PC/AppData/Local/1password/agent.sock"
|
||||
# Check for 1Password SSH agent socket on macOS
|
||||
local op_ssh_sockets=(
|
||||
"$HOME/.1password/agent.sock"
|
||||
"$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
)
|
||||
|
||||
if [[ -S "$op_ssh_socket" ]]; then
|
||||
echo "✅ Found 1Password SSH agent socket!"
|
||||
export SSH_AUTH_SOCK="$op_ssh_socket"
|
||||
if ssh-add -l >/dev/null 2>&1; then
|
||||
echo "✅ 1Password SSH agent is working!"
|
||||
ssh-add -l
|
||||
return 0
|
||||
for socket in "${op_ssh_sockets[@]}"; do
|
||||
if [[ -S "$socket" ]]; then
|
||||
echo "✅ Found 1Password SSH agent socket: $socket"
|
||||
export SSH_AUTH_SOCK="$socket"
|
||||
if ssh-add -l >/dev/null 2>&1; then
|
||||
echo "✅ 1Password SSH agent is working!"
|
||||
ssh-add -l
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# Method 2: Try the AppData/Roaming location
|
||||
op_ssh_socket="/mnt/c/Users/PC/AppData/Roaming/1password/agent.sock"
|
||||
if [[ -S "$op_ssh_socket" ]]; then
|
||||
echo "✅ Found 1Password SSH agent socket in Roaming!"
|
||||
export SSH_AUTH_SOCK="$op_ssh_socket"
|
||||
if ssh-add -l >/dev/null 2>&1; then
|
||||
echo "✅ 1Password SSH agent is working!"
|
||||
ssh-add -l
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Method 3: Use wsl-ssh-agent (modern replacement for npiperelay)
|
||||
if [[ -f "$HOME/.local/bin/wsl-ssh-agent.exe" ]] || command -v wsl-ssh-agent.exe >/dev/null 2>&1; then
|
||||
echo "Using wsl-ssh-agent..."
|
||||
# Kill any existing agent
|
||||
pkill -f wsl-ssh-agent 2>/dev/null || true
|
||||
rm -f ~/.ssh/agent.sock
|
||||
|
||||
# Start wsl-ssh-agent
|
||||
local wsl_ssh_agent="$HOME/.local/bin/wsl-ssh-agent.exe"
|
||||
[[ ! -f "$wsl_ssh_agent" ]] && wsl_ssh_agent="wsl-ssh-agent.exe"
|
||||
|
||||
# Run wsl-ssh-agent to bridge Windows SSH agent
|
||||
$wsl_ssh_agent &
|
||||
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
|
||||
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > ~/.ssh/agent.env
|
||||
|
||||
# Wait for socket
|
||||
sleep 2
|
||||
if ssh-add -l >/dev/null 2>&1; then
|
||||
echo "✅ wsl-ssh-agent working!"
|
||||
ssh-add -l
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
|
||||
# Method 4: Check if Windows OpenSSH agent is running and bridge to it
|
||||
if powershell.exe -c "Get-Service ssh-agent | Select-Object Status" | grep -q "Running"; then
|
||||
echo "Windows SSH Agent is running, attempting to bridge..."
|
||||
# Kill any existing socket
|
||||
rm -f ~/.ssh/agent.sock
|
||||
pkill -f "socat.*agent.sock" 2>/dev/null || true
|
||||
|
||||
# Create proper bridge to Windows SSH agent named pipe
|
||||
# This is the correct way to bridge Windows SSH agent to WSL2
|
||||
(setsid socat UNIX-LISTEN:$HOME/.ssh/agent.sock,fork EXEC:"/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe -Command '\$pipe = new-object System.IO.Pipes.NamedPipeClientStream \".\", \"openssh-ssh-agent\", \"InOut\"; \$pipe.Connect(); \$input | \$pipe.CopyTo([Console]::OpenStandardOutput()); \$pipe.Dispose()'" > /dev/null 2>&1 &)
|
||||
|
||||
export SSH_AUTH_SOCK="$HOME/.ssh/agent.sock"
|
||||
echo "SSH_AUTH_SOCK=$SSH_AUTH_SOCK" > ~/.ssh/agent.env
|
||||
|
||||
# Wait for socket to be created
|
||||
local count=0
|
||||
while [[ ! -S "$SSH_AUTH_SOCK" && $count -lt 10 ]]; do
|
||||
sleep 0.5
|
||||
((count++))
|
||||
done
|
||||
|
||||
if ssh-add -l >/dev/null 2>&1; then
|
||||
echo "✅ Successfully bridged to Windows SSH agent!"
|
||||
ssh-add -l
|
||||
return 0
|
||||
else
|
||||
echo "Bridge created but SSH agent not responding. Trying alternative method..."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Function to install wsl-ssh-agent (modern solution)
|
||||
function install-wsl-ssh-agent() {
|
||||
echo "Installing wsl-ssh-agent..."
|
||||
local install_dir="$HOME/.local/bin"
|
||||
mkdir -p "$install_dir"
|
||||
|
||||
# Download latest release
|
||||
curl -L https://github.com/rupor-github/wsl-ssh-agent/releases/latest/download/wsl-ssh-agent.exe -o "$install_dir/wsl-ssh-agent.exe"
|
||||
chmod +x "$install_dir/wsl-ssh-agent.exe"
|
||||
|
||||
if [[ -f "$install_dir/wsl-ssh-agent.exe" ]]; then
|
||||
echo "✅ wsl-ssh-agent installed successfully!"
|
||||
echo "Now run: ssh-setup"
|
||||
else
|
||||
echo "❌ Failed to install wsl-ssh-agent"
|
||||
fi
|
||||
}
|
||||
echo "❌ 1Password SSH agent not found. Make sure:"
|
||||
echo "1. 1Password app is running and unlocked"
|
||||
echo "2. SSH agent integration is enabled in 1Password settings"
|
||||
echo "3. Developer settings → SSH Agent is enabled"
|
||||
return 1
|
||||
}
|
||||
|
||||
# Auto-setup SSH agent (comment out if you don't want automatic setup)
|
||||
@@ -300,11 +228,10 @@ function ssh-status() {
|
||||
else
|
||||
echo "❌ SSH agent issue. Checking 1Password SSH integration..."
|
||||
|
||||
# Check various possible socket locations
|
||||
# Check macOS 1Password socket locations
|
||||
local possible_sockets=(
|
||||
"$HOME/.1password/agent.sock"
|
||||
"/mnt/c/Users/$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r')/.1password/agent.sock"
|
||||
"/mnt/c/Users/$(cmd.exe /c "echo %USERNAME%" 2>/dev/null | tr -d '\r')/AppData/Local/1password/agent.sock"
|
||||
"$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
|
||||
)
|
||||
|
||||
local found_socket=false
|
||||
@@ -320,38 +247,32 @@ function ssh-status() {
|
||||
if [[ "$found_socket" == false ]]; then
|
||||
echo "❌ No 1Password SSH agent socket found in common locations"
|
||||
echo "Make sure SSH agent integration is enabled in 1Password settings"
|
||||
echo "Try restarting 1Password app on Windows"
|
||||
echo "Try restarting 1Password app on macOS"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Function to install wsl-ssh-agent (modern solution)
|
||||
function install-wsl-ssh-agent() {
|
||||
echo "Installing wsl-ssh-agent..."
|
||||
local install_dir="$HOME/.local/bin"
|
||||
mkdir -p "$install_dir"
|
||||
|
||||
# Download latest release
|
||||
curl -L https://github.com/rupor-github/wsl-ssh-agent/releases/latest/download/wsl-ssh-agent.exe -o "$install_dir/wsl-ssh-agent.exe"
|
||||
chmod +x "$install_dir/wsl-ssh-agent.exe"
|
||||
|
||||
if [[ -f "$install_dir/wsl-ssh-agent.exe" ]]; then
|
||||
echo "✅ wsl-ssh-agent installed successfully!"
|
||||
echo "Now run: ssh-setup"
|
||||
# Function to set up SSH agent on macOS
|
||||
function install-ssh-tools() {
|
||||
echo "Installing SSH tools for macOS..."
|
||||
if command -v brew >/dev/null 2>&1; then
|
||||
echo "Installing openssh and related tools via Homebrew..."
|
||||
brew install openssh
|
||||
echo "✅ SSH tools installed successfully!"
|
||||
else
|
||||
echo "❌ Failed to install wsl-ssh-agent"
|
||||
echo "❌ Homebrew not found. Please install Homebrew first."
|
||||
fi
|
||||
}
|
||||
|
||||
# Alias for convenience
|
||||
# SSH aliases for macOS
|
||||
alias ssh-check='ssh-status'
|
||||
alias ssh-setup='setup-op-ssh'
|
||||
alias install-ssh-agent='install-wsl-ssh-agent'
|
||||
alias install-ssh-tools='install-ssh-tools'
|
||||
alias ssh-start='ensure-ssh-agent'
|
||||
|
||||
|
||||
# bun completions
|
||||
[ -s "/home/vasceannie/.bun/_bun" ] && source "/home/vasceannie/.bun/_bun"
|
||||
[ -s "$HOME/.bun/_bun" ] && source "$HOME/.bun/_bun"
|
||||
|
||||
# bun
|
||||
export BUN_INSTALL="$HOME/.bun"
|
||||
@@ -366,11 +287,17 @@ export PATH="$HOME/.cargo/bin:$PATH"
|
||||
# Task Master aliases added on 7/9/2025
|
||||
alias tm='task-master'
|
||||
alias taskmaster='task-master'
|
||||
export PATH="$PATH:/home/vasceannie/scripts"
|
||||
export PATH="$PATH:$HOME/scripts"
|
||||
export LIBGL_ALWAYS_SOFTWARE=1
|
||||
export MESA_LOADER_DRIVER_OVERRIDE=swrast
|
||||
export LIBGL_ALWAYS_SOFTWARE=1
|
||||
|
||||
alias claude="/home/vasceannie/.claude/local/claude"
|
||||
alias claude="$HOME/.claude/local/claude"
|
||||
|
||||
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
|
||||
# macOS Homebrew (Apple Silicon)
|
||||
if [[ -f "/opt/homebrew/bin/brew" ]]; then
|
||||
eval "$(/opt/homebrew/bin/brew shellenv)"
|
||||
# macOS Homebrew (Intel)
|
||||
elif [[ -f "/usr/local/bin/brew" ]]; then
|
||||
eval "$(/usr/local/bin/brew shellenv)"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user