feat(commands): more commands (#30)

- I wrote a scripts to copy and generate all commands missing in iris
from fig repo: https://github.com/withfig/autocomplete
- Add a new script to generate commands docs about which commands
currently are inside commands folder
377d4aac663590e504fe39a92eb4dac4cbd333b2
- Add more icons e64d4e70a1db61e62053460a882e093bd6373ab1
This commit is contained in:
VERSE
2026-07-04 22:08:36 +07:00
committed by GitHub
parent ffa336196a
commit 2ef3c90819
482 changed files with 22971 additions and 5 deletions
+96
View File
@@ -0,0 +1,96 @@
package golang
import (
"github.com/versenilvis/iris/commands/core"
)
func init() {
core.Register(&core.Spec{
Name: "goctl",
Description: "A cli tool to generate go-zero code",
Subcommands: []core.Subcommand{
{Name: "api", Description: "Generate api related files"},
{Name: "dart", Description: "Generate dart files for provided api in api file"},
{Name: "doc", Description: "Generate doc files"},
{Name: "format", Description: "Format api files"},
{Name: "go", Description: "Generate go files for provided api in yaml file"},
{Name: "java", Description: "Generate java files for provided api in api file"},
{Name: "kt", Description: "Generate kotlin code for provided api file"},
{Name: "new", Description: "Fast create api service"},
{Name: "plugin", Description: "Custom file generator"},
{Name: "ts", Description: "Generate ts files for provided api in api file"},
{Name: "validate", Description: "Validate api file"},
{Name: "bug", Description: "Report a bug"},
{Name: "completion", Description: "Generate the autocompletion script for the specified shell"},
{Name: "bash", Description: "Generate the autocompletion script for bash"},
{Name: "fish", Description: "Generate the autocompletion script for fish"},
{Name: "powershell", Description: "Generate the autocompletion script for powershell"},
{Name: "zsh", Description: "Generate the autocompletion script for zsh"},
{Name: "docker", Description: "Generate Dockerfile"},
{Name: "env", Description: "Check or edit goctl environment"},
{Name: "check", Description: "Detect goctl env and dependency tools"},
{Name: "install", Description: "Goctl env installation"},
{Name: "kube", Description: "Generate kubernetes files"},
{Name: "deploy", Description: "Generate deployment yaml file"},
{Name: "migrate", Description: "Migrate from tal-tech to zeromicro"},
{Name: "model", Description: "Generate model code"},
{Name: "mongo", Description: "Generate mongo model"},
{Name: "mysql", Description: "Generate mysql model"},
{Name: "datasource", Description: "Generate model from datasource"},
{Name: "ddl", Description: "Generate mysql model from ddl"},
{Name: "pg", Description: "Generate postgresql model"},
{Name: "quickstart", Description: "Quickly start a project"},
{Name: "rpc", Description: "Generate rpc code"},
{Name: "protoc", Description: "Generate grpc code"},
{Name: "template", Description: "Generate proto template"},
{Name: "clean", Description: "Clean the all cache templates"},
{Name: "init", Description: "Initialize the all templates(force update)"},
{Name: "revert", Description: "Revert the target template to the latest"},
{Name: "update", Description: "Update template of the target category to the latest"},
{Name: "upgrade", Description: "Upgrade goctl to latest version"},
{Name: "help", Description: "Help about any command"},
},
Options: []core.Option{
{Name: "--api", Description: "The api file"},
{Name: "--dir", Description: "The target dir"},
{Name: "--hostname", Description: "Hostname of the server"},
{Name: "--legacy", Description: "Legacy generator for flutter v1"},
{Name: "--o", Description: "The output markdown directory"},
{Name: "--declare", Description: "Use to skip check api types already declare"},
{Name: "--iu", Description: "Ignore update"},
{Name: "--stdin", Description: "Generate go files for provided api in yaml file"},
{Name: "--branch", Description: "The branch of the remote repo, it does work with --remote"},
{Name: "--home", Description: "Generate java files for provided api in api file"},
{Name: "--pkg", Description: "Define package name for kotlin file"},
{Name: "--plugin", Description: "The plugin file"},
{Name: "--style", Description: "Generate ts files for provided api in api file"},
{Name: "--caller", Description: "The web api caller"},
{Name: "--unwrap", Description: "Unwrap the webapi caller for import"},
{Name: "--webapi", Description: "The web api file path"},
{Name: "--remote", Description: "Report a bug"},
{Name: "--no-descriptions", Description: "Disable completion descriptions"},
{Name: "--base", Description: "The base image to build the docker image, default scratch"},
{Name: "--go", Description: "The directory that contains main function"},
{Name: "--version", Description: "The goctl builder golang image version"},
{Name: "--install", Description: "Install dependencies if not found"},
{Name: "--write", Description: "Edit goctl environment"},
{Name: "--force", Description: "Silent installation of non-existent dependencies"},
{Name: "--verbose", Description: "Enable log output"},
{Name: "--limitCpu", Description: "The limit cpu to deploy"},
{Name: "--limitMem", Description: "The limit memory to deploy"},
{Name: "--maxReplicas", Description: "The max replicas to deploy"},
{Name: "--minReplicas", Description: "The min replicas to deploy"},
{Name: "--name", Description: "The name of deployment (required)"},
{Name: "--namespace", Description: "The namespace of deployment (required)"},
{Name: "--nodePort", Description: "The nodePort of the deployment to expose"},
{Name: "--port", Description: "The port of the deployment to listen on pod (required)"},
{Name: "--requestCpu", Description: "The request cpu to deploy"},
{Name: "--requestMem", Description: "The request memory to deploy"},
{Name: "--revisions", Description: "The number of revision history to limit"},
{Name: "--secret", Description: "The secret to image pull from registry"},
{Name: "--serviceAccount", Description: "The ServiceAccount for the deployment"},
{Name: "--cache", Description: "Generate code with cache [optional]"},
{Name: "--url", Description: "Generate mysql model from ddl"},
},
})
}
+57
View File
@@ -0,0 +1,57 @@
package golang
import (
"github.com/versenilvis/iris/commands/core"
)
func init() {
core.Register(&core.Spec{
Name: "goreleaser",
Description: "Deliver Go binaries as fast and easily as possible",
Subcommands: []core.Subcommand{
{Name: "b", Description: "Builds the current project"},
{Name: "c", Description: "Checks if configuration is valid"},
{Name: "completion", Description: "Generate the autocompletion script for the specified shell"},
{Name: "bash", Description: "Generate the autocompletion script for bash"},
{Name: "fish", Description: "Generate the autocompletion script for fish"},
{Name: "powershell", Description: "Generate the autocompletion script for powershell"},
{Name: "zsh", Description: "Generate the autocompletion script for zsh"},
{Name: "hc", Description: "Checks if needed tools are installed"},
{Name: "i", Description: "Generates a .goreleaser.yaml file"},
{Name: "schema", Description: "Outputs goreleaser's JSON schema"},
{Name: "r", Description: "Releases the current project"},
{Name: "help", Description: "Help about any command"},
},
Options: []core.Option{
{Name: "--clean", Description: "Remove the dist folder before building"},
{Name: "--config", Description: "Load configuration from file"},
{Name: "--deprecated", Description: "Force print the deprecation message - tests only"},
{Name: "--id", Description: "Builds only the specified build ids"},
{Name: "--output", Description: "Amount tasks to run concurrently (default: number of CPUs)"},
{Name: "--rm-dist", Description: "Remove the dist folder before building"},
{Name: "--single-target", Description: "Skips global before hooks"},
{Name: "--skip-post-hooks", Description: "Skips all post-build hooks"},
{Name: "--skip-validate", Description: "Skips several sanity checks"},
{Name: "--snapshot", Description: "Generate an unversioned snapshot build, skipping all validations"},
{Name: "--timeout", Description: "Timeout to the entire build process"},
{Name: "--quiet", Description: "Quiet mode: no output"},
{Name: "--no-descriptions", Description: "Disable completion descriptions"},
{Name: "--auto-snapshot", Description: "Automatically sets --snapshot if the repository is dirty"},
{Name: "--fail-fast", Description: "Whether to abort the release publishing on the first error"},
{Name: "--parallelism", Description: "Amount tasks to run concurrently (default: number of CPUs)"},
{Name: "--release-footer", Description: "Load custom release notes footer from a markdown file"},
{Name: "--release-footer-tmpl", Description: "Load custom release notes header from a markdown file"},
{Name: "--release-header-tmpl", Description: "Removes the dist folder"},
{Name: "--skip", Description: "Skips announcing releases (implies --skip=validate)"},
{Name: "--skip-before", Description: "Skips global before hooks"},
{Name: "--skip-docker", Description: "Skips Docker Images/Manifests builds"},
{Name: "--skip-ko", Description: "Skips Ko builds"},
{Name: "--skip-publish", Description: "Skips publishing artifacts (implies --skip=announce)"},
{Name: "--skip-sbom", Description: "Skips cataloging artifacts"},
{Name: "--skip-sign", Description: "Skips signing artifacts"},
{Name: "--debug", Description: "Enable verbose mode"},
{Name: "--verbose", Description: "Enable verbose mode"},
{Name: "--help", Description: "Display help"},
},
})
}