Skip to content

Commit 03a229d

Browse files
committed
✨ SSH / SFTP Filesystems
1 parent 5561293 commit 03a229d

File tree

6 files changed

+114
-6
lines changed

6 files changed

+114
-6
lines changed

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
and remote filesystems with your keyboard or mouse.
1818

1919
You can quickly navigate through directories and peek at files whether they're hosted **locally**,
20-
in **GitHub**, **AWS S3**, **Google Cloud Storage**, or **Azure Blob Storage**. View code files
20+
in **GitHub**, over **SSH**, in **AWS S3**, **Google Cloud Storage**, or **Azure Blob Storage**. View code files
2121
with syntax highlighting, format JSON files, render images, convert data files to navigable
2222
datatables, and more.
2323

@@ -92,7 +92,13 @@ browsr github://juftin:browsr-private@main
9292
browsr s3://my-bucket
9393
```
9494

95-
\*\* _Currently AWS S3, Google Cloud Storage, and Azure Blob Storage are supported._
95+
\*\* _Currently AWS S3, Google Cloud Storage, and Azure Blob Storage / Data Lake are supported._
96+
97+
### SSH / SFTP
98+
99+
```shell
100+
browsr ssh://username@example.com:22
101+
```
96102

97103
## License
98104

browsr/_cli.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def browsr(
5252
browsr 🗂️ a pleasant file explorer in your terminal
5353
5454
Navigate through directories and peek at files whether they're hosted locally,
55-
in GitHub, AWS S3, Google Cloud Storage, or Azure Blob Storage. View code files
55+
over SSH, in GitHub, AWS S3, Google Cloud Storage, or Azure Blob Storage. View code files
5656
with syntax highlighting, format JSON files, render images, convert data files to navigable
5757
datatables, and more.
5858
@@ -140,6 +140,18 @@ def browsr(
140140
browsr https://github.com/juftin/browsr
141141
```
142142
143+
#### Browse a Filesystem over SSH
144+
145+
```
146+
browsr ssh://user@host:22
147+
```
148+
149+
#### Browse a SFTP Server
150+
151+
```
152+
browsr sftp://user@host:22/path/to/directory
153+
```
154+
143155
## Key Bindings
144156
- **`Q`** - Quit the application
145157
- **`F`** - Toggle the file tree sidebar

docs/index.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
and remote filesystems with your keyboard or mouse.
1818

1919
You can quickly navigate through directories and peek at files whether they're hosted **locally**,
20-
in **GitHub**, **AWS S3**, **Google Cloud Storage**, or **Azure Blob Storage**. View code files
20+
in **GitHub**, over **SSH**, in **AWS S3**, **Google Cloud Storage**, or **Azure Blob Storage**. View code files
2121
with syntax highlighting, format JSON files, render images, convert data files to navigable
2222
datatables, and more.
2323

