Ergonaut is an SSH server that logs users into Ergo IRC and drops them directly into a terminal IRC client.
The login flow is:
- SSH login to Ergonaut
- Ergonaut checks the username/password against Ergo's HTTP API
- Ergonaut starts an in-terminal IRC UI
- The IRC session connects to Ergo and authenticates with SASL using the same credentials
The result is a single-entry SSH experience for Ergo IRC accounts.
- Authenticates SSH logins against Ergo NickServ accounts
- Reuses the successful login for IRC SASL PLAIN
- Auto-discovers Ergo API and IRC connection settings from an existing
ircd.yaml - Auto-loads the logged-in account's registered/associated channels from Ergo
- Requests channel history on join
- Shows channels, chat, members, topic, and backlog in a terminal UI
- Go 1.24+
- A running Ergo IRC server
- Ergo HTTP API enabled with at least one bearer token
- Local read access to Ergo's config file if you want auto-discovery
- Adjust
ergonaut.yaml - Start Ergonaut:
go run . -config ./ergonaut.yaml- Connect over SSH:
ssh -p 2222 <ergo-account>@127.0.0.1Use the same password you use for your Ergo account.
Ergonaut is configured with ergonaut.yaml.
Example:
ssh:
listen: "127.0.0.1:2222"
host-key-path: "./data/ergonaut_ed25519"
ergo:
config-path: "/home/ergo/ircd.yaml"
api:
url: ""
bearer-token: ""
irc:
address: ""
tls: false
skip-tls-verify: false
server-name: ""
session:
auto-join: []
motd: "Welcome to Ergonaut. Use /join #channel to start chatting."There are two ways Ergonaut can learn how to talk to Ergo:
- Discover from
ergo.config-path - Use explicit overrides in
ergonaut.yaml
If ergo.config-path points at a real Ergo ircd.yaml, Ergonaut reads it at startup and discovers:
- Ergo API URL
- Ergo API bearer token
- IRC server address
- IRC TLS/plaintext mode
- IRC server name
In this mode, you can leave these fields blank:
ergo:
config-path: "/home/ergo/ircd.yaml"
api:
url: ""
bearer-token: ""
irc:
address: ""
server-name: ""That means:
"Read the values from Ergo's config instead of duplicating them here."
If you fill in values in ergonaut.yaml, those values win over discovery.
For example:
ergo:
config-path: "/home/ergo/ircd.yaml"
api:
url: "http://127.0.0.1:8089"
bearer-token: "your-token-here"That means:
"Use this URL/token even if Ergo's config says something else."
No.
If config-path is valid and the Ergo config contains the API token, you do not need to repeat the bearer token in ergonaut.yaml.
Set bearer-token manually only if:
- you do not want Ergonaut reading Ergo's config directly, or
- you want to override the discovered value
Address Ergonaut listens on for SSH.
Example:
ssh:
listen: "127.0.0.1:2222"Path to the SSH host key file. If it does not exist, Ergonaut creates one.
Path to Ergo's ircd.yaml. Used for discovery.
Optional explicit override for the Ergo API base URL.
Optional explicit override for the Ergo API bearer token.
Optional explicit override for the IRC server address Ergonaut connects to.
Force IRC TLS on or off.
Skip TLS certificate verification for IRC connections. Useful for local testing; avoid in production unless you understand the tradeoff.
Optional explicit override for the IRC server name.
Extra channels to join in addition to the account's channels discovered from Ergo.
Message shown when the TUI opens.
After a successful SSH login, Ergonaut:
- Validates credentials with Ergo
/v1/check_auth - Reads account metadata from Ergo
/v1/ns/info - Starts the IRC client
- Negotiates SASL and chat history capabilities
- Autojoins:
- channels listed in
session.auto-join - channels associated with the logged-in account in Ergo
- channels listed in
- Requests backlog for joined channels
The terminal UI currently provides:
- left pane: channels/buffers
- center pane: current chat buffer and topic
- right pane: channel members
- bottom input: message entry
- status line: connection/status feedback
Tab/Shift+Tab: switch buffersPgUp/PgDn: scroll chat historyHome/End: jump in chat historyF1: toggle helpCtrl+C: quit
/join #channel/part [#channel]/switch <buffer>/msg <target> <message>/nick <newnick>/raw <command>/buffers/quit
- The Ergo bearer token is sensitive
- Do not commit real bearer tokens to source control
- Do not commit generated SSH host keys
- Prefer discovery from a protected local Ergo config instead of duplicating secrets
Format, test, and build:
gofmt -w .
go test ./...
go build ./...Run with a specific config:
go run . -config ./ergonaut.yamlmain.go server entrypoint
ergonaut.yaml example config
internal/auth/ SSH session auth state
internal/config/ config loading and Ergo discovery
internal/ergo/ Ergo HTTP API client
internal/irc/ IRC protocol client
internal/ui/ Bubble Tea terminal UI