paashup-cli
is a command-line tool for managing your paashup environment, including Docker containers, hosts, images, and Netbox configurations. This tool provides various commands to list, inspect, start, stop, and execute operations on Docker containers, as well as managing Docker hosts, images, and Netbox configurations.
To install paashup-cli
, ensure you have Go installed and run:
go get github.com/saashup/paashup-cli
First you need to define the netbox source:
paashup-cli netbox set-config name http://netbox.local mytoken
For autocompletion, download the completion script (autocompletion.bash) and then source it like this:
PROG=paashup-cli source autocompletion.bash
--format, -f
: Choose between yaml
, json
, json-pretty
(Default: json
)The netbox
command allows you to manage Netbox configurations. It has the following subcommands:
set-config: Set Netbox configuration.
paashup-cli netbox set-config NAME NETBOX_URL NETBOX_TOKEN
use: Use a specific Netbox configuration.
paashup-cli netbox use NAME
The docker
command allows you to manage Docker containers, hosts, and images. It has the following subcommands:
list: List all containers, optionally for a specific host.
paashup-cli docker container ls [hostname]
ps
, ls
logs: Get logs of a container.
paashup-cli docker container logs <hostname> <containername>
start: Start a container. Optionally, wait for the container to start.
paashup-cli docker container start [--nowait] <hostname> <containername>
--nowait, -w
: Do not wait for the container to start.stop: Stop a container. Optionally, wait for the container to stop.
paashup-cli docker container stop [--nowait] <hostname> <containername>
--nowait, -w
: Do not wait for the container to stop.inspect: Inspect a container.
paashup-cli docker container inspect <hostname> <containername>
exec: Execute a command in a container.
paashup-cli docker container exec <hostname> <containername> '<command>'
list: List all Docker hosts.
paashup-cli docker host list
ls
, ps
inspect: Inspect a Docker host.
paashup-cli docker host inspect <hostname>
paashup-cli docker image list
ls
, ps
Here are a few examples of how to use paashup-cli
:
Set a Netbox configuration:
paashup-cli netbox set-config myconfig http://netbox.local mytoken
Use a specific Netbox configuration:
paashup-cli netbox use myconfig
List all containers:
paashup-cli docker container ls
Get logs of a container:
paashup-cli docker container logs myhostname mycontainer
Start a container and wait for it to start:
paashup-cli docker container start myhostname mycontainer
Stop a container without waiting:
paashup-cli docker container stop --nowait myhostname mycontainer
Inspect a container:
paashup-cli docker container inspect myhostname mycontainer
Execute a command in a container:
paashup-cli docker container exec myhostname mycontainer 'ls -la'
Contributions are welcome! Please open an issue or submit a pull request on GitHub.
paashup-cli
is released under the BSD 3-Clause License. See the LICENSE
file for more information.
This README provides a general overview of paashup-cli
and how to use it. For more detailed documentation and examples, please refer to the official documentation.