AlexsJones/cli — dự án backend — đang có 34 sao GitHub trong nhóm Backend. golang interactive cli with sub commands
Tóm tắt dựng từ metadata GitHub của chính dự án — chưa có bài review TopGit. Trang sẽ tự động cập nhật khi bài review đầy đủ được xuất bản.
VÌ SAO CHƯA CÓ REVIEW
TopGit viết bài đầy đủ cho repo có nhiều sao nhất và được yêu cầu nhiều nhất. Trang này là snapshot trong thời gian chờ — xem README gốc ở tab READ ME.
This is a simple interactive prompt for go that actually supports sub-commands, because I couldn't find one that did...
Supports unlimited subcommand nesting.
It is ultra light weight and whilst is no where near as good as Cobra, it might be useful to someone.
It looks a bit like this (Once you wire up your commands: see example):
>>>github login auth alex
Hit auth
Authenticated with alex
>>>github logout
Logged out
>>>help
npm sub commands:
[npm] file: relink an npm package locally<prefix> <string>
[npm] remove: remove a dep from package.json <string>
[npm] usage: find usage of a package within submodules <string>
github sub commands:
[github] pr: pr command palette
[pr] attach: attach the current issue to a pr <reponame> <owner> <prnumber>
[github] issue: Issue command palette
[issue] set: set the current working issue <issue url>
[issue] unset: unset the current working issue
[issue] show: show the current working issue
[github] login: use an access token to login to github
submodule sub commands:
[submodule] exec: execute in all submodules <command string>
package main
import (
"fmt"
"github.com/AlexsJones/cli/cli"
"github.com/AlexsJones/cli/command"
)
func main() {
c := cli.NewCli()
c.AddCommand(command.Command{
Name: "github",
Help: "github primary command interface",
Func: func(args []string) {
fmt.Println("I do nothing...")
},
SubCommands: []command.Command{
command.Command{
Name: "login",
Help: "access token to github",
Func: func(args []string) {
if len(args) == 0 {
fmt.Println("Failed login")
return
}
fmt.Printf("Logged in %s", args[0])
},
SubCommands: []command.Command{
command.Command{
Name: "auth",
Help: "login sub command",
Func: func(args []string) {
fmt.Println("Hit auth")
if len(args) == 0 {
fmt.Println("Failed login")
return
}
fmt.Printf("Authenticated with %s\n", args[0])
},
SubCommands: []command.Command{
command.Command{
Name: "sub",
Help: "login sub-sub command",
Func: func(args []string) {
if len(args) == 0 {
fmt.Println("Failed login")
return
}
fmt.Printf("Logged in with username %s\n", args[0])
},
},
},
},
},
},
command.Command{
Name: "logout",
Help: "allows you to logout from github",
Func: func(args []string) {
fmt.Println("Logged out")
if len(args) == 0 {
fmt.Println("Failed logout")
return
}
fmt.Printf("Logged out with username %s\n", args[0])
},
},
},
})
c.AddCommand(command.Command{
Name: "sql",
Help: "sql primary command interface",
Func: func(args []string) {
fmt.Println("I do nothing...")
}})
c.Run()
System commands
help & exit
Gives you information such as:
>>>help
npm sub commands:
[npm] file: relink an npm package locally<prefix> <string>
[npm] remove: remove a dep from package.json <string>
[npm] usage: find usage of a package within submodules <string>
github sub commands:
[github] pr: pr command palette
[pr] attach: attach the current issue to a pr <reponame> <owner> <prnumber>
[github] issue: Issue command palette
[issue] set: set the current working issue <issue url>
[issue] unset: unset the current working issue
[issue] show: show the current working issue
[github] login: use an access token to login to github
submodule sub commands:
[submodule] exec: execute in all submodules <command string>
AlexsJones/cli có 34 sao GitHub — tải lại trang để xem số mới nhất, hoặc xem trực tiếp github.com/AlexsJones/cli. TopGit phản chiếu số sao của GitHub nhưng không cam kết đến từng phút.
AlexsJones/cli có những chủ đề gì?
GitHub topics của AlexsJones/cli: "cli", "commandline", "go", "golang", "prompt". TopGit xếp repo vào nhóm Backend.
AlexsJones/cli có website riêng không?
TopGit chưa ghi nhận URL trang chủ cho AlexsJones/cli. Phần README ở tab phía trên thường có link demo, hoặc xem mô tả GitHub của repo.
AlexsJones/cli còn đang phát triển không?
Commit gần nhất trên AlexsJones/cli là 2.8 năm trước (theo timestamp GitHub). Repo có 7 fork — một chỉ báo về mức độ quan tâm của cộng đồng.
AlexsJones/cli viết bằng ngôn ngữ gì?
AlexsJones/cli chủ yếu viết bằng Go. Trường "language" của GitHub dựa trên phần lớn byte ở nhánh mặc định.
Đọc thêm về AlexsJones/cli ở đâu?
Trang TopGit này là một snapshot — tab "Readme" hiển thị nguyên văn README của repo (đã bỏ link, giữ ảnh). Repo GitHub ở github.com/AlexsJones/cli là nguồn chính thức.
Đọc đầy đủ README ở tab phía trên.
Vẫn đang phân vân về cli?
Một cú bấm sẽ gửi câu hỏi kèm trang này cho AI — xem AI nói gì về cli.