cli: add OpenWrt CLI

This provides an easy to use modular CLI that can be used to interact with
OpenWrt services. It has full support for context sensitive tab completion
and help.
Extra modules can be provided by packages and can extend the existing node
structure in any place.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
Felix Fietkau
2025-01-13 22:46:05 +01:00
parent be31d44bd9
commit 248b66b44f
13 changed files with 3311 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
#
# Copyright (C) 2025 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=cli
PKG_RELEASE:=$(AUTORELEASE)
PKG_LICENSE:=GPL-2.0
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
include $(INCLUDE_DIR)/package.mk
define Package/cli
SECTION:=utils
CATEGORY:=Utilities
TITLE:=OpenWrt CLI
DEPENDS:=+ucode +ucode-mod-uline \
+ucode-mod-ubus +ucode-mod-uloop \
+ucode-mod-fs +ucode-mod-rtnl
endef
define Build/Compile
:
endef
define Package/cli/install
$(CP) ./files/* $(1)/
endef
$(eval $(call BuildPackage,cli))