MyGit

IceWhaleTech/CasaOS-CLI

Fork: 12 Star: 16 (更新于 2024-11-10 00:06:17)

license: Apache-2.0

Language: Go .

A command-line tool to interact with CasaOS for testing and diagnosing purpose

最后发布版本: v0.4.4-3-alpha1 ( 2023-11-20 17:55:07)

GitHub网址

CasaOS-CLI

Go Reference Go Report Card goreleaser codecov

A command-line tool to interact with CasaOS for testing and diagnosing purpose

Usage

A command line interface for CasaOS

Usage:
  casaos-cli [command]

Services
  app-management All compose app management and store related commands
  local-storage  All local storage related commands
  message-bus    All message bus related commands

Additional Commands:
  completion     Generate the autocompletion script for the specified shell
  help           Help about any command
  version        Show version

Flags:
  -h, --help              help for casaos-cli
  -u, --root-url string   root url of CasaOS API (default "localhost:80")

Additional help topics:
  casaos-cli gateway        All gateway related commands
  casaos-cli user           All user related commands

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

Contributing

Use https://github.com/spf13/cobra-cli to add any new command.

Follow example steps below to add commands like casaos-cli message-bus list event-types

  1. create command scaffold with cobra-cli add:

    go run github.com/spf13/cobra-cli@latest add messageBus --config .cobra.yaml
    go run github.com/spf13/cobra-cli@latest add messageBusList -p messageBusCmd --config .cobra.yaml
    go run github.com/spf13/cobra-cli@latest add messageBusListEventTypes -p messageBusListCmd --config .cobra.yaml
    

    It is important to include --config .cobra.yaml to attribute the scaffold code with correct license header.

  2. update each messageBus*.go file with correct command format:

    // messageBus.go
    Use:   "messageBus",
    // messageBusList.go
    Use:   "messageBusList",
    // messageBusListEventTypes.go
    Use:   "messageBusListEventTypes",
    

    becomes

    // messageBus.go
    Use:   "message-bus",
    // messageBusList.go
    Use:   "list",
    // messageBusListEventTypes.go
    Use:   "event-types",
    
  3. update short and long description for each command, and implement the logics

  4. to verify the commands are created correctly, run

    $ go run main.go message-bus list event-types --help
    list event types
    
    Usage:
    CasaOS-CLI message-bus list event-types [flags]
    
    Flags:
    -h, --help   help for event-types
    

Run go run github.com/spf13/cobra-cli@latest --help to see additional help message.

最近版本更新:(数据更新于 2024-09-21 22:51:04)

2023-11-20 17:55:07 v0.4.4-3-alpha1

2023-07-19 14:57:21 v0.4.4

2023-05-28 10:13:29 v0.4.4-alpha4

2023-05-22 21:19:31 v0.4.4-alpha3

2023-05-11 06:48:04 v0.4.4-alpha2

2023-05-11 06:47:28 v0.4.4-alpha1

2023-03-24 00:27:29 v0.4.3-alpha2

2023-03-16 11:25:58 v0.4.3-alpha1

2023-02-21 19:36:27 v0.4.2

2023-02-21 09:33:41 v0.4.2-alpha1

主题(topics):

cli, cobra-cli, go, golang

IceWhaleTech/CasaOS-CLI同语言 Go最近更新仓库

2024-11-21 22:49:20 containerd/containerd

2024-11-21 13:50:50 XTLS/Xray-core

2024-11-21 07:36:18 kubernetes/kubernetes

2024-11-21 06:27:30 ollama/ollama

2024-11-21 05:17:55 Melkeydev/go-blueprint

2024-11-21 04:04:03 dolthub/dolt