Skip to content

faisal-soomro/dotfiles

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dotfiles

The dotfiles repository for shell customizations.

Layout

  • index.sh — single source of truth. Your shell rc sources this; it sources the fragments below.
  • shell/common.sh*_from_here docker aliases + sources claude_sandbox/aliases.sh and pi_sandbox/aliases.sh if their files exist
  • shell/kube.sh — kubectl/kubectx aliases (k, kg, kd, kx, kn)
  • shell/prompt.sh — cross-shell prompt: git_branch + PS1 (bash) / PROMPT (zsh)
  • claude_sandbox/ — Claude Code sandbox (Dockerfile + claude_from_here alias). See claude_sandbox/RESEARCH.md and claude_sandbox/PLAN.md.
  • pi_sandbox/ — pi-coding-agent sandbox (Dockerfile + pi_from_here + pi_coding warmup wrapper). See pi_sandbox/RESEARCH.md and pi_sandbox/PLAN.md.

Each fragment lazy-stubs aliases whose binary is missing: sourcing on a machine without docker/kubectl/kubectx is silent, and the alias prints <name>: <dep> not installed only when you actually run it.

Wiring it into your shell

Add one line to your live shell rc (the repo is not auto-loaded):

# ~/.bashrc (Linux) or ~/.zshrc (macOS)
source "$HOME/dev_workspace/dotfiles/index.sh"

The prompt fragment sets the prompt for whichever shell sources it — no oh-my-zsh required. If you still have oh-my-zsh active, source index.sh after it so the repo's PROMPT wins.

Acceptance criteria

After wiring index.sh into your shell rc, a working install satisfies all of these:

  • Opening a new shell prints no errors or warnings from sourcing index.sh.
  • echo $? immediately after source index.sh returns 0 in both bash and zsh.
  • The prompt shows user cwd git:(branch) >> with bold-blue parens, red branch.
  • In a dirty repo the prompt appends a yellow ; in a clean repo it doesn't.
  • Outside a git repo the prompt has no git:(…) segment.
  • With docker installed, gcloud_from_here (and the other *_from_here) expand to a docker run command (type gcloud_from_here).
  • With docker uninstalled, running gcloud_from_here prints gcloud_from_here: docker not installed and exits 127 — no warning at startup.
  • Same lazy-stub behavior for k/kg/kd (depend on kubectl) and kx/kn (depend on kubectx/kubens).
  • claude_from_here runs the sandbox image when docker is installed and the claude-sandbox image has been built (see One-time setup).
  • pi_from_here runs the pi-sandbox image when docker is installed and the pi-sandbox image has been built (see One-time setup).
  • pi_coding (warmup wrapper around pi_from_here) fires a backgrounded warmup curl against http://llama.home:8080 before launching pi. Warmup failure does not block launch — model loads on first prompt instead.

*_from_here aliases

shell/common.sh defines *_from_here aliases (alpine, kali, go, python3, gcloud, terraform, aws, prowler) that run a tool in an ephemeral container against $(pwd).

⚠️ These were carried over from an old shell config and are stale / unverified — image tags, mount paths, and the gcloud credential mount all need a test pass before relying on them.

One-time setup

Build the Claude sandbox image:

docker build \
  --build-arg HOST_HOME="$HOME" \
  -t claude-sandbox \
  ~/dev_workspace/dotfiles/claude_sandbox/

Build the pi sandbox image:

docker build \
  --build-arg HOST_HOME="$HOME" \
  -t pi-sandbox \
  ~/dev_workspace/dotfiles/pi_sandbox/

HOST_HOME is baked into both images so host-absolute paths inside config files (~/.claude/plugins/installed_plugins.json, ~/.pi/agent/settings.json) resolve identically inside the container. Rebuild if you move to a machine with a different $HOME. (Wiki paths under /Users/Shared/wikis/ are mounted same-path and don't depend on HOST_HOME. /opt was avoided because OrbStack injects its own dirs there and silently blanks bind-mount contents.)

Pi extension + skill (one-time, per host)

The pi sandbox image ships with pi-coding-agent but no extensions. Inside a pi session, install the octo-pi-extension package (provides breadcrumb hooks + the wiki skill, same canonical wikiHome as Claude's octo plugin):

pi install git:github.com/faisal-soomro/octo-pi-extension@v0.3.0

Then run /octo-setup inside the session to write ~/.config/octo-pi/config.json with your wikiHome.

After both images are built, claude_from_here and pi_from_here work in any directory. pi_coding additionally warms http://llama.home:8080 (the local llama-server engine — see local_ai_lab/ai/README.md) before launching pi.

About

The dotfiles repository for shell customizations

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors