All Projects β†’ ebsarr β†’ Packet

ebsarr / Packet

Licence: other
packet, a CLI tool to manage packet.net services

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Labels

Projects that are alternatives of or similar to Packet

Solidarity
Solidarity is an environment checker for project dependencies across multiple machines.
Stars: ✭ 540 (+1321.05%)
Mutual labels:  cli-app
Sade
Smooth (CLI) Operator 🎢
Stars: ✭ 746 (+1863.16%)
Mutual labels:  cli-app
Github Spray
Draw on your GitHub contribution graph β–‘β–’β–“β–ˆ
Stars: ✭ 908 (+2289.47%)
Mutual labels:  cli-app
Capture Website Cli
Capture screenshots of websites from the command-line
Stars: ✭ 545 (+1334.21%)
Mutual labels:  cli-app
Tml
πŸŒˆπŸ’»πŸŽ¨ A tiny markup language for terminal output. Makes formatting output in CLI apps easier!
Stars: ✭ 634 (+1568.42%)
Mutual labels:  cli-app
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+18897.37%)
Mutual labels:  cli-app
F License
Open Source License Key Generation and Verification Tool written in Go
Stars: ✭ 535 (+1307.89%)
Mutual labels:  cli-app
Make Space
πŸ’Ύ [WIP] Free up space from the command line
Stars: ✭ 21 (-44.74%)
Mutual labels:  cli-app
Np
A better `npm publish`
Stars: ✭ 6,401 (+16744.74%)
Mutual labels:  cli-app
Fxor
A CLI tool for Unix-like environments to encrypt/decrypt a file using XOR operation to do One-Time Pad.
Stars: ✭ 18 (-52.63%)
Mutual labels:  cli-app
Carbon Now Cli
🎨 Beautiful images of your code β€” from right inside your terminal.
Stars: ✭ 5,165 (+13492.11%)
Mutual labels:  cli-app
N98 Magerun2
The swiss army knife for Magento developers, sysadmins and devops. The tool provides a huge set of well tested command line commands which save hours of work time. All commands are extendable by a module API.
Stars: ✭ 607 (+1497.37%)
Mutual labels:  cli-app
Dalfox
🌘🦊 DalFox(Finder Of XSS) / Parameter Analysis and XSS Scanning tool based on golang
Stars: ✭ 791 (+1981.58%)
Mutual labels:  cli-app
Richgo
Enrich `go test` outputs with text decorations.
Stars: ✭ 544 (+1331.58%)
Mutual labels:  cli-app
Number Verifier
Number Verifier is a SMS verification tool that makes it easy to get a disposable SMS number and bypass SMS number verifications on any site.
Stars: ✭ 920 (+2321.05%)
Mutual labels:  cli-app
What Anime Cli
β“πŸ–Ό Find the anime scene by image using your terminal
Stars: ✭ 533 (+1302.63%)
Mutual labels:  cli-app
Fkill Cli
Fabulously kill processes. Cross-platform.
Stars: ✭ 6,418 (+16789.47%)
Mutual labels:  cli-app
Exoframe
Exoframe is a self-hosted tool that allows simple one-command deployments using Docker
Stars: ✭ 972 (+2457.89%)
Mutual labels:  cli-app
Captain
command line python scripts for humans
Stars: ✭ 10 (-73.68%)
Mutual labels:  cli-app
Initior
A command line application that let's you initialize your new projects the right way, replaces npm and yarn's init πŸŽ†
Stars: ✭ 17 (-55.26%)
Mutual labels:  cli-app

packet, a CLI tool to manage Packet services

Latest Version Build Status Go Report Card GoDoc

packet is a CLI tool to manage packet.net services. You can browse the help here.

    .--~~~~~~~~~~~~~------.
   /--===============------\\
   | |^^^^^^^^^^^^^^^|     |
   | |               |     |
   | | > packet      |     |
   | |               |     |
   | |_______________|     |
   |                   ::::|
   '======================='
   //-"-"-"-"-"-"-"-"-"-"-\\\\
  //_"_"_"_"_"_"_"_"_"_"_"_\\\\
  [-------------------------]
  \\_________________________/

Installation

Install with go get

$ go get -u github.com/ebsarr/packet

packet executable will be installed in $GOPATH/bin

You can also run it in a docker container:

$ docker run -it ebsarr/packet bash

Try the help

$ packet -h
CLI tool to manage packet.net services

Usage:
  packet [flags]
  packet [command]

Available Commands:
  admin           Manage projects, ssh keys, etc...
  baremetal       Manage server devices.
  network         Manage packet network services
  storage         Manage your storages

Flags:
  -k, --key string       API key
  -p, --profile string   Profile name (default "default")
  -v, --version          Show version and exit

Use "packet [command] --help" for more information about a command.

Getting started

Configure your API key by adding a profile

Command syntax: packet admin add-profile

$ packet admin add-profile
Enter your API key [ *****y7wi ]: <APIKEY>
Enter your default project ID [  ]: <Project ID>

This command will add a profile named "default".
NOTE: Without your API key configured, you'll need to specify it in every command in the form: packet --key <APIKEY> <command> <subcommand> <flags>. You can also optionnaly configure a default project ID.

