SiteHost Console
Latest version: 3.2
Download
file_downloadMac OSX (x86) v3.2
file_downloadMac OSX (arm64) v3.2
file_downloadLinux v3.2
Changelog
[3.2]
Changed
- Job progress messages now include the job’s queue type alongside the ID (for example
> 29440036 (daemon): Pending: ...), and the final Completed state is rendered in green to match the colouring already applied to Pending and Running. (ops/sth-console!22)
Fixed
- Fixed a recurring
warning: cache containers add: containers prime had per-row failures: row server_id mismatch error when listing containers on a server that had been rebuilt under the same name. The container cache now trusts the per-row server ID from the API, places rows under their actual ID, and clears stale rows still cached under the old ID in the same transaction. (ops/sth-console!22) - Fixed
server <name> boot, reboot, shutdown, rescue enable, and rescue disable printing a single Waiting for job to start line and never updating progress thereafter. The state-change endpoint now uses v1.5 of the API, which returns the job-queue type alongside the ID, so the progress monitor polls whichever queue (daemon or scheduler) the job actually landed on instead of the previously hardcoded daemon queue. (ops/sth-console!22)
[3.1]
Added
- Added a guided first-run bootstrap that fires when no
~/.sth-console/config.yml exists. Running sth-console with no arguments on a fresh install now drops the operator into a single-prompt setup (contact ID) for the production environment, SSHes to MySth to create the API key, verifies it works, and lands in the REPL ready to use. (ops/sth-console!21) - Added a
debug: true config flag that appends one line per API request attempt to ~/.sth-console/debug.log with the apikey query parameter, API-key field name variants (apikey, api_key, api-key), and sensitive POST-body fields (password, token, secret, auth) replaced with REDACTED. A startup notice tells you where the log lives when the flag is enabled. With the flag absent or false, behaviour is unchanged. (ops/sth-console!21)
Changed
- Improved
env add reliability across the board: a pre-flight SSH check with retry surfaces access problems before the operator types anything; reseller:create and reseller:modify stderr is now surfaced verbatim; the safety confirm shows the modules and (on production) IP allow-list; Contact ID rejects up to three times before bailing; the new API key is verified via GetInfo before config.yml is written; reseller:modify retries on transport failure; partial-create failures surface the reseller ID and API key on stderr for manual recovery; new environment entries carry a # reseller_id: <id> audit comment; config.yml is now written at mode 0o600 (was 0o644) to match credential-file convention. (ops/sth-console!21) - Cache failures now render exactly once in interactive mode; previously the same failure could surface twice (once from the cache wrapper and once from the consuming handler) or be silently dropped depending on the path. The new contract surfaces a single yellow
warning: line and the command continues by falling through to the API. - One-shot commands now exit non-zero on failure in both human (
sth-console <command>) and script (SCRIPT=1 sth-console <command>) modes. Wrapping scripts that previously relied on sth-console returning 0 even after an error - including for unknown commands such as sth-console foobar - will now observe $? == 1 and should be updated accordingly. Successful invocations and degraded successes (cache miss with working API) continue to exit 0.
Fixed
- Fixed
ip info <ip> not showing the server(s) using the address; the Servers row under the MySth column is now rendered with label, name, and id (or N/A when the address is unused). - Fixed hydration of server records crashing when the Admin API returned
false for primary_ip instead of a string. - Fixed
ssh <server> to a server with no usable primary IP showing a misleading “Server Not Found” message; now reports that the server has no primary IP and refuses to connect on 0.0.0.0. - Fixed the first-run bootstrap routing to the interactive path when stdout was redirected (e.g.
sth-console | tee log.txt), which previously stranded the operator at an invisible prompt; piped invocations now bail out with a clear stderr message. (ops/sth-console!21)
Removed
- Dropped support for the pre-2.0 config file formats (the flat
url: + apikey: single-environment shape and the legacy multi-key map with no environments: wrapper). Any operator still on those formats will be routed to the first-run bootstrap on next start. Configurations written by 2.0 and later are unaffected. (ops/sth-console!21)
[3.0]
Changed
- Replaced the local cache backend with SQLite. The cache will be rebuilt from the API on first run after upgrade.
Fixed
- Fixed the REPL prompt not redrawing and the first keypress being eaten when an SSH session ends.
- Fixed
sth-console ssh ... printing an unwanted prompt and waiting on a keypress before exiting in passthrough mode.
[2.10]
Fixed
- Fixed adding a new environment was using the old containers names.
[2.9]
Changed
- Increased timeout for API requests from 8 seconds to 15 seconds for international users of the console tool.
[2.8]
Added
- Added the ability to add notes to ip addresses shown using
ip info.
Changed
- Improved the output of
ip info. - Improved the rendering of volume group sizes for hypervisors.
[2.7]
Added
- Added
ip info command to show information about the an IP address. - Colourised the children when showing a hypervisors children based on performance.
Fixed
- Fixed the VPS cores for Proxmox VM’s.
Changed
- Split off all the rendering code into a separate files to make it easier to maintain / read.
[2.6]
Added
- Added tags and attributes to the response when rendering servers.
Fixed
- Potentially fixed the race condition / crash caused when immediately changing environments on start.
- Improved rendering of the product when rendering servers.
Changed
- Updated to Go 1.24.2
- Modernised the code to use the latest go methods removing deprecated method usage.
- Show the client name and client id when rendering servers.
- Colourised the children’s names based on performance when showing a hypervisors children.
[2.5]
Added
- Added SCRIPT support to the
ip vlan command. - Added support for showing vlan capabilities and native vlans.
Fixed
- Reduced the width of the product field when rendering a server.
[2.4]
Fixed
- Fixed the padding on the last column of tables, this reduces the total width needed in some cases.
- Made columns only display if theres enough room in the terminal to display them.
Changed
- Added concurrency to the initial cache refresh to speed up the initial load time.
[2.3]
Added
- Added column renderers which is used throughout the application to render columns in a consistent way.
Fixed
- Fixed an issue with containers causing problems when updating the SQL cache.
Changed
- Many UI improvements rendering things with columns hopefully making things easier to read and using less real estate.
[2.2]
Fixed
- Fixed the
ip lookup <ip> command to correctly show which servers are using an IP.
[2.1]
Added
- Added support for showing a single container filtering by name or label.
- Added support for dumping the docker-compose yaml for specific containers.
cache flush and cache size commands for managing the cache.
Fixed
- Fixed the behaviour when a server is not found on the API, it now gets removed from the local cache.
[2.0]
Added
- Beginnings of a cache, storing data locally in a chai database.
- More support for the environment variable
SCRIPT=1 in the server commands.
Changed
- Improvements to command parsing / routing to make it more readable.
Removed
- Removed the usage of esc, favouring
go generate and go:embed. containers command deprecated in favour of server <name> containers.
[1.12] - 2022-12-05
Changed
- Updated all internal references to gitlab.sitehost.co.nz.
- Moved location of website to console.shq.nz.
- Ability to lookup/whois any SRS domain without having to assume the client first.
- Upgraded the readline library to the latest version.
- Bumped golang version to 1.19.
[1.11] - 2022-12-02
Added
- OSX Silicon support / build / deploy.
Changed
- Improvements to the version handler.
Fixed
- Fixes to the crash when no parameters are supplied to the client command.
[1.10] - 2020-09-09
Changed
- Standardise errors a little better.
- Compile linux binaries as static binaries.
- Changed version check URL to include the timestamp in the path instead of query string.
Fixed
- Updated the help to include the Cloud module in the list of required API Key modules.
[1.9] - 2020-09-05
Added
- Added check for reseller modules to make sure we have all the modules to operate.
- Added basic containers command for looking up information on cloud containers.
[1.8] - 2020-08-13
Added
- Added the ability to detect if the binary is writable, so we can notify the user why the upgrade failed.
- Added better instructions on how to setup an API key for use with the console.
Changed
- General cleanup around unnecessary import aliases.
- Moved to Go 1.15, smaller binaries!
[1.7] - 2020-08-10
Changed
Fixed
- Show server indentation issue fixed.
[1.6] - 2020-01-10
Added
- Added current version to the version request.
- Feature Request: New command
client <client> list emails [role] used to generate email recipient strings to pasting into cerb. - New command
client <client> list contacts [role] used to list all contacts, or only contacts which have a certain role. - Server rescue mode enable/disable support with following of the job.
- Rescue mode password store, an in-memory store of rescue mode passwords kept while the application is running.
Changed
- Minor color changes to the
shortcuts command. - Ability to see the full changelog if the all option is present.
- Updated the way that monitored jobs look, formatting + color changes.
- Moved
config, changelog and shortcuts out of the help namespace and into their own ones.
Fixed
- Corrected the rendering of the changelog. Also added a parameter to view the entire changelog.
- Fixed the scenario where a version upgrade download could be killed if the process exits too quickly.
[1.5] - 2020-01-04
Added
- Show cores for Hypervisors and VPS’s
- Added
help changelog command which displays the last few entries from the changelog.
Changed
- Centralised a lot of code into models for tidiness, cleaning up the command handlers.
- More color changes for some functions.
- More aggressive caching in places.
- Improved error handling.
- UI updates when viewing vlans + vlan networks.
Fixed
- Updated the heading when the banner is disabled.
- Documented the config option to disable the banner on start.
[1.4] - 2019-12-25
Changed
- Add a timestamp to the version check URL to get around cache.
[1.3] - 2019-12-24
Added
- Feature request: Ability to get server details from ip lookup, eg:
ip lookup sitehost.nz server. (go/sth-console#15)
Changed
- Minor color changes to make
ip vlan more readable, not really sure if its better, I may come back to this.
[1.2] - 2019-12-16
Changed
- Assume now takes client name, or client_id, with auto-completion on the client names.
- Lots of small visual improvements.
[1.1] - 2019-12-14
Added
- Added
help list command added for listing all commands like the original help command did.
Changed
- Moved the version check to use https versus http.
- Full CI/CD with version numbers coming from tags.
- Main help has been re-factored to take up less space.
[1.0] - 2019-12-11
Added
- DNS Tools for querying DNS records on groups of servers.
- Automatic update feature, Will automatically replace the binary on disk and pull in the new version.
- Added @local resolver, which uses the nameservers configured in /etc/resolv.conf. This is now the default resolver.
- Added dig query time for each name server.
- Help for keyboard shortcuts.
Changed
- Implemented an ASCII art banner when we start, which us re-used for the help.
- Made colors more consistent in some places.
- Show time remaining till domain expires when using
srs whois. - Moved the environment variable information into the
help config section.
Fixed
- Tidied up the last of the warnings, everything passes intellij’s inspections now.
- Removed old commented code which has been replaced.
[0.20] - 2019-12-05
Fixed
[0.19] - 2019-12-01
Fixed
- SSH connections would output random whitespace at the end sure to the way I was entering raw mode.
[0.18] - 2019-11-30
Changed
- Cleanup to the ip and srs command handlers.
- Store the history in ~/.sth-console/ versus /tmp/.
- Fixed the help banner from the last release.
[0.17] - 2019-11-30
Added
- Added configuration help.
- New web page on sth-console.phreak.nz.
Changed
- Makefile fix ups.
- Added CHANGELOG.md.
- Improved the configuration help when running with no configuration.