# amir-s/dev architecture

> Architecture diagram of the GitHub repository amir-s/dev, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amir-s/dev
- Repository: https://github.com/amir-s/dev

## Overview

`dev` is a developer-oriented CLI for managing local Git projects and automating common project tasks. Users invoke commands through the CLI dispatcher; commands then inspect or modify repositories, launch tools, or emit shell actions. Major branches include repository creation and navigation, shell integration, project-local automation, network utilities, and configuration. The README documents several capabilities whose source was not sampled; those are represented at their documented module paths, while uncertain internal call links are omitted.

Main entry points: [`main.ts`](https://github.com/amir-s/dev/blob/main/main.ts) (Command dispatcher), [`modules/shell/index.ts`](https://github.com/amir-s/dev/blob/main/modules/shell/index.ts) (Shell commands), [`modules/up/index.ts`](https://github.com/amir-s/dev/blob/main/modules/up/index.ts) (Install dependencies), [`modules/clone/index.ts`](https://github.com/amir-s/dev/blob/main/modules/clone/index.ts) (Clone repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dispatch["CLI dispatch"]
  node_main["Command dispatcher<br/>[main.ts]"]
end

subgraph group_repos["Repository workflows"]
  node_create["Create repository<br/>[index.ts]"]
  node_clone["Clone repository<br/>[index.ts]"]
  node_git["Git CLI"]
  node_github["GitHub CLI/API"]
  node_cd["Fuzzy project navigation<br/>[index.ts]"]
  node_projects["List projects<br/>[index.ts]"]
  node_checkout["Branch checkout<br/>[index.ts]"]
  node_clean["Clean merged branches<br/>[index.ts]"]
  node_open["Open repo or PR<br/>[index.ts]"]
end

subgraph group_shell["Shell integration"]
  node_shell_module["Shell commands<br/>[index.ts]"]
  node_shell_scripts["Shell scripts<br/>[sh.ts]"]
  node_fish_script["Fish script<br/>[fish.ts]"]
end

subgraph group_automation["Project automation"]
  node_contextual["Contextual commands<br/>[index.ts]"]
  node_context_list["Discover scripts<br/>[list.ts]"]
  node_up["Install dependencies<br/>[index.ts]"]
  node_node_up["Node installer<br/>[node.ts]"]
  node_python_up["Python installer<br/>[python.ts]"]
  node_ruby_up["Ruby installer<br/>[ruby.ts]"]
end

subgraph group_network["Network utilities"]
  node_lan["LAN scan and sync<br/>[index.ts]"]
  node_network_tools["Network tools"]
  node_ip["IP information<br/>[index.ts]"]
  node_ipinfo["ipinfo.io"]
end

subgraph group_support["Configuration and tools"]
  node_config_load["Config loader<br/>[index.ts]"]
  node_config_file[("User config<br/>[index.ts]")]
  node_help["Help commands<br/>[index.ts]"]
  node_update["Update command<br/>[index.ts]"]
  node_debug["Debug command<br/>[index.ts]"]
end

node_user(("CLI user"))
node_terminal(("User shell"))

node_user -->|"runs command"| node_main
node_main -->|"loads settings"| node_config_load
node_config_load -->|"reads and writes"| node_config_file
node_main -->|"dispatches"| node_create
node_main -->|"dispatches"| node_clone
node_main -->|"dispatches"| node_cd
node_main -->|"dispatches"| node_projects
node_main -->|"dispatches"| node_checkout
node_main -->|"dispatches"| node_clean
node_main -->|"dispatches"| node_open
node_main -->|"dispatches"| node_shell_module
node_main -->|"dispatches"| node_contextual
node_main -->|"discovers commands"| node_context_list
node_main -->|"dispatches"| node_up
node_main -->|"dispatches"| node_lan
node_main -->|"dispatches"| node_ip
node_main -->|"dispatches"| node_help
node_main -->|"dispatches"| node_update
node_main -->|"dispatches"| node_debug
node_create -->|"creates repository"| node_github
node_create -->|"calls"| node_clone
node_clone -->|"runs clone"| node_git
node_clone -->|"requests directory change"| node_terminal
node_cd -->|"requests directory change"| node_terminal
node_projects -->|"uses matching"| node_cd
node_checkout -->|"checks out branch"| node_git
node_clean -->|"lists and deletes branches"| node_git
node_open -->|"reads remote and branch"| node_git
node_open -->|"opens repository or PR"| node_github
node_shell_module -->|"uses script"| node_shell_scripts
node_shell_module -->|"uses script"| node_fish_script
node_shell_module -->|"installs or sources"| node_terminal
node_contextual -->|"discovers scripts"| node_context_list
node_contextual -->|"runs project command"| node_terminal
node_up -->|"selects installer"| node_node_up
node_up -->|"selects installer"| node_python_up
node_up -->|"selects installer"| node_ruby_up
node_node_up -->|"runs package manager"| node_terminal
node_python_up -->|"runs package manager"| node_terminal
node_ruby_up -->|"runs package manager"| node_terminal
node_lan -->|"queries network and syncs"| node_network_tools
node_ip -.->|"requests IP details"| node_ipinfo

click node_main "https://github.com/amir-s/dev/blob/main/main.ts"
click node_config_load "https://github.com/amir-s/dev/blob/main/modules/config/index.ts"
click node_config_file "https://github.com/amir-s/dev/blob/main/modules/config/index.ts"
click node_create "https://github.com/amir-s/dev/blob/main/modules/create/index.ts"
click node_clone "https://github.com/amir-s/dev/blob/main/modules/clone/index.ts"
click node_cd "https://github.com/amir-s/dev/blob/main/modules/cd/index.ts"
click node_projects "https://github.com/amir-s/dev/blob/main/modules/projects/index.ts"
click node_checkout "https://github.com/amir-s/dev/blob/main/modules/checkout/index.ts"
click node_clean "https://github.com/amir-s/dev/blob/main/modules/clean/index.ts"
click node_open "https://github.com/amir-s/dev/blob/main/modules/open/index.ts"
click node_shell_module "https://github.com/amir-s/dev/blob/main/modules/shell/index.ts"
click node_shell_scripts "https://github.com/amir-s/dev/blob/main/modules/shell/sh.ts"
click node_fish_script "https://github.com/amir-s/dev/blob/main/modules/shell/fish.ts"
click node_contextual "https://github.com/amir-s/dev/blob/main/modules/contextual/index.ts"
click node_context_list "https://github.com/amir-s/dev/blob/main/modules/contextual/list.ts"
click node_up "https://github.com/amir-s/dev/blob/main/modules/up/index.ts"
click node_node_up "https://github.com/amir-s/dev/blob/main/modules/up/node.ts"
click node_python_up "https://github.com/amir-s/dev/blob/main/modules/up/python.ts"
click node_ruby_up "https://github.com/amir-s/dev/blob/main/modules/up/ruby.ts"
click node_lan "https://github.com/amir-s/dev/blob/main/modules/lan/index.ts"
click node_ip "https://github.com/amir-s/dev/blob/main/modules/ip/index.ts"
click node_help "https://github.com/amir-s/dev/blob/main/modules/help/index.ts"
click node_update "https://github.com/amir-s/dev/blob/main/modules/update/index.ts"
click node_debug "https://github.com/amir-s/dev/blob/main/modules/debug/index.ts"

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_main,node_user,node_terminal toneBlue
class node_create,node_clone,node_git,node_github,node_cd,node_projects,node_checkout,node_clean,node_open toneAmber
class node_shell_module,node_shell_scripts,node_fish_script toneMint
class node_contextual,node_context_list,node_up,node_node_up,node_python_up,node_ruby_up toneRose
class node_lan,node_network_tools,node_ip,node_ipinfo toneIndigo
class node_config_load,node_config_file,node_help,node_update,node_debug toneTeal
```

## Components

### CLI dispatch

- [Command dispatcher](https://github.com/amir-s/dev/blob/main/main.ts): `main.ts`

### Repository workflows

- [Create repository](https://github.com/amir-s/dev/blob/main/modules/create/index.ts): `modules/create/index.ts`
- [Clone repository](https://github.com/amir-s/dev/blob/main/modules/clone/index.ts): `modules/clone/index.ts`
- **Git CLI**
- **GitHub CLI/API**
- [Fuzzy project navigation](https://github.com/amir-s/dev/blob/main/modules/cd/index.ts): `modules/cd/index.ts`
- [List projects](https://github.com/amir-s/dev/blob/main/modules/projects/index.ts): `modules/projects/index.ts`
- [Branch checkout](https://github.com/amir-s/dev/blob/main/modules/checkout/index.ts): `modules/checkout/index.ts`
- [Clean merged branches](https://github.com/amir-s/dev/blob/main/modules/clean/index.ts): `modules/clean/index.ts`
- [Open repo or PR](https://github.com/amir-s/dev/blob/main/modules/open/index.ts): `modules/open/index.ts`

### Shell integration

- [Shell commands](https://github.com/amir-s/dev/blob/main/modules/shell/index.ts): `modules/shell/index.ts`
- [Shell scripts](https://github.com/amir-s/dev/blob/main/modules/shell/sh.ts): `modules/shell/sh.ts`
- [Fish script](https://github.com/amir-s/dev/blob/main/modules/shell/fish.ts): `modules/shell/fish.ts`

### Project automation

- [Contextual commands](https://github.com/amir-s/dev/blob/main/modules/contextual/index.ts): `modules/contextual/index.ts`
- [Discover scripts](https://github.com/amir-s/dev/blob/main/modules/contextual/list.ts): `modules/contextual/list.ts`
- [Install dependencies](https://github.com/amir-s/dev/blob/main/modules/up/index.ts): `modules/up/index.ts`
- [Node installer](https://github.com/amir-s/dev/blob/main/modules/up/node.ts): `modules/up/node.ts`
- [Python installer](https://github.com/amir-s/dev/blob/main/modules/up/python.ts): `modules/up/python.ts`
- [Ruby installer](https://github.com/amir-s/dev/blob/main/modules/up/ruby.ts): `modules/up/ruby.ts`

### Network utilities

- [LAN scan and sync](https://github.com/amir-s/dev/blob/main/modules/lan/index.ts): `modules/lan/index.ts`
- **Network tools**
- [IP information](https://github.com/amir-s/dev/blob/main/modules/ip/index.ts): `modules/ip/index.ts`
- **ipinfo.io**

### Configuration and tools

- [Config loader](https://github.com/amir-s/dev/blob/main/modules/config/index.ts): `modules/config/index.ts`
- [User config](https://github.com/amir-s/dev/blob/main/modules/config/index.ts): `modules/config/index.ts`
- [Help commands](https://github.com/amir-s/dev/blob/main/modules/help/index.ts): `modules/help/index.ts`
- [Update command](https://github.com/amir-s/dev/blob/main/modules/update/index.ts): `modules/update/index.ts`
- [Debug command](https://github.com/amir-s/dev/blob/main/modules/debug/index.ts): `modules/debug/index.ts`

### Other components

- **CLI user**
- **User shell**

## Connections

- CLI user → Command dispatcher: runs command
- Command dispatcher → Config loader: loads settings
- Config loader → User config: reads and writes
- Command dispatcher → Create repository: dispatches
- Command dispatcher → Clone repository: dispatches
- Command dispatcher → Fuzzy project navigation: dispatches
- Command dispatcher → List projects: dispatches
- Command dispatcher → Branch checkout: dispatches
- Command dispatcher → Clean merged branches: dispatches
- Command dispatcher → Open repo or PR: dispatches
- Command dispatcher → Shell commands: dispatches
- Command dispatcher → Contextual commands: dispatches
- Command dispatcher → Discover scripts: discovers commands
- Command dispatcher → Install dependencies: dispatches
- Command dispatcher → LAN scan and sync: dispatches
- Command dispatcher → IP information: dispatches
- Command dispatcher → Help commands: dispatches
- Command dispatcher → Update command: dispatches
- Command dispatcher → Debug command: dispatches
- Create repository → GitHub CLI/API: creates repository
- Create repository → Clone repository: calls
- Clone repository → Git CLI: runs clone
- Clone repository → User shell: requests directory change
- Fuzzy project navigation → User shell: requests directory change
- List projects → Fuzzy project navigation: uses matching
- Branch checkout → Git CLI: checks out branch
- Clean merged branches → Git CLI: lists and deletes branches
- Open repo or PR → Git CLI: reads remote and branch
- Open repo or PR → GitHub CLI/API: opens repository or PR
- Shell commands → Shell scripts: uses script
- Shell commands → Fish script: uses script
- Shell commands → User shell: installs or sources
- Contextual commands → Discover scripts: discovers scripts
- Contextual commands → User shell: runs project command
- Install dependencies → Node installer: selects installer
- Install dependencies → Python installer: selects installer
- Install dependencies → Ruby installer: selects installer
- Node installer → User shell: runs package manager
- Python installer → User shell: runs package manager
- Ruby installer → User shell: runs package manager
- LAN scan and sync → Network tools: queries network and syncs
- IP information → ipinfo.io: requests IP details
