A command‐line interface for interacting with the oneHome API.
Download the oh binary from the releases page.
You can also install it with Go (requires Go 1.23+):
go install github.com/group-one-platform/oh@latestOr clone this repository and build manually:
git clone https://github.com/group-one-platform/oh.git
cd oh
make buildThe resulting oh executable will be in your $GOPATH/bin (or ./oh if you used go build).
You can also build for all platforms (Windows, Linux, Mac):
make build-alloh can generate shell‐completion scripts for Bash, Zsh, Fish and PowerShell. Adapt for your distribution:
# Bash
oh completion bash > /etc/bash_completion.d/oh
# Zsh
oh completion zsh > "${fpath[1]}/_oh"
# Fish
oh completion fish > ~/.config/fish/completions/oh.fish
# PowerShell
oh completion powershell > ~/oh.ps1Or, for a one‐off session, you can eval the output directly:
# In Bash
eval "$(oh completion bash)"
# Or Zsh
eval "$(oh completion zsh)"After installing into your shell’s completion directory (and reloading/restarting your shell), typing:
oh <TAB>will auto‐complete commands, flags, and even argument values (e.g. your vps execute actions and even server ids, flavours, images etc).
Before making any API calls, you need to provide your API token. The token is stored in ~/.oh.yaml.
To enter your token interactively:
oh tokenOr pass the token directly on the command line:
oh token YOUR_API_TOKEN_HEREYou should see:
🔐 Token stored!
In addition to entering your token interactively or pass it as an argument, you can also supply it from a file or standard input.
If you have a file containing just your token (for example token.txt), you can use:
oh token --file ./token.txtThis will read the first line of the file as your API token.
You can pipe the token in directly from another command or environment variable:
cat ./token.txt | oh token --file -or
echo $ONEHOME_TOKEN | oh token --file -Here - tells oh token to read the token from standard input.
By default, oh looks for a config file at:
$HOME/.oh.yaml
And reads environment variables matching its keys. The only default is:
base_url: "https://onehome.dogado.de/api/v1/"If you have access to the API in other environments, feel free to update the base_url accordingly.
You can override this in your config file or via the --config flag:
oh --config /path/to/your-config.yaml vps listThese flags are available on all commands:
--jsonPrint JSON (Go‐encoded)-j,--jqPipe JSON throughjq(optional filter)--config <file>Path to config file (default$HOME/.oh.yaml)
Example:
# List VPSes as raw JSON:
oh vps list --json
# List and then filter with jq:
oh vps list --jq '.[] | select(.Status=="active")'
# Output with jq, no filter
oh vps list -j
# Show just the first server in a key: value form:
oh vps get 42Use oh <command> --help to see full usage and subcommands. Below are some common workflows.
-
List all VPSes
oh vps list
-
Get a single VPS (form view):
oh vps get 42
-
Execute an action (e.g. soft-reboot, power-off):
oh vps execute 42 soft-reboot
-
Manage flavours
- List available flavours for server 42:
oh vps flavour list 42
- Change flavour:
oh vps flavour set 42 --flavour=33
- List available flavours for server 42:
-
Manage networks
- List all available networks:
oh vps network list-available
- List networks attached to server 42:
oh vps network list 42
- Attach a network:
oh vps network attach 42 --network-id=abc123 --ipv4=192.0.2.5
- Detach a network:
oh vps network detach 42 --network-id=abc123
- List all available networks:
-
Manage images
- List images:
oh vps image list
- Get image details:
oh vps image get 100
- List images:
-
Manage products
- List products (with plan JSON):
oh vps product list
- List products (with plan JSON):
-
Order a new VPS
You can pass the order payload as a JSON file or raw string:
oh vps order -f order.json # or: cat order.json | oh vps order -f - # or: oh vps order '{"name":"foo","product_id":12,"flavour_id":3}'
See
oh vps order -hfor more information about the order payload.
Feel free to open issues or pull requests—happy to accept improvements, bug fixes, and new commands!
This project is released under the Apache 2.0 License. See LICENSE for details.