# hggaguilera/sf-shortcuts architecture

> Architecture diagram of the GitHub repository hggaguilera/sf-shortcuts, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-23). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hggaguilera/sf-shortcuts
- Repository: https://github.com/hggaguilera/sf-shortcuts

## Overview

sf-shortcuts provides matching Salesforce CLI shortcuts and tab completion for zsh, bash, and PowerShell. Users invoke shell commands to deploy, retrieve, preview changes, run queries, and select Salesforce orgs; completions use project metadata and CLI org aliases. The README documents these capabilities but no source excerpts were provided, so relationships below are limited to those documented there.

Main entry points: [`sf-shortcuts.plugin.zsh`](https://github.com/hggaguilera/sf-shortcuts/blob/main/sf-shortcuts.plugin.zsh) (zsh shortcuts), [`bash/sf-shortcuts.bash`](https://github.com/hggaguilera/sf-shortcuts/blob/main/bash/sf-shortcuts.bash) (bash shortcuts), [`powershell/SfShortcuts.psm1`](https://github.com/hggaguilera/sf-shortcuts/blob/main/powershell/SfShortcuts.psm1) (PowerShell shortcuts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_zsh["zsh shortcuts"]
  node_zsh_shortcuts["zsh shortcuts"]
end

subgraph group_bash["bash shortcuts"]
  node_bash_shortcuts["bash shortcuts<br/>[sf-shortcuts.bash]"]
end

subgraph group_powershell["PowerShell shortcuts"]
  node_ps_shortcuts["PowerShell shortcuts<br/>[SfShortcuts.psm1]"]
end

node_user(("Terminal user"))
node_project["Salesforce project"]
node_salesforce_cli["Salesforce CLI"]
node_git["Git repository"]

node_user -->|"runs commands"| node_zsh_shortcuts
node_user -->|"runs commands"| node_bash_shortcuts
node_user -->|"runs commands"| node_ps_shortcuts
node_zsh_shortcuts -->|"runs sf commands"| node_salesforce_cli
node_bash_shortcuts -->|"runs sf commands"| node_salesforce_cli
node_ps_shortcuts -->|"runs sf commands"| node_salesforce_cli
node_zsh_shortcuts -->|"reads completion names"| node_project
node_bash_shortcuts -->|"reads completion names"| node_project
node_ps_shortcuts -->|"reads completion names"| node_project
node_zsh_shortcuts -->|"gets org aliases"| node_salesforce_cli
node_bash_shortcuts -->|"gets org aliases"| node_salesforce_cli
node_ps_shortcuts -->|"gets org aliases"| node_salesforce_cli
node_zsh_shortcuts -->|"checks branch changes"| node_git
node_bash_shortcuts -->|"checks branch changes"| node_git
node_ps_shortcuts -->|"checks branch changes"| node_git

click node_zsh_shortcuts "https://github.com/hggaguilera/sf-shortcuts/blob/main/sf-shortcuts.plugin.zsh"
click node_bash_shortcuts "https://github.com/hggaguilera/sf-shortcuts/blob/main/bash/sf-shortcuts.bash"
click node_ps_shortcuts "https://github.com/hggaguilera/sf-shortcuts/blob/main/powershell/SfShortcuts.psm1"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_zsh_shortcuts,node_user toneBlue
class node_bash_shortcuts toneAmber
class node_ps_shortcuts toneMint
class node_project,node_salesforce_cli,node_git toneIndigo
```

## Components

### zsh shortcuts

- [zsh shortcuts](https://github.com/hggaguilera/sf-shortcuts/blob/main/sf-shortcuts.plugin.zsh): `sf-shortcuts.plugin.zsh`

### bash shortcuts

- [bash shortcuts](https://github.com/hggaguilera/sf-shortcuts/blob/main/bash/sf-shortcuts.bash): `bash/sf-shortcuts.bash`

### PowerShell shortcuts

- [PowerShell shortcuts](https://github.com/hggaguilera/sf-shortcuts/blob/main/powershell/SfShortcuts.psm1): `powershell/SfShortcuts.psm1`

### Other components

- **Terminal user**
- **Salesforce project**
- **Salesforce CLI**
- **Git repository**

## Connections

- Terminal user → zsh shortcuts: runs commands (evidence: `README.md`)
- Terminal user → bash shortcuts: runs commands (evidence: `README.md`)
- Terminal user → PowerShell shortcuts: runs commands (evidence: `README.md`)
- zsh shortcuts → Salesforce CLI: runs sf commands (evidence: `README.md`)
- bash shortcuts → Salesforce CLI: runs sf commands (evidence: `README.md`)
- PowerShell shortcuts → Salesforce CLI: runs sf commands (evidence: `README.md`)
- zsh shortcuts → Salesforce project: reads completion names (evidence: `README.md`)
- bash shortcuts → Salesforce project: reads completion names (evidence: `README.md`)
- PowerShell shortcuts → Salesforce project: reads completion names (evidence: `README.md`)
- zsh shortcuts → Salesforce CLI: gets org aliases (evidence: `README.md`)
- bash shortcuts → Salesforce CLI: gets org aliases (evidence: `README.md`)
- PowerShell shortcuts → Salesforce CLI: gets org aliases (evidence: `README.md`)
- zsh shortcuts → Git repository: checks branch changes (evidence: `README.md`)
- bash shortcuts → Git repository: checks branch changes (evidence: `README.md`)
- PowerShell shortcuts → Git repository: checks branch changes (evidence: `README.md`)