If you have multiple accounts, or if you are working on multiple projects, you can set profiles to make it easy to switch between accounts or projects. After setting multiple profiles, you can use -p or --profile option to switch between accounts and projects.

Setting a profile

Here I'm creating a new profile named ebsarr

$ packet admin add-profile -n ebsarr
Enter your API key [ *****y7wi ]: <APIKEY>
Enter your default project ID [  ]: <Project ID>

Without the -n switch, the add-profile command sets up a profile named "default". You can view your profiles with the list-profiles command:

$ packet admin list-profiles
NAME      	APIKEY                          	DEFAULT PROJECT
----      	------                          	---------------
default   	XMiR----------------------------	13935598-d08c-4bd8------------------
ebsarr    	XMiR----------------------------	e30d25da-728d-47fe------------------

Now I can switch easily between projects when running the packet command:

$ packet -p ebsarr baremetal list-devices
[]

Without the -p option, the default profile will be used:

$ packet baremetal list-devices
[
    {
        "id": "69148e7c-44e1-4b4a-ac1a-f9e08b552fe8",
        "href": "/devices/69148e7c-44e1-4b4a-ac1a-f9e08b552fe8",
        "hostname": "ebsarrtest01",
        "state": "active",
        "created_at": "2016-07-15T07:16:28Z",
        "updated_at": "2016-07-15T07:31:27Z",
        "billing_cycle": "hourly",
        "ip_addresses": [
...

Available commands

packet admin : project management

Syntax: packet admin [subcommand]

Subcommand Description
add-profile Set default configs for the packet cli
create-project Create a new project
create-sshkey Configure a new SSH key
delete-profile Delete a profile
delete-project Delete a project
delete-sshkey Delete SSH key associated with the given ID
list-facilities View a list of facilities(packet DCs)
list-os View available operating systems
list-plans View available plans
list-orgs List organizations associated to user
list-org List organization by ID
create-org Create a new organization
update-org update a organization
delete-org Delete organization by ID
list-payment-methods List payment methods by organization ID
list-profiles List configured profiles
list-project Retrieve a project by ID
list-project-events View events by project ID
list-projects Retrieve all projects
list-sshkey View configured SSH key associated with the given ID
list-sshkeys View all configured SSH keys
spot-prices View spot market prices. For more details on the Packet spot market, see the Packet spot market documentation.
update-project Update a project
update-sshkey Update a SSH key: change the key or its label

packet baremetal: Manage server devices

Syntax: packet baremetal [subcommand]

Subcommand Description
create-device Create a new device
delete-device Delete a device
list-device Retrieve a device
list-devices Retrieve all devices in a project
list-events View events by device ID
lock-device Lock a device
poweroff-device Power off a device
poweron-device Power on a device
reboot-device Reboot a device
unlock-device Unlock a device
update-device Update a device

packet network: Manage packet network services

Syntax: packet network [subcommand]

Subcommand Description
assign-ip Assign IP address to a device by ID
list-ip Retrieve IP address by ID
list-ip-reservation Retrieve a single IP reservation object by ID
list-ip-reservations Retrieve IP resevations for a single project
remove-ip-reservation Remove IP reservation
request-more-ip-reservations Request more IP space
unassign-ip Unassign IP address from a device

packet storage: manage your storages

Syntax: package storage [subcommand]
Some of the snapshot related commands may not make sense. I will revisit the API and correct this on the next update.

Subcommand Description
attach-volume Attach a volume to a device
clone-volume Clone a volume or snapshot into a new volume
create-snapshot Create a snapshot of your volume
create-snapshot-policy Create a snapshot policy
create-volume Create a volume
delete-snapshot Delete a snapshot of your volume
delete-snapshot-policy Delete a snapshot policy
delete-volume Delete storage
detach-volume Detach a volume from a device
list-snapshots View a list of the current volume’s snapshots
list-volume Retrieve a volume by ID
list-volume-events View a list of the current volume's events
list-volumes Retrieve all volumes
restore-volume Restore a volume to the given snapshot
update-snapshot-policy Update a snapshot policy
update-volume Update a volume

For more help

Type packet -h in your console or browse the help here to view command options.

License

MIT

Changelog

Version Description
2.3.1 Allow creating volumes without a snapshot policy by passing --count 0
2.3 Added support for the "organization" API
Support pagination for packet baremetal list-devices
Install with homebrew on macOS
2.2.2 Fixed a bug that blows away all tags on device updates
Added --tags flag(not mandatory) to create-device and update-device commands
2.2.1 Fixed compilation issue that emerged with the updated Packet API
2.2 "update-device" command added; more options for "create-device" command
2.1.3 Fixed an issue that emerged with the updated Packet API
2.1.2 Fixed an issue that emerged with the updated Packet API
2.1.1 Bug fix around profile configuration. Now you can use --name or -n to configure and name a profile
2.1 Add support for spot market
2.0 Changed command structure, many bugs fixed
1.3 Can now delete profiles
1.2 Added profile support: use --profile option to switch between profiles
ssh command now reads keys from files, use --file instead of ssh-key to read from files.
1.1 Added support for userdata
1.0 First version
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].