https://github.com/rhymeswithmogul/psgemini
Access and download resources over the Gemini protocol -- in PowerShell!
https://github.com/rhymeswithmogul/psgemini
gemini gemini-client gemini-protocol linux macos powershell powershell-cmdlets powershell-core powershell-gallery powershell-module powershell-modules pwsh windows
Last synced: 8 months ago
JSON representation
Access and download resources over the Gemini protocol -- in PowerShell!
- Host: GitHub
- URL: https://github.com/rhymeswithmogul/psgemini
- Owner: rhymeswithmogul
- License: agpl-3.0
- Created: 2022-02-10T12:44:43.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-03T05:15:35.000Z (about 1 year ago)
- Last Synced: 2025-02-01T20:11:24.033Z (9 months ago)
- Topics: gemini, gemini-client, gemini-protocol, linux, macos, powershell, powershell-cmdlets, powershell-core, powershell-gallery, powershell-module, powershell-modules, pwsh, windows
- Language: PowerShell
- Homepage:
- Size: 130 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
- Security: SECURITY.md
- Authors: AUTHORS.txt
Awesome Lists containing this project
README
[](https://powershellgallery.com/packages/PSGemini/) [](https://powershellgallery.com/packages/v/PSGemini)
# PSGemini
A [Gemini](https://gemini.circumlunar.space/) client written for PowerShell 7 and newer.## Installation
Grab it from PowerShell Gallery with: `Install-Module PSGemini`## Usage
In this example, we'll connect to a Gemini server and return the content.```
PS C:\> Invoke-GeminiRequest gemini://gemini.circumlunar.space
WARNING: First visit. Memorizing new certificate for gemini.circumlunar.spaceStatusCode : 20
StatusDescription : text/gemini
Content : # Project Gemini
## Overview
Gemini is a new internet protocol which:
* Is heavier than gopher
* Is lighter than the web
* Will not replace either
* Strives for maximum power to weight ratio
* Takes user privacy very seriously
[…]
```The syntax and output of this cmdlet is modeled after [`Invoke-WebRequest`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-webrequest) and [`Invoke-GopherRequest`](https://github.com/rhymeswithmogul/PSGopher), going as far as to emulate some of its properties:
```
PS /home/colin> igemr gemini://gemini.circumlunar.spaceStatusCode : 20
StatusDescription : text/gemini
Content : # Project Gemini
## Overview
Gemini is a new internet protocol which:
* Is heavier than gopher
* Is lighter than the web
* Will not replace either
* Strives for maximum power to weight ratio
* Takes user privacy very seriously
[…]
RawContent : 20 text/gemini
# Project Gemini
## Overview
Gemini is a new internet protocol which:
* Is heavier than gopher
* Is lighter than the web
* Will not replace either
* Strives for maximum power to weight ratio
* Takes user privacy very seriously
[…]Headers : {}
Headings : {@{Level=1; Content=Project Gemini}, @{Level=2; Content=Overview}, @{Level=2; Content=Resources}, @{Level=2; Content=Web proxies}…}
Links : {@{href=gemini://gemini.circumlunar.space/news/; title=Official Project Gemini news}, @{href=gemini://gemini.circumlunar.space/docs/; title=Gemini documentation}, @{href=gemini://gemini.circumlunar.space/software/; title=Gemini software}, @{href=gemini://gemini.circumlunar.space/servers/; title=Known Gemini servers}…}
RawContentLength : 1281
```### Downloading Files
You can also use PSGemini's `-OutFile` parameter to download files:```powershell
PS /Users/colin> Invoke-GeminiRequest -UseSSL gemini://colincogle.name/pgp/pgp.txt -OutFile pgp.txt
PS /Users/colin> Get-Item pgp.txtDirectory: /Users/colin
UnixMode User Group LastWriteTime Size Name
-------- ---- ----- ------------- ---- ----
-rw-r--r-- colin wheel 2/8/2022 08:05 5218 pgp.txt
```### Other Neat Features
* Full support for all platforms that support PowerShell 7.1 or newer -- that's Windows, macOS, and Linux!
* Since Gemini certificates can be self-signed, PSGemini maintains its own TOFU certificate store.
* Client certificates can be provided (`-Certificate []`).
* Full support for [experimental favicons](https://portal.mozz.us/gemini/mozz.us/files/rfc_gemini_favicon.gmi) (`-FavIcon`), disabled by default in the spirit of Gemini.