CLI for Linode API v4
Project description
linode-cli
==========
A reimplementation of the `Linode CLI`_ using the `Python Library`_ and
`API V4`_.
Installation
------------
::
pip3 install linode-cli
Building from Source
-------------------
To build this package from source:
- Clone this repository.
- ``python3 setup.py install``
Usage
-----
While the Linode API V4 is in beta, this package installs the command
``linode-cli``.
When running the CLI for the first time, configure it by running
``linode-cli configure``. This will prompt for your API V4
personal access token and some defaults.
This is intended to be used like the existing Linode CLI, and you can
use `the existing CLI docs`_ for reference.
In addition, the following commands have been added:
- ``linode-cli event list`` - lists recent Events
- ``linode-cli event seen`` - marks all Events as seen
- ``linode-cli backups-show LINODE`` - show backups for a Linode
- ``linode-cli snapshot LINODE`` - create a snapshot of a Linode
- ``linode-cli backups-restore LINODE BACKUPID -l TARGET -f`` - restore a backup
- ``linode-cli backups-enable LINODE`` - enable backups for a Linode
- ``linode-cli backups-cancel LINODE`` - cancel backups for a Linode
- ``linode-cli ticket list`` - list tickets open on your account
- ``linode-cli ticket show TICKETID`` - show a ticket and its replies
- ``linode-cli volume list`` - list all Block Storage Volumes
- ``linode-cli volume show VOLUME`` - show information about a Volume
- ``linode-cli volume create LABEL -l LINODE`` - create a volume attached to a Linode
- ``linode-cli volume rename LABEL NEW_LABEL`` - rename a volume
- ``linode-cli volume attach LABEL LINODE`` - attach a volume to a Linode
- ``linode-cli volume detach LABEL`` - detach a volume
- ``linode-cli volume delete LABEL`` - delete a volume
Examples
--------
List all Linodes and their status:
``linode-cli list``
Create a new Linode with a root password of "hunter7" and label "cli-test-1"
in your default region with your default type:
``linode-cli create -P hunter7 -l cli-test-1``
Shut down your new Linode:
``linode-cli stop cli-test-1``
Show a Linode's Backups:
``linode-cli backups-show cli-test-1``
List your domains:
``linode-cli domain list``
Show recent events:
``linode-cli event list``
Show open tickets:
``linode-cli ticket list``
See all volumes and their attachments:
``linode-cli volume list``
Create a new 100 GB volume attached to a Linode:
``linode-cli volume create cli-test-volume -l cli-test -s 100``
.. _API v4: https://developers.linode.com
.. _Linode CLI: https://linode.com/cli
.. _Python Library: https://github.com/linode/python-linode-api
.. _the existing CLI docs: https://www.linode.com/docs/platform/linode-cli#using-the-cli
==========
A reimplementation of the `Linode CLI`_ using the `Python Library`_ and
`API V4`_.
Installation
------------
::
pip3 install linode-cli
Building from Source
-------------------
To build this package from source:
- Clone this repository.
- ``python3 setup.py install``
Usage
-----
While the Linode API V4 is in beta, this package installs the command
``linode-cli``.
When running the CLI for the first time, configure it by running
``linode-cli configure``. This will prompt for your API V4
personal access token and some defaults.
This is intended to be used like the existing Linode CLI, and you can
use `the existing CLI docs`_ for reference.
In addition, the following commands have been added:
- ``linode-cli event list`` - lists recent Events
- ``linode-cli event seen`` - marks all Events as seen
- ``linode-cli backups-show LINODE`` - show backups for a Linode
- ``linode-cli snapshot LINODE`` - create a snapshot of a Linode
- ``linode-cli backups-restore LINODE BACKUPID -l TARGET -f`` - restore a backup
- ``linode-cli backups-enable LINODE`` - enable backups for a Linode
- ``linode-cli backups-cancel LINODE`` - cancel backups for a Linode
- ``linode-cli ticket list`` - list tickets open on your account
- ``linode-cli ticket show TICKETID`` - show a ticket and its replies
- ``linode-cli volume list`` - list all Block Storage Volumes
- ``linode-cli volume show VOLUME`` - show information about a Volume
- ``linode-cli volume create LABEL -l LINODE`` - create a volume attached to a Linode
- ``linode-cli volume rename LABEL NEW_LABEL`` - rename a volume
- ``linode-cli volume attach LABEL LINODE`` - attach a volume to a Linode
- ``linode-cli volume detach LABEL`` - detach a volume
- ``linode-cli volume delete LABEL`` - delete a volume
Examples
--------
List all Linodes and their status:
``linode-cli list``
Create a new Linode with a root password of "hunter7" and label "cli-test-1"
in your default region with your default type:
``linode-cli create -P hunter7 -l cli-test-1``
Shut down your new Linode:
``linode-cli stop cli-test-1``
Show a Linode's Backups:
``linode-cli backups-show cli-test-1``
List your domains:
``linode-cli domain list``
Show recent events:
``linode-cli event list``
Show open tickets:
``linode-cli ticket list``
See all volumes and their attachments:
``linode-cli volume list``
Create a new 100 GB volume attached to a Linode:
``linode-cli volume create cli-test-volume -l cli-test -s 100``
.. _API v4: https://developers.linode.com
.. _Linode CLI: https://linode.com/cli
.. _Python Library: https://github.com/linode/python-linode-api
.. _the existing CLI docs: https://www.linode.com/docs/platform/linode-cli#using-the-cli
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for linode_cli-1.0.8b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 086744c03f75b2cf651f1d7d5c91a1a85c6ff27b1d4ec00ebb8946693cb9e24c |
|
MD5 | 16b707094cdaf295815a76a3bfe0be09 |
|
BLAKE2b-256 | b249052ab1c4ef7c1d5e850e8a88825331d2783224abda6bc62034f127f8b737 |