Coder Social home page Coder Social logo

blynk-cli's Introduction

Blynk CLI

Description

This utility provide a way to manage your blynk server from Command-Line Interface (CLI).

This is a work in progress and fully experimental utility. You should not try to use it in production.

Documentation

Docs are available on https://readthedocs.io/ :

English - Français

Installation

Dependencies

Please, make sure your configuration respect the following pre-requisite:

  • Java 8
  • NodeJS >= 4.6.1
  • npm (or alike)

Installation

You can install Blynk CLI with NPM:

$ npm install -g blynk-cli

Usage

Show help

Once Blynk CLI installed, you can show help about existing commands by typing:

$ blynk-cli
# OR
$ blynk-cli help
# OR
$ blynk-cli --help

Install Blynk Server

Once Blynk CLI installed, you'll have to install Blynk server by running:

$ blynk-cli server install
[INFO] Downloading Blynk server v0.24.5
[INFO] Creating default configuration
[OK] Installation complete

Update Blynk Server

You can update Blynk Server to the latest version by running:

$ blynk-cli server update
[INFO] Update v0.24.6 available. Downloading...
[OK] Update complete
[OK] Backup done! You can find it in /home/booteille/.blynkcli/backup/auto-update/b1045268-2f32-4e24-85a3-fb740266d417

Start/Stop/Restart Server

$ blynk-cli server start

$ blynk-cli server status # Display status of Blynk server

$ blynk-cli server stop

$ blynk-cli server restart

Make a backup

You can backup your data folder by typing:

$ blynkcli backup create BACKUP
[OK] Backup done! You can find it in /home/booteille/.blynkcli/backup/BACKUP/cee3acd3-1190-4501-bfc1-ba10423c1a07

The backup generated is located in the folder you designed in your Blynk CLI configuration.

As you can see in this example, the generated backup is located under BACKUP/cee3acd3-1190-4501-bfc1-ba10423c1a07. Each backup have an Unique Identifier giving ablity to give the same name to different backups.

You can retrieve backup informations in the file backups.lock located in your Backups folder.

Here is what generated the backup we created before:

$ cat /home/booteille/.blynkcli/backup/backups.lock
[
  {
    "name": "BACKUP",
    "uuid": "cee3acd3-1190-4501-bfc1-ba10423c1a07",
    "date": "Thu Jun 01 2017 15:46:50 GMT+0200 (CEST)",
    "server_version": "v0.24.6"
  }
]

Restore from a backup

If you want to restore your data folder from a desired backup, you have to type:

$ blynkcli backup restore BACKUP
[OK] Restored from backup /home/booteille/.blynkcli/backup/BACKUP/cee3acd3-1190-4501-bfc1-ba10423c1a07

Now. Admit we have backups under the same name:

$ blynkcli backup restore BACKUP
[WARN] There are 2 backup found with corresponding names:
BACKUP/812de666-6d21-4f36-8877-cc1f775dab73 Thu Jun 01 2017 15:58:44 GMT+0200 (CEST)
BACKUP/cee3acd3-1190-4501-bfc1-ba10423c1a07 Thu Jun 01 2017 15:46:50 GMT+0200 (CEST)
[ERR]  Please, retry with one of these backups

Think about the backup you want to restore then type the full name (or at least first characters of uuid) to get your restoration:

$ blynkcli backup restore BACKUP/812
[OK] Restored from backup /home/booteille/.blynkcli/backup/BACKUP/812de666-6d21-4f36-8877-cc1f775dab73

You can also restore your backup from the uuid:

$ blynkcli backup restore /cee
[OK] Restored from backup /home/booteille/.blynkcli/backup/BACKUP/cee3acd3-1190-4501-bfc1-ba10423c1a07

Add an user

You can add a new user by typing:

$ blynkcli user add
? Email:  [email protected]
? Password:  [hidden]
? Confirm your password:  [hidden]
? Is super admin?  true
[OK] User [email protected] added

Change user properties

You can change an user property by typing:

$ blynkcli user set [email protected] energy 15000
[OK] Property energy set to 15000
[WARN] You must restart the server to apply the effect

Now we can check the new value:

$ blynkcli user get [email protected] energy
energy: 15000

Clone Projects from one user to another

blynkcli user clone-projects [email protected] [email protected]
[OK] [email protected] projects cloned from [email protected]
[WARN] You must restart the server to apply the effect
[OK] Backup done! You can find it in /home/sephir/.blynkcli/backup/auto-cloneProfile/07221e9e-3f09-46dc-914a-

Change user password

blynkcli user password [email protected]
? Password:  [hidden]
? Confirm your password:  [hidden]
[WARN] You must restart the server to apply the effect

blynk-cli's People

Contributors

booteille avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

blynk-cli's Issues

You can support me invidious ?

You can help me paid support ?????

1)change my ip address ipv6 because google block my ipv4 adress
2)i want add invidous my html template (you help me how adding my code )
3)How using a lot of domain other template one server

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.