https://github.com/serverscom/srvctl
https://github.com/serverscom/srvctl
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/serverscom/srvctl
- Owner: serverscom
- License: apache-2.0
- Created: 2024-12-19T10:02:40.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-11T15:37:15.000Z (4 months ago)
- Last Synced: 2026-02-12T00:24:08.086Z (4 months ago)
- Language: Go
- Size: 417 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# srvctl - CLI for Servers.com infrastructure
[](https://pkg.go.dev/github.com/serverscom/srvctl) [](https://goreportcard.com/report/github.com/serverscom/srvctl)
## Description
Manage your Servers.com bare metal servers, cloud servers, and infrastructure directly from the terminal.
`srvctl` wraps the Servers.com Public API into a fast, scriptable command-line interface built in Go.
## Quick Start
### Homebrew (macOS & Linux):
```sh
brew tap serverscom/serverscom
brew install srvctl
```
### Docker:
```sh
docker pull ghcr.io/serverscom/srvctl:latest
docker run --rm -it ghcr.io/serverscom/srvctl:latest --help
```
### Binary releases:
Download the latest release for your OS and architecture from the [Releases page](https://github.com/serverscom/srvctl/releases).
## Usage
### Authentication
Create a context with your [Servers.com API token](https://portal.servers.com/login):
```sh
$ srvctl login default
Enter API token: *****
Successfully logged in with context "default"
Context "default" set as default
```
### Configuration
The config file is stored at `$XDG_CONFIG_HOME/srvctl/config.yaml`, if XDG_CONFIG_HOME exists.
Otherwise it will rely on `$HOME/.config/srvctl/config.yaml`.
You can override this with the `SRVCTL_CONFIG_PATH` environment variable.
`srvctl` supports multiple contexts, allowing you to manage several Servers.com accounts or API endpoints from a single installation:
```yaml
globalConfig: {}
defaultContext: default
contexts:
- name: default
endpoint: https://api.servers.com/v1
token:
config: {}
- name: different-context
endpoint: https://api.servers.com/v2
token: <2ND_API_TOKEN>
config: {
proxy: "",
http-timeout: 30,
verbose: true, /* (true|false) */
output: "json" /* (text|json|yaml) */
}
```
You can adjust the context later on:
```bash
# changing the context name
srvctl context update --name=
# setting context to act as default
srvctl context update --default
# delete specific context
srvctl context delete
```
## Documentation
Documentation is accessible via `man` or via `--help` flag, for example:
```bash
# man option
$ man srvctl-hosts-ds-list
# help option, short command help
$ srvctl hosts ds list --help
```
Man pages are based on the documentation info located in `/docs` directory.
## Contributing
Contributions are welcome! Please open an issue or submit a pull request.
## License
`srvctl` is released under the Apache 2.0 License.