tahamajs/IE / Projects /cli /main.go
tahamajs's picture
download
raw
2.13 kB
package main
import (
"fmt"
"os"
)
var (
parsedArgs ParsedArgs
jsonOutput bool
)
type ToolMeta struct {
Name string `json:"name"`
Description string `json:"description"`
Author string `json:"author"`
Category string `json:"category"`
Version string `json:"version"`
Type string `json:"type"`
Tags []string `json:"tags"`
Icon string `json:"icon"`
License string `json:"license"`
IsPublic *bool `json:"isPublic,omitempty"`
RequiresPro *bool `json:"requiresPro,omitempty"`
Code string `json:"code,omitempty"`
}
const DefaultHost = "http://localhost:8080"
func main() {
parsedArgs = parseArgs(os.Args[1:])
jsonOutput = parsedArgs.Has("--json", "")
if parsedArgs.Has("--help", "-h") {
showHelp()
return
}
if len(parsedArgs.Positional) == 0 {
showHelp()
return
}
command := parsedArgs.Positional[0]
switch command {
case "help":
if len(parsedArgs.Positional) > 1 {
showDetailedHelp(parsedArgs.Positional[1])
} else {
showHelp()
}
case "init":
handleInit()
case "login":
handleLogin()
case "logout":
handleLogout()
case "whoami":
handleWhoami()
case "validate":
handleValidate()
case "deploy":
handleDeploy()
case "update":
handleUpdate()
case "delete":
handleDelete()
case "list":
handleList()
case "status":
handleStatus()
case "logs":
handleLogs()
case "search":
handleSearch()
case "trending":
handleTrending()
case "download":
handleDownload()
case "review":
handleReview()
case "web-search":
handleWebSearch()
case "builder":
handleBuilder()
case "view":
handleView()
case "dev":
handleDev()
case "generate":
handleGenerate()
case "agent":
if parsedArgs.Has("--python", "-p") {
runPythonAgent()
} else {
startAgentSession()
}
case "github":
handleGithub()
case "key":
handleKey()
case "version", "--version", "-v":
handleVersion()
case "build":
handleValidate() // alias for validate
default:
fmt.Printf("%sUnknown command '%s'.%s Run 'ie-cli help' for usage details.\n", Red, command, Reset)
os.Exit(1)
}
}

Xet Storage Details

Size:
2.13 kB
·
Xet hash:
660b10114d2daa299f7c8792370c75e649caef99cd0660195101cca74186643d

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.