Skip to content

Bash script to control Keenetic routers via HTTP API

License

Notifications You must be signed in to change notification settings

tolkonepiu/keencli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keencli

Bash script to control Keenetic routers via HTTP API

version license linters tests


keencli


Requirements

  • GNU/Linux or macOS with Bash 4+
  • yq
  • curl

Supported routers

Tested with KeeneticOS 3.5+

Install

Download bash script there and make it executable:

wget https://github.com/tolkonepiu/keencli/raw/main/keencli
chmod +x keencli

Usage

An keencli command has the following structure:

keencli <command> <subcommand> [options and parameters]

For example, to view system information, the command would be:

keencli show system

To view help documentation, use one of the following:

keencli --help
keencli <command> --help
keencli <command> <subcommand> --help

To get the version of the keencli:

keencli --version

To turn on debugging output:

DEBUG=1 keencli <command> <subcommand>

To turn off color output:

NO_COLOR=1 keencli <command> <subcommand>

Development

keencli uses bashly for generating the one-file script from files in the src directory

  1. Install bashly (requires ruby):

    gem install bashly
  2. Edit code in src directory

  3. Generate script:

    bashly generate --upgrade