@@ -136,3 +136,9 @@ browsr s3://my-bucket
136136
```
137137

138138
** _Currently AWS S3, Google Cloud Storage, and Azure Blob Storage are supported._
139+
140+
### SSH / SFTP
141+
142+
```shell
143+
browsr ssh://username@example.com:22
144+
```

pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ all = [
4141
"requests~=2.28.2",
4242
"gcsfs~=2023.1.0",
4343
"adlfs~=2023.1.0",
44-
"aiohttp~=3.8.3"
44+
"aiohttp~=3.8.3",
45+
"paramiko~=3.1.0"
4546
]
4647
parquet = [
4748
"pyarrow~=10.0.0"
@@ -51,7 +52,8 @@ remote = [
5152
"requests~=2.28.2",
5253
"gcsfs~=2023.1.0",
5354
"adlfs~=2023.1.0",
54-
"aiohttp~=3.8.3"
55+
"aiohttp~=3.8.3",
56+
"paramiko~=3.1.0"
5557
]
5658

5759
[project.scripts]

requirements/requirements-dev.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,29 @@ azure-storage-blob==12.16.0 \
150150
--hash=sha256:43b45f19a518a5c6895632f263b3825ebc23574f25cc84b66e1630a6160e466f \
151151
--hash=sha256:91bb192b2a97939c4259c72373bac0f41e30810bbc853d5184f0f45904eacafd
152152
# via adlfs
153+
bcrypt==4.0.1 \
154+
--hash=sha256:089098effa1bc35dc055366740a067a2fc76987e8ec75349eb9484061c54f535 \
155+
--hash=sha256:08d2947c490093a11416df18043c27abe3921558d2c03e2076ccb28a116cb6d0 \
156+
--hash=sha256:0eaa47d4661c326bfc9d08d16debbc4edf78778e6aaba29c1bc7ce67214d4410 \
157+
--hash=sha256:27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd \
158+
--hash=sha256:2b3ac11cf45161628f1f3733263e63194f22664bf4d0c0f3ab34099c02134665 \
159+
--hash=sha256:2caffdae059e06ac23fce178d31b4a702f2a3264c20bfb5ff541b338194d8fab \
160+
--hash=sha256:3100851841186c25f127731b9fa11909ab7b1df6fc4b9f8353f4f1fd952fbf71 \
161+
--hash=sha256:5ad4d32a28b80c5fa6671ccfb43676e8c1cc232887759d1cd7b6f56ea4355215 \
162+
--hash=sha256:67a97e1c405b24f19d08890e7ae0c4f7ce1e56a712a016746c8b2d7732d65d4b \
163+
--hash=sha256:705b2cea8a9ed3d55b4491887ceadb0106acf7c6387699fca771af56b1cdeeda \
164+
--hash=sha256:8a68f4341daf7522fe8d73874de8906f3a339048ba406be6ddc1b3ccb16fc0d9 \
165+
--hash=sha256:a522427293d77e1c29e303fc282e2d71864579527a04ddcfda6d4f8396c6c36a \
166+
--hash=sha256:ae88eca3024bb34bb3430f964beab71226e761f51b912de5133470b649d82344 \
167+
--hash=sha256:b1023030aec778185a6c16cf70f359cbb6e0c289fd564a7cfa29e727a1c38f8f \
168+
--hash=sha256:b3b85202d95dd568efcb35b53936c5e3b3600c7cdcc6115ba461df3a8e89f38d \
169+
--hash=sha256:b57adba8a1444faf784394de3436233728a1ecaeb6e07e8c22c8848f179b893c \
170+
--hash=sha256:bf4fa8b2ca74381bb5442c089350f09a3f17797829d958fad058d6e44d9eb83c \
171+
--hash=sha256:ca3204d00d3cb2dfed07f2d74a25f12fc12f73e606fcaa6975d1f7ae69cacbb2 \
172+
--hash=sha256:cbb03eec97496166b704ed663a53680ab57c5084b2fc98ef23291987b525cb7d \
173+
--hash=sha256:e9a51bbfe7e9802b5f3508687758b564069ba937748ad7b9e890086290d2f79e \
174+
--hash=sha256:fbdaec13c5105f0c4e5c52614d04f0bca5f5af007910daa8b6b12095edaa67b3
175+
# via paramiko
153176
black==23.3.0 \
154177
--hash=sha256:064101748afa12ad2291c2b91c960be28b817c0c7eaa35bec09cc63aa56493c5 \
155178
--hash=sha256:0945e13506be58bf7db93ee5853243eb368ace1c08a24c65ce108986eac65915 \
@@ -261,6 +284,7 @@ cffi==1.15.1 \
261284
# via
262285
# azure-datalake-store
263286
# cryptography
287+
# pynacl
264288
charset-normalizer==3.1.0 \
265289
--hash=sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6 \
266290
--hash=sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1 \
@@ -435,6 +459,7 @@ cryptography==40.0.2 \
435459
# azure-identity
436460
# azure-storage-blob
437461
# msal
462+
# paramiko
438463
# pyjwt
439464
decorator==5.1.1 \
440465
--hash=sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330 \
@@ -1077,6 +1102,10 @@ pandas-stubs==2.0.0.230412 \
10771102
--hash=sha256:016f567cb9947edd0067ea2665ab00b77fa47e73a65ce1a097de4f499b3485c0 \
10781103
--hash=sha256:311ab8b42ee574d9fea5061d1f63aeca297e472de6073ba84bf2a017c6cb1b6b
10791104
# via -r requirements.in
1105+
paramiko==3.1.0 \
1106+
--hash=sha256:6950faca6819acd3219d4ae694a23c7a87ee38d084f70c1724b0c0dbb8b75769 \
1107+
--hash=sha256:f0caa660e797d9cd10db6fc6ae81e2c9b2767af75c3180fcd0e46158cd368d7f
1108+
# via -r requirements.in
10801109
pathspec==0.11.1 \
10811110
--hash=sha256:2798de800fa92780e33acca925945e9a19a133b715067cf165b8866c15a31687 \
10821111
--hash=sha256:d8af70af76652554bd134c22b3e8a1cc46ed7d91edcdd721ef1a0c51a84a5293
@@ -1275,6 +1304,18 @@ pymupdf==1.22.3 \
12751304
--hash=sha256:ed4a624ffc9bebe5c67fc80e16798300d404089585bcdac14448034bd38c5072 \
12761305
--hash=sha256:fa934c1a02f1f3bb04e447b95ef5b19d03cb2575fee76d23cb7a6d0c526444e2
12771306
# via -r requirements.in
1307+
pynacl==1.5.0 \
1308+
--hash=sha256:06b8f6fa7f5de8d5d2f7573fe8c863c051225a27b61e6860fd047b1775807858 \
1309+
--hash=sha256:0c84947a22519e013607c9be43706dd42513f9e6ae5d39d3613ca1e142fba44d \
1310+
--hash=sha256:20f42270d27e1b6a29f54032090b972d97f0a1b0948cc52392041ef7831fee93 \
1311+
--hash=sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1 \
1312+
--hash=sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92 \
1313+
--hash=sha256:61f642bf2378713e2c2e1de73444a3778e5f0a38be6fee0fe532fe30060282ff \
1314+
--hash=sha256:8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba \
1315+
--hash=sha256:a36d4a9dda1f19ce6e03c9a784a2921a4b726b02e1c736600ca9c22029474394 \
1316+
--hash=sha256:a422368fc821589c228f4c49438a368831cb5bbc0eab5ebe1d7fac9dded6567b \
1317+
--hash=sha256:e46dae94e34b085175f8abb3b0aaa7da40767865ac82c928eeb9e57e1ea8a543
1318+
# via paramiko
12781319
pyproject-hooks==1.0.0 \
12791320
--hash=sha256:283c11acd6b928d2f6a7c73fa0d01cb2bdc5f07c57a2eeb6e83d5e56b97976f8 \
12801321
--hash=sha256:f271b298b97f5955d53fb12b72c1fb1948c22c1a6b70b315c54cedaca0264ef5

requirements/requirements-prod.txt

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,29 @@ azure-storage-blob==12.16.0 \
149149
--hash=sha256:43b45f19a518a5c6895632f263b3825ebc23574f25cc84b66e1630a6160e466f \
150150
--hash=sha256:91bb192b2a97939c4259c72373bac0f41e30810bbc853d5184f0f45904eacafd
151151
# via adlfs
152+
bcrypt==4.0.1 \
153+
--hash=sha256:089098effa1bc35dc055366740a067a2fc76987e8ec75349eb9484061c54f535 \
154+
--hash=sha256:08d2947c490093a11416df18043c27abe3921558d2c03e2076ccb28a116cb6d0 \
155+
--hash=sha256:0eaa47d4661c326bfc9d08d16debbc4edf78778e6aaba29c1bc7ce67214d4410 \
156+
--hash=sha256:27d375903ac8261cfe4047f6709d16f7d18d39b1ec92aaf72af989552a650ebd \
157+
--hash=sha256:2b3ac11cf45161628f1f3733263e63194f22664bf4d0c0f3ab34099c02134665 \
158+
--hash=sha256:2caffdae059e06ac23fce178d31b4a702f2a3264c20bfb5ff541b338194d8fab \
159+
--hash=sha256:3100851841186c25f127731b9fa11909ab7b1df6fc4b9f8353f4f1fd952fbf71 \
160+
--hash=sha256:5ad4d32a28b80c5fa6671ccfb43676e8c1cc232887759d1cd7b6f56ea4355215 \
161+
--hash=sha256:67a97e1c405b24f19d08890e7ae0c4f7ce1e56a712a016746c8b2d7732d65d4b \
162+
--hash=sha256:705b2cea8a9ed3d55b4491887ceadb0106acf7c6387699fca771af56b1cdeeda \
163+
--hash=sha256:8a68f4341daf7522fe8d73874de8906f3a339048ba406be6ddc1b3ccb16fc0d9 \
164+
--hash=sha256:a522427293d77e1c29e303fc282e2d71864579527a04ddcfda6d4f8396c6c36a \
165+
--hash=sha256:ae88eca3024bb34bb3430f964beab71226e761f51b912de5133470b649d82344 \
166+
--hash=sha256:b1023030aec778185a6c16cf70f359cbb6e0c289fd564a7cfa29e727a1c38f8f \
167+
--hash=sha256:b3b85202d95dd568efcb35b53936c5e3b3600c7cdcc6115ba461df3a8e89f38d \
168+
--hash=sha256:b57adba8a1444faf784394de3436233728a1ecaeb6e07e8c22c8848f179b893c \
169+
--hash=sha256:bf4fa8b2ca74381bb5442c089350f09a3f17797829d958fad058d6e44d9eb83c \
170+
--hash=sha256:ca3204d00d3cb2dfed07f2d74a25f12fc12f73e606fcaa6975d1f7ae69cacbb2 \
171+
--hash=sha256:cbb03eec97496166b704ed663a53680ab57c5084b2fc98ef23291987b525cb7d \
172+
--hash=sha256:e9a51bbfe7e9802b5f3508687758b564069ba937748ad7b9e890086290d2f79e \
173+
--hash=sha256:fbdaec13c5105f0c4e5c52614d04f0bca5f5af007910daa8b6b12095edaa67b3
174+
# via paramiko
152175
botocore==1.27.59 \
153176
--hash=sha256:69d756791fc024bda54f6c53f71ae34e695ee41bbbc1743d9179c4837a4929da \
154177
--hash=sha256:eda4aed6ee719a745d1288eaf1beb12f6f6448ad1fa12f159405db14ba9c92cf
@@ -229,6 +252,7 @@ cffi==1.15.1 \
229252
# via
230253
# azure-datalake-store
231254
# cryptography
255+
# pynacl
232256
charset-normalizer==3.1.0 \
233257
--hash=sha256:04afa6387e2b282cf78ff3dbce20f0cc071c12dc8f685bd40960cc68644cfea6 \
234258
--hash=sha256:04eefcee095f58eaabe6dc3cc2262f3bcd776d2c67005880894f447b3f2cb9c1 \
@@ -339,6 +363,7 @@ cryptography==40.0.2 \
339363
# azure-identity
340364
# azure-storage-blob
341365
# msal
366+
# paramiko
342367
# pyjwt
343368
decorator==5.1.1 \
344369
--hash=sha256:637996211036b6385ef91435e4fae22989472f9d571faba8927ba8253acbc330 \
@@ -730,6 +755,10 @@ pandas==1.5.3 \
730755
--hash=sha256:e474390e60ed609cec869b0da796ad94f420bb057d86784191eefc62b65819ae \
731756
--hash=sha256:f76d097d12c82a535fda9dfe5e8dd4127952b45fea9b0276cb30cca5ea313fbc
732757
# via -r requirements.in
758+
paramiko==3.1.0 \
759+
--hash=sha256:6950faca6819acd3219d4ae694a23c7a87ee38d084f70c1724b0c0dbb8b75769 \
760+
--hash=sha256:f0caa660e797d9cd10db6fc6ae81e2c9b2767af75c3180fcd0e46158cd368d7f
761+
# via -r requirements.in
733762
pillow==9.5.0 \
734763
--hash=sha256:07999f5834bdc404c442146942a2ecadd1cb6292f5229f4ed3b31e0a108746b1 \
735764
--hash=sha256:0852ddb76d85f127c135b6dd1f0bb88dbb9ee990d2cd9aa9e28526c93e794fba \
@@ -904,6 +933,18 @@ pymupdf==1.22.3 \
904933
--hash=sha256:ed4a624ffc9bebe5c67fc80e16798300d404089585bcdac14448034bd38c5072 \
905934
--hash=sha256:fa934c1a02f1f3bb04e447b95ef5b19d03cb2575fee76d23cb7a6d0c526444e2
906935
# via -r requirements.in
936+
pynacl==1.5.0 \
937+
--hash=sha256:06b8f6fa7f5de8d5d2f7573fe8c863c051225a27b61e6860fd047b1775807858 \
938+
--hash=sha256:0c84947a22519e013607c9be43706dd42513f9e6ae5d39d3613ca1e142fba44d \
939+
--hash=sha256:20f42270d27e1b6a29f54032090b972d97f0a1b0948cc52392041ef7831fee93 \
940+
--hash=sha256:401002a4aaa07c9414132aaed7f6836ff98f59277a234704ff66878c2ee4a0d1 \
941+
--hash=sha256:52cb72a79269189d4e0dc537556f4740f7f0a9ec41c1322598799b0bdad4ef92 \
942+
--hash=sha256:61f642bf2378713e2c2e1de73444a3778e5f0a38be6fee0fe532fe30060282ff \
943+
--hash=sha256:8ac7448f09ab85811607bdd21ec2464495ac8b7c66d146bf545b0f08fb9220ba \
944+
--hash=sha256:a36d4a9dda1f19ce6e03c9a784a2921a4b726b02e1c736600ca9c22029474394 \
945+
--hash=sha256:a422368fc821589c228f4c49438a368831cb5bbc0eab5ebe1d7fac9dded6567b \
946+
--hash=sha256:e46dae94e34b085175f8abb3b0aaa7da40767865ac82c928eeb9e57e1ea8a543
947+
# via paramiko
907948
python-dateutil==2.8.2 \
908949
--hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \
909950
--hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9

0 commit comments

Comments
 (0)