Cross-platform shell configuration for Linux and macOS with enhanced git workflows and Mozilla Firefox development tools.
python setup.py # Basic setup
python setup.py --mozilla # Add Mozilla dev tools
python setup.py --claude-security # Add Claude Code security hooks
python setup.py --claude-session-sync # Add session transcript sync
python setup.py --all # Install everything
python setup.py --dry-run # Preview changes first
# Firefox Claude settings (per-project)
python setup.py --install-firefox-claude /path/to/firefox
bash uninstall.sh # Remove dotfilesSymlinks: ~/.dotfiles, ~/.bashrc, ~/.settings_{platform}
(+ ~/.zshrc on macOS)
Git config: git/config included via ~/.gitconfig
Mozilla (optional): Mach aliases, machrc, pernosco-submit, Rust/Cargo environment
git st / br / co / ci # status, branch, checkout, commit
git df / pl / ps # diff, pull, push
git rb / cp # rebase, cherry-pick
git l / la / lg / ll # Log views (one-line, all, graph)
git search "text" # Search commit messages
git file-log <file> # File historyGitLastCommit vim # Open last commit files in editor
GitUncommit code # Open modified files in editor
GitAddExcept -u file1 file2 # Add all except listed files
GitDeleteBranch <branch> # Delete local+remote branch
GitRenameBranch <old> <new> # Rename local+remote branchRecursivelyFind "*.sh" # Find files recursively
RecursivelyRemove "*.DS_Store" # Delete files (with confirm)
Trash file1 file2 # Move files to trash
HostHTTP # Start local HTTP servermb / mr / mc / mfb # Build, run, clobber, fmt+build
mfmt / mfmtfor / mfmtuc # Format: all, path, uncommitted
mm / mg / mw / mt # Test: mochi, gtest, wpt, try
UpdateCrate <crate> # Update Rust crateSystem-wide hooks that protect sensitive files (SSH keys, cloud credentials, API tokens, password managers) across all Claude Code sessions.
python setup.py --claude-security # Install
python setup.py --show-claude-hooks # Show hooks
python setup.py --show-claude-security-log # View log
python setup.py --remove-claude-security # UninstallSee CLAUDE_SECURITY.md for details.
Export Claude Code session transcripts (JSONL) to readable markdown or raw copies, with batch sync and manifest-based state tracking.
python setup.py --claude-session-sync # InstallThis symlinks claude-session-sync into ~/.local/bin
and appends session-sync instructions to ~/.claude/CLAUDE.md.
Set CLAUDE_TRANSCRIPT_DIR to avoid repeating the destination:
export CLAUDE_TRANSCRIPT_DIR=~/transcripts # add to .bashrcWhen set, all commands use it as the default <dest>.
An explicit <dest> argument still takes priority.
Export a single session:
claude-session-sync export <session.jsonl> # uses $CLAUDE_TRANSCRIPT_DIR
claude-session-sync export <session.jsonl> ~/transcripts # explicit dest
claude-session-sync export <session.jsonl> --format raw # Copy JSONL as-is
claude-session-sync export <session.jsonl> --force # Re-export even if unchanged
claude-session-sync export <session.jsonl> --include-subagents # Include subagent messagesBatch sync all sessions:
claude-session-sync sync-all # uses $CLAUDE_TRANSCRIPT_DIR
claude-session-sync sync-all ~/transcripts --project-filter ~/Work # Only projects under ~/Work
claude-session-sync sync-all --force # Re-export everything
claude-session-sync sync-all --include-subagents # Include subagent messagesCheck sync status:
claude-session-sync status # uses $CLAUDE_TRANSCRIPT_DIR
claude-session-sync status ~/transcripts --project-filter ~/WorkExport current session (auto-detect by cwd):
claude-session-sync export-current # uses $PWD + $CLAUDE_TRANSCRIPT_DIR
claude-session-sync export-current --project-dir ~/Work/firefox~/transcripts/
firefox/ # Project name (from cwd)
2026-02-24_9191a42c.md # Markdown transcript
worklog/
2026-02-24_abc12345.md
.claude-sync-manifest.json # Tracks sync state (mtime-based)
When sync-all encounters projects with the same basename
(e.g., /Work/X/Z and /Work/Y/Z), it automatically uses
enough trailing path components to disambiguate (X/Z/ vs Y/Z/).
Install Firefox-specific Claude hooks and skills (auto-format, auto-lint, skills) to any Firefox project. Uses symlinks so updates propagate to all linked projects.
# Install (prompts for path)
python setup.py --install-firefox-claude
# Install to specific path
python setup.py --install-firefox-claude /path/to/firefox
# Uninstall
python setup.py --uninstall-firefox-claude /path/to/firefoxDuring installation you can provide a path to a
tech-docs index file. This is a markdown file that
lists generated technical documents so Claude can look up
relevant references on demand. If CLAUDE.local.md
already references the file, the prompt is skipped
on re-runs.
Example INDEX.md:
# Tech Docs Index
| Domain | Document | Description |
| ------ | -------- | ----------- |
| WebCodecs | webcodecs.md | Codec pipeline |
| Media | media-playback.md | Decoder lifecycle |
| MSE | mse.md | SourceBuffer management |Generate these documents with the /tech-doc skill
after installation.
Restart Claude Code after installation for changes to take effect.
bash test_all.sh # All suites (90+ tests)
python3 test_setup.py # Setup + Claude security
bash test_shell_utils.sh # Shell utilities
python3 test_claude_security.py # Security hooks
bash test_prompt_colors.sh # Prompt colors
python3 claude/test_session_sync.py # Session sync (51 tests)See TESTING.md for details.
Customize paths via ~/.dotfiles_config:
DOTFILES_MOZBUILD_DIR="$HOME/my-mozbuild"
DOTFILES_LOCAL_BIN_DIR="$HOME/bin"
DOTFILES_TRASH_DIR_LINUX="$HOME/.trash"Available: DOTFILES_MOZBUILD_DIR,
DOTFILES_LOCAL_BIN_DIR,
DOTFILES_CARGO_DIR, DOTFILES_TRASH_DIR_LINUX,
DOTFILES_TRASH_DIR_DARWIN
See CLAUDE.md for architecture details, module organization, naming conventions, and implementation notes.