knife

command module
v0.1.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

knife小工具

小工具

go get -u github.com/clibing/knife

or

git clone github.com/clibing/knife

安装

下载二进制包,执行安装命令即可

  • linux/macos 默认安装到 /usr/local/bin/knife
  • win 默认安装到 C:/Windows/system32/knife.exe

以macos为例

chmod a+x knife_darwin_amd64
sudo ./knife_darwin_amd64 install 

输出
install success

查看帮助

一个小工具集合

Usage:
  knife [command]

Available Commands:
  client      多客户端: http, redis, websocket
  common      通用工具: random, time
  completion  Generate the autocompletion script for the specified shell
  help        Help about any command
  image       图片处理器: qrcode, base64 image
  install     安装
  net         网络处理器: ip, wol
  server      服务器相关: static
  sign        签名密钥相关: rsa, md5, base64, sha1, sha128, sha256, sha512
  system      系统工具: arch, monitor, upgrade, maven
  transform   转换器: json, markdown, url
  uninstall   卸载
  version     查看当前版本号

Flags:
      --config string   config file (default is $HOME/.knife.yaml)
      --debug           global debug
  -h, --help            help for knife
  -t, --toggle          Help message for toggle

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

功能

  • 1.时间格式化工具,实现提取当前系统的戳毫秒(13位), 接收一个时间戳按照指定的格式进行格式化。
  • 2.URL编码解码
  • 3.加密计算, 默认接收字符串计算,支持计算指定的文件
    • 接收字符串
    • 加密文件
  • 4.xml,json,yml 互转与美化
    • 格式化json
    • json to xml
    • xml to json
    • yml to json
    • json to yml
  • 5.常用定时器cron表达式
  • 6.图片生成 从Base64生成文件,根据文件生成Base64
  • 7.RSA公钥私钥生成器
  • 8.二维码生成器
  • 9.IP查询,支持本机ip、出口ip等
  • 10.markdown处理,支持从HTML转Markdown
  • 11.正则表达式
  • 12.CPU和内存使用率
  • 13.生成随机数(默认UUID)支持数字、大小26个英文、标点符号
  • 14.wake on lan
  • 15.升级

Documentation

Overview

Copyright © 2021 NAME HERE <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis
cmd
internal
pkg
*

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL