@dheerajsom/pinhub 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -20
- package/SETUP.md +6 -3
- package/dist/boards/generated.d.ts +2 -0
- package/dist/boards/generated.js +53747 -0
- package/dist/boards/index.d.ts +4 -0
- package/dist/boards/index.js +6 -0
- package/dist/render/board.js +3 -0
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# pinhub — pinout diagrams in your terminal
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`@dheerajsom/pinhub` installs a tiny cross-platform command, **`ph`**, that draws hardware
|
|
4
4
|
board pinout diagrams straight in your terminal — pin numbers, GPIO names,
|
|
5
5
|
power/ground rails, and the safety warnings that matter, sourced from official
|
|
6
6
|
vendor documentation.
|
|
@@ -31,7 +31,7 @@ Linux. No network access, no telemetry — all board data ships in the package.
|
|
|
31
31
|
Requires Node.js 18.18 or newer.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npm install -g pinhub
|
|
34
|
+
npm install -g @dheerajsom/pinhub
|
|
35
35
|
ph rpi5
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -79,13 +79,19 @@ ph rpi5 --source
|
|
|
79
79
|
|
|
80
80
|
## Boards
|
|
81
81
|
|
|
82
|
+
The catalog carries the full [PinHub website](https://pinhub.vercel.app) board
|
|
83
|
+
set — 125 boards across Raspberry Pi, Arduino, Espressif, STM32, Teensy,
|
|
84
|
+
Adafruit, SparkFun, Seeed, BeagleBone, Jetson, and more. Run `ph list` to see
|
|
85
|
+
everything. A few starters:
|
|
86
|
+
|
|
82
87
|
| Board | Try |
|
|
83
88
|
| --- | --- |
|
|
84
|
-
| Raspberry Pi 5
|
|
85
|
-
| Raspberry Pi Pico | `ph pico` |
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
+
| Raspberry Pi 5 / 4 / Zero 2 W | `ph rpi5` · `ph rpi4` · `ph zero-2-w` |
|
|
90
|
+
| Raspberry Pi Pico / Pico 2 / W | `ph pico` · `ph pico2` · `ph pico-w` |
|
|
91
|
+
| Arduino UNO R3 / Nano / Mega | `ph uno` · `ph nano` · `ph mega` |
|
|
92
|
+
| ESP32 DevKit V1, S2/S3/C3/C6/H2 | `ph esp32` · `ph esp32-s3` · `ph esp32-c3` |
|
|
93
|
+
| STM32 Blue Pill / Nucleo | `ph blue-pill` · `ph nucleo` |
|
|
94
|
+
| Teensy 4.1, micro:bit V2, … | `ph teensy` · `ph microbit` |
|
|
89
95
|
|
|
90
96
|
## Color and accessibility
|
|
91
97
|
|
|
@@ -114,20 +120,27 @@ risk.
|
|
|
114
120
|
|
|
115
121
|
## Contributing boards
|
|
116
122
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
1.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
vendor pinout). Third-party sources are allowed only when official
|
|
125
|
-
documentation is unavailable and must be marked `official: false`.
|
|
126
|
-
- Include the safety warnings that apply (logic level, strapping pins,
|
|
127
|
-
reserved pins, revision differences).
|
|
128
|
-
2. Register it in `src/boards/index.ts` and add aliases people actually type.
|
|
123
|
+
Most of the catalog is **generated from the PinHub website data**
|
|
124
|
+
(`src/lib/boards.ts` at the repository root). To add or fix a board:
|
|
125
|
+
|
|
126
|
+
1. Add it to the website catalog first (it must stay source-backed there),
|
|
127
|
+
then run `npm run generate:boards` in `cli/` to regenerate
|
|
128
|
+
`src/boards/generated.ts`.
|
|
129
|
+
2. Add short aliases people actually type in `scripts/curated-aliases.ts`.
|
|
129
130
|
3. Run `npm test` — catalog invariant tests check sources, warnings, alias
|
|
130
|
-
uniqueness, and pin-grid consistency.
|
|
131
|
+
uniqueness, and pin-grid consistency across all 125 boards.
|
|
132
|
+
|
|
133
|
+
Five flagship boards (Pi 5, Pico, Pico W, UNO R3, ESP32 DevKit V1) have richer
|
|
134
|
+
hand-written modules in `src/boards/`, one file per board, using the typed
|
|
135
|
+
model in `src/model.ts`. For those:
|
|
136
|
+
|
|
137
|
+
- Every pin needs a `physical` number, a grid `position`, a `label`, and a
|
|
138
|
+
`category`.
|
|
139
|
+
- Include at least one **official** source URL (datasheet, schematic, or
|
|
140
|
+
vendor pinout). Third-party sources are allowed only when official
|
|
141
|
+
documentation is unavailable and must be marked `official: false`.
|
|
142
|
+
- Include the safety warnings that apply (logic level, strapping pins,
|
|
143
|
+
reserved pins, revision differences).
|
|
131
144
|
|
|
132
145
|
## Development
|
|
133
146
|
|
package/SETUP.md
CHANGED
|
@@ -30,7 +30,7 @@ network — all board data is bundled.
|
|
|
30
30
|
## 2. Install from npm (recommended)
|
|
31
31
|
|
|
32
32
|
```bash
|
|
33
|
-
npm install -g pinhub
|
|
33
|
+
npm install -g @dheerajsom/pinhub
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
Then verify:
|
|
@@ -70,11 +70,14 @@ npm run dev -- rpi5
|
|
|
70
70
|
## 4. First steps
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
ph list # see
|
|
73
|
+
ph list # see all 125 boards in the catalog
|
|
74
74
|
ph rpi5 # Raspberry Pi 5 GPIO header
|
|
75
75
|
ph pico # Raspberry Pi Pico
|
|
76
76
|
ph uno # Arduino UNO R3
|
|
77
77
|
ph esp32 # ESP32 DevKit V1 (DOIT, 30-pin)
|
|
78
|
+
ph esp32-s3 # ESP32-S3-DevKitC-1
|
|
79
|
+
ph blue-pill # STM32F103 "Blue Pill"
|
|
80
|
+
ph teensy # Teensy 4.1
|
|
78
81
|
ph search raspberry # find boards
|
|
79
82
|
ph info esp32 # warnings, sources, aliases
|
|
80
83
|
ph rpi5 --source # official documentation links
|
|
@@ -114,7 +117,7 @@ control it: widen the terminal, or use `--compact`, or `--width 100`.
|
|
|
114
117
|
**Uninstall**
|
|
115
118
|
|
|
116
119
|
```bash
|
|
117
|
-
npm uninstall -g pinhub
|
|
120
|
+
npm uninstall -g @dheerajsom/pinhub
|
|
118
121
|
```
|
|
119
122
|
|
|
120
123
|
## 6. A note on hardware safety
|