refactor(commands): separate commands and its core into two folders (#32)
- I think it would be better if one for commands only, one for the spec handling core logic so people won't be confused by the core logic inside the commands folder (cleaner I guess) - Regen docs
This commit is contained in:
+2
-2
@@ -1,8 +1,8 @@
|
||||
# Iris commands
|
||||
|
||||
This directory contains all modular CLI command specifications and autocompletion definitions supported by **Iris**. Every command is defined as a `core.Spec` registered via package `init()` functions and grouped into category subdirectories.
|
||||
This directory contains all modular CLI command specifications and autocompletion definitions supported by **Iris**. Every command is defined as a `spec.Spec` registered via package `init()` functions and grouped into category subdirectories.
|
||||
|
||||
The **[`core/`](./core)** subdirectory is the primary engine package. It implements the underlying command registry (`core.Registry`), data structures (`Spec`, `Arg`, `Flag`), dynamic generators, and autocompletion matching logic. The top-level **[`all.go`](./all.go)** file anonymously imports all category subpackages to trigger their initialization and register all available commands at startup.
|
||||
The top-level **[`spec/`](../spec)** package is the primary engine package. It implements the underlying command registry (`spec.Registry`), data structures (`Spec`, `Arg`, `Flag`), dynamic generators, and autocompletion matching logic. The **[`all.go`](./all.go)** file anonymously imports all category subpackages to trigger their initialization and register all available commands at startup.
|
||||
|
||||
## Overview
|
||||
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "bazel",
|
||||
Description: "Bazel target",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "run", Description: "Runs the specified target"},
|
||||
{Name: "test", Description: "Builds and runs the specified test targets"},
|
||||
{Name: "build", Description: "Builds the specified targets"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--autodetect_server_javabase", Description: "Back to the local JDK for running the bazel server and instead exits"},
|
||||
{Name: "--nobatch", Description: "Run with a server"},
|
||||
{Name: "--batch_cpu_scheduling", Description: "Only on Linux; use 'batch' CPU scheduling for Bazel"},
|
||||
|
||||
+14
-14
@@ -1,11 +1,11 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
cOptions := []core.Option{
|
||||
cOptions := []spec.Option{
|
||||
{Name: "-o", Description: "output file"},
|
||||
{Name: "-c", Description: "compile only (no link)"},
|
||||
{Name: "-g", Description: "debug symbols"},
|
||||
@@ -35,45 +35,45 @@ func init() {
|
||||
{Name: "--version", Description: "print version"},
|
||||
}
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "gcc",
|
||||
Description: "GNU C compiler",
|
||||
Generator: core.FileGenerator(".c", ".h"),
|
||||
Generator: spec.FileGenerator(".c", ".h"),
|
||||
Options: cOptions,
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "g++",
|
||||
Description: "GNU C++ compiler",
|
||||
Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Options: cOptions,
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cc",
|
||||
Description: "C compiler (alias)",
|
||||
Generator: core.FileGenerator(".c", ".h"),
|
||||
Generator: spec.FileGenerator(".c", ".h"),
|
||||
Options: cOptions,
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "c++",
|
||||
Description: "C++ compiler (alias)",
|
||||
Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Options: cOptions,
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "clang",
|
||||
Description: "LLVM C compiler",
|
||||
Generator: core.FileGenerator(".c", ".h"),
|
||||
Generator: spec.FileGenerator(".c", ".h"),
|
||||
Options: cOptions,
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "clang++",
|
||||
Description: "LLVM C++ compiler",
|
||||
Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"),
|
||||
Options: cOptions,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cmake",
|
||||
Description: "Command-line interface of the cross-platform buildsystem generator CMake",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "permissions", Description: "Format: <u=rwx,g=rx,o=rx>"},
|
||||
{Name: "cat", Description: "Concatenate files and print on the standard output"},
|
||||
{Name: "chdir", Description: "Change the current working directory and run a command"},
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
{Name: "time", Description: "Run command and display elapsed time"},
|
||||
{Name: "true", Description: "Do nothing, with an exit code of 0"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--build", Description: "Use a build preset to specify build options"},
|
||||
{Name: "--list-presets", Description: "For multi-configuration tools, choose configuration <cfg>"},
|
||||
{Name: "--clean-first", Description: "Build target clean first, then build"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "premake",
|
||||
Description: "The premake5.lua file",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "clean", Description: "Remove all binaries and generated files"},
|
||||
{Name: "vs2022", Description: "Generate Visual Studio 2022 project files"},
|
||||
{Name: "vs2019", Description: "Generate Visual Studio 2019 project files"},
|
||||
@@ -24,7 +24,7 @@ func init() {
|
||||
{Name: "xcode4", Description: "Generate Apple Xcode 4 project files"},
|
||||
{Name: "codelite", Description: "Generate CodeLite project files"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--file", Description: "The premake5.lua file"},
|
||||
{Name: "--debugger", Description: "Start MobDebug remote debugger. Works with ZeroBrane Studio"},
|
||||
{Name: "--fatal", Description: "Treat warnings from project scripts as errors"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "swift",
|
||||
Description: "Show help information",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "build", Description: "Build sources into binary products"},
|
||||
{Name: "target", Description: "The name of the target to build"},
|
||||
{Name: "product", Description: "The name of the product to build"},
|
||||
@@ -60,7 +60,7 @@ func init() {
|
||||
{Name: "compute-checksum", Description: "Compute the checksum for a binary artifact"},
|
||||
{Name: "archive-source", Description: "Create a source archive for the package"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help information"},
|
||||
{Name: "--version", Description: "Show the version"},
|
||||
{Name: "-access-notes-path", Description: "Specify YAML file to override attributes on Swift declarations in this module"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "typst",
|
||||
Description: "The Typst compiler",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "compile", Description: "Compiles an input file into a supported output format"},
|
||||
{Name: "input", Description: "Path to input Typst file"},
|
||||
{Name: "output", Description: "Path to output file (PDF, PNG, or SVG)"},
|
||||
@@ -20,7 +20,7 @@ func init() {
|
||||
{Name: "version", Description: "Which version to update to (defaults to latest)"},
|
||||
{Name: "help", Description: "Print this message or the help of the given subcommand(s)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--root", Description: "Configures the project root (for absolute paths)"},
|
||||
{Name: "--font-path", Description: "Adds additional directories to search for fonts"},
|
||||
{Name: "--diagnostic-format", Description: "The format to emit diagnostics in"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "xcode-select",
|
||||
Description: "Active developer directory for Xcode tools",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-h", Description: "Help message"},
|
||||
{Name: "-p", Description: "Display path to active developer directory"},
|
||||
{Name: "-s", Description: "Set path to active developer directory"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "xcodebuild",
|
||||
Description: "Build Xcode projects",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-usage", Description: "Print brief usage"},
|
||||
{Name: "-help", Description: "Print complete usage"},
|
||||
{Name: "-verbose", Description: "Provide additional status output"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "xcodeproj",
|
||||
Description: "Xcodeproj lets you create and modify Xcode projects",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--ignore", Description: "A key to ignore in the comparison. Can be specified multiple times"},
|
||||
{Name: "--format", Description: "YAML output format"},
|
||||
{Name: "--group-option", Description: "Shows the difference between two targets"},
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "xcrun",
|
||||
Description: "SceneKit CLI utilities",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "scntool", Description: "SceneKit CLI utilities"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--convert", Description: "File to convert"},
|
||||
{Name: "--format", Description: "Format to convert to"},
|
||||
{Name: "--output", Description: "Path to the output file"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package cc
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "zig",
|
||||
Description: "Enable or disable colored message",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "build", Description: "Build project from build.zig"},
|
||||
{Name: "install", Description: "Copy build artifacts to prefix path"},
|
||||
{Name: "uninstall", Description: "Remove build artifacts from prefix path"},
|
||||
@@ -40,7 +40,7 @@ func init() {
|
||||
{Name: "version", Description: "Print version number and exit"},
|
||||
{Name: "zen", Description: "Print Zen of Zig and exit"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--color", Description: "Enable or disable colored message"},
|
||||
{Name: "--cache-dir", Description: "Override path to local Zig cache directory"},
|
||||
{Name: "--global-cache-dir", Description: "Override path to global Zig cache directory"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "broot",
|
||||
Description: "Show the last modified date of files and directories",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--dates", Description: "Show the last modified date of files and directories"},
|
||||
{Name: "--no-dates", Description: "Don't show the last modified date"},
|
||||
{Name: "--only-folders", Description: "Only show folders"},
|
||||
|
||||
+4
-4
@@ -3,17 +3,17 @@ package fs
|
||||
import (
|
||||
"strings"
|
||||
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cd",
|
||||
Description: "change directory",
|
||||
MaxArgs: 0,
|
||||
Generator: func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
fullQuery := strings.Join(tokens[1:], " ")
|
||||
return core.FileGenerator("/")(tokens, prefix, fullQuery)
|
||||
return spec.FileGenerator("/")(tokens, prefix, fullQuery)
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
+10
-10
@@ -1,16 +1,16 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "chmod",
|
||||
Description: "change file permissions",
|
||||
MaxArgs: 2, // 1 option + 1 file
|
||||
Subcommands: []core.Subcommand{},
|
||||
Options: []core.Option{
|
||||
Subcommands: []spec.Subcommand{},
|
||||
Options: []spec.Option{
|
||||
{Name: "-R", Description: "apply recursively to directories"},
|
||||
{Name: "--recursive", Description: "apply recursively to directories"},
|
||||
{Name: "-v", Description: "verbose: show each file processed"},
|
||||
@@ -31,8 +31,8 @@ func init() {
|
||||
|
||||
// modeGenerator suggests common chmod mode strings as the first argument,
|
||||
// then falls back to file suggestions for subsequent arguments
|
||||
func modeGenerator() core.GeneratorFunc {
|
||||
filegen := core.FileGenerator(".sh", ".py", ".bin", ".run")
|
||||
func modeGenerator() spec.GeneratorFunc {
|
||||
filegen := spec.FileGenerator(".sh", ".py", ".bin", ".run")
|
||||
|
||||
commonModes := []struct {
|
||||
mode string
|
||||
@@ -63,7 +63,7 @@ func modeGenerator() core.GeneratorFunc {
|
||||
{"664", "rw-rw-r-- (group can read+write)"},
|
||||
}
|
||||
|
||||
return func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
return func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
argCount := 0
|
||||
for i := 1; i < len(tokens); i++ {
|
||||
t := tokens[i]
|
||||
@@ -73,10 +73,10 @@ func modeGenerator() core.GeneratorFunc {
|
||||
}
|
||||
|
||||
if argCount == 0 {
|
||||
var results []core.Suggestion
|
||||
var results []spec.Suggestion
|
||||
for _, m := range commonModes {
|
||||
if partial == "" || core.HasPrefixCI(m.mode, partial) {
|
||||
results = append(results, core.Suggestion{
|
||||
if partial == "" || spec.HasPrefixCI(m.mode, partial) {
|
||||
results = append(results, spec.Suggestion{
|
||||
Cmd: m.mode,
|
||||
Desc: m.desc,
|
||||
})
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "chown",
|
||||
Description: "change file owner",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-R", Description: "recursive"},
|
||||
},
|
||||
})
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cp",
|
||||
Description: "copy files and directories",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-r", Description: "recursive"},
|
||||
{Name: "-a", Description: "archive mode"},
|
||||
{Name: "-v", Description: "verbose"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "df",
|
||||
Description: "Display free disk space",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "Show all mount points"},
|
||||
{Name: "-b", Description: "Use 512-byte blocks (default)"},
|
||||
{Name: "-g", Description: "Use 1073741824-byte (1-Gbyte) blocks"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "dust",
|
||||
Description: "Like du but more intuitive",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for dust"},
|
||||
{Name: "--version", Description: "Print version information"},
|
||||
{Name: "--no-percent-bars", Description: "No percent bars or percentages will be displayed"},
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "exa",
|
||||
Description: "A modern replacement for ls",
|
||||
})
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "eza",
|
||||
Description: "A modern replacement for ls",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-?", Description: "Show list of command-line options"},
|
||||
{Name: "-v", Description: "Show version of eza"},
|
||||
{Name: "-1", Description: "Display one entry per line"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "find",
|
||||
Description: "Walk a file hierarchy",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-E", Description: "Permit find to be safely used in conjunction with xargs"},
|
||||
{Name: "-d", Description: "Cause find to perform a depth-first traversal"},
|
||||
{Name: "-f", Description: "Specify a file hierarch for find to traverse"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "fold",
|
||||
Description: "Fold long lines for finite width output device",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-b", Description: "File(s) to fold"},
|
||||
},
|
||||
})
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ln",
|
||||
Description: "create links",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-s", Description: "symbolic link"},
|
||||
{Name: "-f", Description: "force"},
|
||||
},
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ls",
|
||||
Description: "list directory contents",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "all files"},
|
||||
{Name: "-l", Description: "long format"},
|
||||
{Name: "-h", Description: "human readable"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "lsd",
|
||||
Description: "An ls command with a lot of pretty colors and some other stuff",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-1", Description: "Display one entry per line"},
|
||||
{Name: "-A", Description: "Do not list implied . and"},
|
||||
{Name: "-a", Description: "Do not ignore entries starting with"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "mkdir",
|
||||
Description: "make directories",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-p", Description: "create parent dirs"},
|
||||
{Name: "-v", Description: "verbose"},
|
||||
},
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "mv",
|
||||
Description: "move (rename) files",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-i", Description: "interactive"},
|
||||
{Name: "-f", Description: "force (overwrite)"},
|
||||
{Name: "-n", Description: "no clobber (don't overwrite)"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "paper",
|
||||
Description: "The Paper CLI",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "bench", Description: "Benchmark a Paper query"},
|
||||
{Name: "build", Description: "Build an Paper bundle"},
|
||||
{Name: "check", Description: "Check Paper source files"},
|
||||
@@ -29,7 +29,7 @@ func init() {
|
||||
{Name: "version", Description: "Print the version of Paper"},
|
||||
{Name: "help", Description: "Help about any command"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--benchmem", Description: "Report memory allocations with benchmark results"},
|
||||
{Name: "--bundle", Description: "Set bundle file(s) or directory path(s). This flag can be repeated"},
|
||||
{Name: "--count", Description: "Number of times to repeat each benchmark"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "rclone",
|
||||
Description: "Only list directories",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "about", Description: "Get quota information from the remote"},
|
||||
{Name: "authorize", Description: "Remote authorization"},
|
||||
{Name: "backend", Description: "Run a backend specific command"},
|
||||
@@ -60,7 +60,7 @@ func init() {
|
||||
{Name: "size", Description: "Prints the total size and number of objects in remote:path"},
|
||||
{Name: "sync", Description: "Make source and dest identical, modifying destination only"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--dirs-only", Description: "Only list directories"},
|
||||
{Name: "--files-only", Description: "Only list files"},
|
||||
{Name: "--recursive", Description: "Recurse into the listing"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "readlink",
|
||||
Description: "Display file status",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "Do not force a newline to appear at the end of each piece of output"},
|
||||
},
|
||||
})
|
||||
|
||||
+4
-4
@@ -1,15 +1,15 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "rm",
|
||||
Description: "remove files or directories",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-r", Description: "recursive"},
|
||||
{Name: "-f", Description: "force"},
|
||||
{Name: "-i", Description: "interactive"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "rmdir",
|
||||
Description: "Remove directories",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-p", Description: "Remove each directory of path"},
|
||||
},
|
||||
})
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "stow",
|
||||
Description: "Manage farms of symbolic links",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-n", Description: "Set the target directory to 'DIR' instead of the parent of the stow directory"},
|
||||
{Name: "-v", Description: "Ignore files ending in this Perl regex"},
|
||||
{Name: "--defer", Description: "Show Stow version, and exit"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "tar",
|
||||
Description: "Use archive file or device ARCHIVE",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "A", Description: "Append archive to the end of another archive"},
|
||||
{Name: "c", Description: "Create a new archive"},
|
||||
{Name: "b", Description: "Set record size to BLOCKSx512 bytes"},
|
||||
@@ -41,7 +41,7 @@ func init() {
|
||||
{Name: "bad-dumpdir", Description: "\\"},
|
||||
{Name: "?", Description: "Display a short option summary and exit"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--force-local", Description: "Archive file is local even if it has a colon"},
|
||||
{Name: "--rmt-command", Description: "Use COMMAND instead of rmt when accessing remote archives"},
|
||||
{Name: "--rsh-command", Description: "Use COMMAND instead of rsh when accessing remote archives"},
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "touch",
|
||||
Description: "create or update file timestamp",
|
||||
Generator: core.FileGenerator(),
|
||||
Generator: spec.FileGenerator(),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "trash",
|
||||
Description: "Trash, move files/folders to the trash",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-v", Description: "Print verbose output while moving items"},
|
||||
{Name: "-F", Description: "Use the Finder API to move items to the trash"},
|
||||
{Name: "-l", Description: "List items in the trash"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "tree",
|
||||
Description: "Display directories as trees (with optional color/HTML output)",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "All files are listed"},
|
||||
{Name: "-d", Description: "List directories only"},
|
||||
{Name: "-l", Description: "Follow symbolic links like directories"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "unzip",
|
||||
Description: "Extract compressed files in a ZIP archive",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-l", Description: "List the contents of a zip file without extracting"},
|
||||
},
|
||||
})
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package fs
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "zip",
|
||||
Description: "Package and compress (archive) files into zip file",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-r", Description: "Package and compress a directory and its contents, recursively"},
|
||||
{Name: "-e", Description: "Archive a directory and its contents with the highest level [9] of compression"},
|
||||
},
|
||||
|
||||
+10
-10
@@ -12,17 +12,17 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/versenilvis/fuzzy"
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "z",
|
||||
Description: "jump to directory",
|
||||
MaxArgs: 0,
|
||||
Generator: ZoxideGenerator(),
|
||||
})
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "zi",
|
||||
Description: "jump to directory interactively",
|
||||
MaxArgs: 0,
|
||||
@@ -30,12 +30,12 @@ func init() {
|
||||
})
|
||||
}
|
||||
|
||||
func ZoxideGenerator() core.GeneratorFunc {
|
||||
return func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
func ZoxideGenerator() spec.GeneratorFunc {
|
||||
return func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
fullQuery := strings.Join(tokens[1:], " ")
|
||||
localSuggestions := core.FileGenerator("/")(tokens, prefix, fullQuery)
|
||||
localSuggestions := spec.FileGenerator("/")(tokens, prefix, fullQuery)
|
||||
|
||||
var zoxideSuggestions []core.Suggestion
|
||||
var zoxideSuggestions []spec.Suggestion
|
||||
cmd := exec.CommandContext(context.Background(), "zoxide", "query", "-l")
|
||||
out, err := cmd.Output()
|
||||
if err == nil {
|
||||
@@ -55,7 +55,7 @@ func ZoxideGenerator() core.GeneratorFunc {
|
||||
for i := 0; i < limit; i++ {
|
||||
path := dirs[i]
|
||||
display := strings.Replace(path, home, "~", 1)
|
||||
zoxideSuggestions = append(zoxideSuggestions, core.Suggestion{
|
||||
zoxideSuggestions = append(zoxideSuggestions, spec.Suggestion{
|
||||
Cmd: path,
|
||||
Desc: display,
|
||||
})
|
||||
@@ -66,7 +66,7 @@ func ZoxideGenerator() core.GeneratorFunc {
|
||||
for _, m := range matches {
|
||||
path := m.Str
|
||||
display := strings.Replace(path, home, "~", 1)
|
||||
zoxideSuggestions = append(zoxideSuggestions, core.Suggestion{
|
||||
zoxideSuggestions = append(zoxideSuggestions, spec.Suggestion{
|
||||
Cmd: path,
|
||||
Desc: display,
|
||||
})
|
||||
@@ -74,7 +74,7 @@ func ZoxideGenerator() core.GeneratorFunc {
|
||||
}
|
||||
}
|
||||
|
||||
var finalResults []core.Suggestion
|
||||
var finalResults []spec.Suggestion
|
||||
seen := make(map[string]bool)
|
||||
|
||||
finalResults = append(finalResults, localSuggestions...)
|
||||
|
||||
+4
-4
@@ -1,20 +1,20 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ghq",
|
||||
Description: "Clone/sync with a remote repository",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "get", Description: "Clone/sync with a remote repository"},
|
||||
{Name: "list", Description: "List local repositories"},
|
||||
{Name: "root", Description: "Show repositories' root"},
|
||||
{Name: "create", Description: "Create a new repository"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-u", Description: "Update local repository if cloned already (default: false)"},
|
||||
{Name: "-p", Description: "Clone with SSH (default: false)"},
|
||||
{Name: "--shallow", Description: "Do a shallow clone (default: false)"},
|
||||
|
||||
+60
-60
@@ -6,23 +6,23 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func GitRemoteGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
func GitRemoteGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
return getGitResults(tokens, "remote")
|
||||
}
|
||||
|
||||
func GitStashGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
func GitStashGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
return getGitResults(tokens, "stash", "list", "--format=%gd: %gs")
|
||||
}
|
||||
|
||||
func GitTagGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
func GitTagGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
return getGitResults(tokens, "tag", "-l")
|
||||
}
|
||||
|
||||
func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
cwd := core.GetCWD()
|
||||
func GitCommitGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
cwd := spec.GetCWD()
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
|
||||
@@ -33,7 +33,7 @@ func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
return nil
|
||||
}
|
||||
|
||||
var results []core.Suggestion
|
||||
var results []spec.Suggestion
|
||||
for line := range strings.SplitSeq(string(out), "\n") {
|
||||
line = strings.TrimSpace(line)
|
||||
if line == "" {
|
||||
@@ -45,17 +45,17 @@ func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
if len(parts) == 2 {
|
||||
desc = parts[1]
|
||||
}
|
||||
results = append(results, core.Suggestion{Cmd: hash, Desc: desc})
|
||||
results = append(results, spec.Suggestion{Cmd: hash, Desc: desc})
|
||||
}
|
||||
return results
|
||||
}
|
||||
|
||||
func getGitResults(tokens []string, args ...string) []core.Suggestion {
|
||||
func getGitResults(tokens []string, args ...string) []spec.Suggestion {
|
||||
return getGitResultsFiltered(tokens, false, args...)
|
||||
}
|
||||
|
||||
func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []core.Suggestion {
|
||||
cwd := core.GetCWD()
|
||||
func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []spec.Suggestion {
|
||||
cwd := spec.GetCWD()
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
@@ -78,7 +78,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co
|
||||
|
||||
seen := make(map[string]bool)
|
||||
lines := strings.Split(string(out), "\n")
|
||||
var results []core.Suggestion
|
||||
var results []spec.Suggestion
|
||||
|
||||
// find the subcommand by skipping global flags that take arguments
|
||||
subcommand := ""
|
||||
@@ -146,7 +146,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co
|
||||
}
|
||||
}
|
||||
|
||||
results = append(results, core.Suggestion{
|
||||
results = append(results, spec.Suggestion{
|
||||
Cmd: suggestionCmd,
|
||||
Desc: suggestionDesc,
|
||||
})
|
||||
@@ -166,7 +166,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co
|
||||
}
|
||||
|
||||
// GitBranchGenerator suggests git branches (local + remote, deduped)
|
||||
func GitBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
func GitBranchGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
// check if we are in "create" mode (-b or -B or -c)
|
||||
isCreateMode := false
|
||||
for _, t := range tokens {
|
||||
@@ -185,7 +185,7 @@ func GitBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
|
||||
// gitLocalBranchGenerator is like GitBranchGenerator but only local branches
|
||||
// used for push/pull where remote tracking branches cause duplicates
|
||||
func gitLocalBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
func gitLocalBranchGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
isCreateMode := false
|
||||
for _, t := range tokens {
|
||||
if t == "-b" || t == "-B" || t == "-c" || t == "-C" {
|
||||
@@ -199,7 +199,7 @@ func gitLocalBranchGenerator(tokens []string, _ string, _ string) []core.Suggest
|
||||
return getGitResultsFiltered(tokens, true, "branch", "-a", "--format=%(refname:short)")
|
||||
}
|
||||
|
||||
func GitPushPullGenerator(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
func GitPushPullGenerator(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
// count completed positional args (not flags, not the partial being typed)
|
||||
// tokens[0] = "git", tokens[1] = "push"/"pull", so start at 2
|
||||
// exclude tokens[len-1] because that's the partial being typed
|
||||
@@ -225,18 +225,18 @@ func GitPushPullGenerator(tokens []string, prefix string, partial string) []core
|
||||
}
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "git",
|
||||
Description: "version control",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--version", Description: "print version"},
|
||||
{Name: "--help", Description: "show help"},
|
||||
},
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{
|
||||
Name: "init",
|
||||
Description: "create empty repo",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--bare", Description: "create bare repo"},
|
||||
{Name: "-b", Description: "initial branch name"},
|
||||
},
|
||||
@@ -244,7 +244,7 @@ func init() {
|
||||
{
|
||||
Name: "clone",
|
||||
Description: "clone a repository",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--depth", Description: "shallow clone depth"},
|
||||
{Name: "--branch", Description: "specific branch"},
|
||||
{Name: "--bare", Description: "clone as bare"},
|
||||
@@ -253,7 +253,7 @@ func init() {
|
||||
{
|
||||
Name: "status",
|
||||
Description: "show working tree",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-s", Description: "short format"},
|
||||
{Name: "--porcelain", Description: "machine format"},
|
||||
},
|
||||
@@ -261,8 +261,8 @@ func init() {
|
||||
{
|
||||
Name: "add",
|
||||
Description: "stage changes",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-A", Description: "add all files"},
|
||||
{Name: "-p", Description: "interactive patch"},
|
||||
{Name: ".", Description: "add current dir"},
|
||||
@@ -271,7 +271,7 @@ func init() {
|
||||
{
|
||||
Name: "commit",
|
||||
Description: "record changes",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-m", Description: "commit message"},
|
||||
{Name: "-a", Description: "auto stage tracked"},
|
||||
{Name: "--amend", Description: "amend last commit"},
|
||||
@@ -282,7 +282,7 @@ func init() {
|
||||
Name: "push",
|
||||
Description: "update remote refs",
|
||||
Generator: GitPushPullGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-u", Description: "set upstream"},
|
||||
{Name: "--force", Description: "force push"},
|
||||
{Name: "--tags", Description: "push tags"},
|
||||
@@ -292,7 +292,7 @@ func init() {
|
||||
Name: "pull",
|
||||
Description: "fetch and merge",
|
||||
Generator: GitPushPullGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--rebase", Description: "rebase on pull"},
|
||||
},
|
||||
},
|
||||
@@ -300,7 +300,7 @@ func init() {
|
||||
Name: "fetch",
|
||||
Description: "download objects",
|
||||
Generator: GitRemoteGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--all", Description: "fetch all remotes"},
|
||||
{Name: "--prune", Description: "remove stale refs"},
|
||||
},
|
||||
@@ -308,17 +308,17 @@ func init() {
|
||||
{
|
||||
Name: "checkout",
|
||||
Description: "switch branches",
|
||||
Generator: func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
for _, t := range tokens {
|
||||
if t == "-b" || t == "-B" {
|
||||
return nil
|
||||
}
|
||||
}
|
||||
branches := GitBranchGenerator(tokens, prefix, partial)
|
||||
files := core.FileGenerator()(tokens, prefix, partial)
|
||||
files := spec.FileGenerator()(tokens, prefix, partial)
|
||||
return append(branches, files...)
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-b", Description: "create new branch"},
|
||||
},
|
||||
},
|
||||
@@ -326,7 +326,7 @@ func init() {
|
||||
Name: "switch",
|
||||
Description: "switch branches",
|
||||
Generator: GitBranchGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-c", Description: "create and switch"},
|
||||
},
|
||||
},
|
||||
@@ -334,7 +334,7 @@ func init() {
|
||||
Name: "branch",
|
||||
Description: "manage branches",
|
||||
Generator: GitBranchGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-d", Description: "delete branch"},
|
||||
{Name: "-D", Description: "force delete"},
|
||||
{Name: "-a", Description: "list all"},
|
||||
@@ -345,7 +345,7 @@ func init() {
|
||||
Name: "merge",
|
||||
Description: "join branches",
|
||||
Generator: GitBranchGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--no-ff", Description: "no fast forward"},
|
||||
{Name: "--squash", Description: "squash commits"},
|
||||
{Name: "--abort", Description: "abort merge"},
|
||||
@@ -355,7 +355,7 @@ func init() {
|
||||
Name: "rebase",
|
||||
Description: "reapply commits",
|
||||
Generator: GitBranchGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-i", Description: "interactive"},
|
||||
{Name: "--onto", Description: "rebase onto"},
|
||||
{Name: "--abort", Description: "abort rebase"},
|
||||
@@ -365,8 +365,8 @@ func init() {
|
||||
{
|
||||
Name: "log",
|
||||
Description: "show commit log",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "--oneline", Description: "compact format"},
|
||||
{Name: "--graph", Description: "show graph"},
|
||||
{Name: "-n", Description: "limit count"},
|
||||
@@ -375,8 +375,8 @@ func init() {
|
||||
{
|
||||
Name: "diff",
|
||||
Description: "show changes",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "--staged", Description: "staged changes"},
|
||||
{Name: "--stat", Description: "diffstat only"},
|
||||
{Name: "--", Description: "separate paths"},
|
||||
@@ -386,7 +386,7 @@ func init() {
|
||||
Name: "tag",
|
||||
Description: "manage tags",
|
||||
Generator: GitTagGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "annotated tag"},
|
||||
{Name: "-d", Description: "delete tag"},
|
||||
{Name: "-l", Description: "list tags"},
|
||||
@@ -397,12 +397,12 @@ func init() {
|
||||
{
|
||||
Name: "show",
|
||||
Description: "show object",
|
||||
Generator: func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
tags := GitTagGenerator(tokens, prefix, partial)
|
||||
commits := GitCommitGenerator(tokens, prefix, partial)
|
||||
return append(tags, commits...)
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--stat", Description: "diffstat only"},
|
||||
{Name: "--name-only", Description: "filenames only"},
|
||||
},
|
||||
@@ -411,7 +411,7 @@ func init() {
|
||||
Name: "revert",
|
||||
Description: "revert a commit",
|
||||
Generator: GitCommitGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--no-commit", Description: "no auto commit"},
|
||||
{Name: "--abort", Description: "abort revert"},
|
||||
{Name: "--continue", Description: "continue revert"},
|
||||
@@ -420,12 +420,12 @@ func init() {
|
||||
{
|
||||
Name: "reset",
|
||||
Description: "reset HEAD",
|
||||
Generator: func(tokens []string, prefix string, partial string) []core.Suggestion {
|
||||
Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion {
|
||||
branches := GitBranchGenerator(tokens, prefix, partial)
|
||||
files := core.FileGenerator()(tokens, prefix, partial)
|
||||
files := spec.FileGenerator()(tokens, prefix, partial)
|
||||
return append(branches, files...)
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--hard", Description: "discard changes"},
|
||||
{Name: "--soft", Description: "keep staged"},
|
||||
{Name: "--mixed", Description: "unstage changes"},
|
||||
@@ -434,8 +434,8 @@ func init() {
|
||||
{
|
||||
Name: "restore",
|
||||
Description: "restore working tree files",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-s", Description: "source tree"},
|
||||
{Name: "-W", Description: "working tree"},
|
||||
},
|
||||
@@ -443,8 +443,8 @@ func init() {
|
||||
{
|
||||
Name: "rm",
|
||||
Description: "remove files",
|
||||
Generator: core.FileGenerator(),
|
||||
Options: []core.Option{
|
||||
Generator: spec.FileGenerator(),
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "force"},
|
||||
{Name: "-r", Description: "recursive"},
|
||||
{Name: "--cached", Description: "unstage only"},
|
||||
@@ -453,8 +453,8 @@ func init() {
|
||||
{
|
||||
Name: "stash",
|
||||
Description: "stash changes",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "pop", Description: "apply and drop", Generator: GitStashGenerator, Options: []core.Option{{Name: "--index", Description: "try to reinstate index"}}},
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "pop", Description: "apply and drop", Generator: GitStashGenerator, Options: []spec.Option{{Name: "--index", Description: "try to reinstate index"}}},
|
||||
{Name: "apply", Description: "apply stash", Generator: GitStashGenerator},
|
||||
{Name: "drop", Description: "remove stash", Generator: GitStashGenerator},
|
||||
{Name: "list", Description: "list stashes"},
|
||||
@@ -466,8 +466,8 @@ func init() {
|
||||
{
|
||||
Name: "remote",
|
||||
Description: "manage remotes",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "add", Description: "add remote", Options: []core.Option{{Name: "-f", Description: "fetch immediately"}}},
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "add", Description: "add remote", Options: []spec.Option{{Name: "-f", Description: "fetch immediately"}}},
|
||||
{Name: "remove", Description: "remove remote", Generator: GitRemoteGenerator},
|
||||
{Name: "rename", Description: "rename remote", Generator: GitRemoteGenerator},
|
||||
{Name: "set-url", Description: "change remote url", Generator: GitRemoteGenerator},
|
||||
@@ -478,7 +478,7 @@ func init() {
|
||||
Name: "cherry-pick",
|
||||
Description: "apply commit",
|
||||
Generator: GitCommitGenerator,
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--no-commit", Description: "no auto commit"},
|
||||
{Name: "--abort", Description: "abort pick"},
|
||||
{Name: "--continue", Description: "continue pick"},
|
||||
@@ -487,8 +487,8 @@ func init() {
|
||||
{
|
||||
Name: "worktree",
|
||||
Description: "manage worktrees",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "add", Description: "add new worktree", Generator: core.FileGenerator("/")},
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "add", Description: "add new worktree", Generator: spec.FileGenerator("/")},
|
||||
{Name: "list", Description: "list worktrees"},
|
||||
{Name: "remove", Description: "remove worktree"},
|
||||
{Name: "prune", Description: "prune stale worktrees"},
|
||||
@@ -497,10 +497,10 @@ func init() {
|
||||
{
|
||||
Name: "submodule",
|
||||
Description: "manage submodules",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "add", Description: "add submodule"},
|
||||
{Name: "init", Description: "init submodule config"},
|
||||
{Name: "update", Description: "update submodules", Options: []core.Option{{Name: "--init", Description: "init if needed"}, {Name: "--recursive", Description: "recursive update"}}},
|
||||
{Name: "update", Description: "update submodules", Options: []spec.Option{{Name: "--init", Description: "init if needed"}, {Name: "--recursive", Description: "recursive update"}}},
|
||||
{Name: "status", Description: "show submodule status"},
|
||||
{Name: "foreach", Description: "run command in each submodule"},
|
||||
},
|
||||
@@ -508,7 +508,7 @@ func init() {
|
||||
{
|
||||
Name: "bisect",
|
||||
Description: "binary search bug",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "start", Description: "start bisect"},
|
||||
{Name: "good", Description: "mark good"},
|
||||
{Name: "bad", Description: "mark bad"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "git-cliff",
|
||||
Description: "Increases the logging verbosity",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--verbose", Description: "Increases the logging verbosity"},
|
||||
{Name: "--init", Description: "Writes the default configuration file to cliff.toml"},
|
||||
{Name: "--latest", Description: "Processes the commits starting from the latest tag"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "git-flow",
|
||||
Description: "Git extensions to provide high-level repository operations for Vincent Driessen's branching model",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "Initialize a new git repo with support for the branching model"},
|
||||
{Name: "feature", Description: "List all feature branches"},
|
||||
{Name: "start", Description: "Create a new feature branch"},
|
||||
@@ -21,7 +21,7 @@ func init() {
|
||||
{Name: "hotfix", Description: "List all hotfix branches"},
|
||||
{Name: "support", Description: "List all support branches"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-d", Description: "Use default branch naming conventions"},
|
||||
{Name: "-f", Description: "Force setting of gitflow branches, even if already configured"},
|
||||
},
|
||||
|
||||
@@ -1,18 +1,18 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "git-profile",
|
||||
Description: "Use profile",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "use", Description: "Use a profile"},
|
||||
{Name: "profile", Description: "Profile you want to apply in this repository"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Help for git-profile script"},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "git-quick-stats",
|
||||
Description: "Show help for git-quick-stats",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for git-quick-stats"},
|
||||
{Name: "--suggest-reviewers", Description: "Show the best people to contact to review code"},
|
||||
{Name: "--detailed-git-stats", Description: "Give a detailed list of git stats"},
|
||||
|
||||
@@ -1,19 +1,19 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "github",
|
||||
Description: "Open a git repository in GitHub Desktop",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "clone", Description: "Clone a repository"},
|
||||
{Name: "open", Description: "Open a git repository in GitHub Desktop"},
|
||||
{Name: "help", Description: "Show the help page for a command"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show the help page for a command"},
|
||||
{Name: "--branch", Description: "The branch to checkout after cloning"},
|
||||
},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package git
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "svn",
|
||||
Description: "Specify a username ARG",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "help", Description: "Show help for svn"},
|
||||
{Name: "subcommand", Description: "Help about specific subcommand"},
|
||||
{Name: "status", Description: "Show the working tree status"},
|
||||
@@ -17,7 +17,7 @@ func init() {
|
||||
{Name: "repository", Description: "The repository you want to checkout"},
|
||||
{Name: "commit", Description: "Commit to a repository"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--password", Description: "Specify a password ARG"},
|
||||
{Name: "--password-from-stdin", Description: "Read password from stdin"},
|
||||
{Name: "--no-auth-cache", Description: "Do not cache authentication tokens"},
|
||||
|
||||
+40
-40
@@ -1,11 +1,11 @@
|
||||
package golang
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
globalBuildOptions := []core.Option{
|
||||
globalBuildOptions := []spec.Option{
|
||||
{Name: "-v", Description: "print package names"},
|
||||
{Name: "-n", Description: "print commands but do not run"},
|
||||
{Name: "-x", Description: "print commands as they run"},
|
||||
@@ -22,7 +22,7 @@ func init() {
|
||||
{Name: "-a", Description: "force rebuilding of up-to-date packages"},
|
||||
}
|
||||
|
||||
buildModeSubcommands := []core.Subcommand{
|
||||
buildModeSubcommands := []spec.Subcommand{
|
||||
{Name: "archive", Description: "build non-main packages into .a files"},
|
||||
{Name: "c-archive", Description: "build main package into C archive"},
|
||||
{Name: "c-shared", Description: "build main package into C shared library"},
|
||||
@@ -32,21 +32,21 @@ func init() {
|
||||
{Name: "shared", Description: "combine packages into single shared library"},
|
||||
}
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "go",
|
||||
Description: "tool for managing Go source code",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{
|
||||
Name: "build",
|
||||
Description: "compile packages and dependencies",
|
||||
MaxArgs: 1,
|
||||
Generator: core.FileGenerator(".go"),
|
||||
Generator: spec.FileGenerator(".go"),
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: ".", Description: "current package"},
|
||||
core.Option{Name: "./...", Description: "all packages"},
|
||||
core.Option{Name: "-o", Description: "output file or directory"},
|
||||
core.Option{Name: "-i", Description: "install dependency packages"},
|
||||
core.Option{Name: "-buildmode", Description: "build mode to use"},
|
||||
spec.Option{Name: ".", Description: "current package"},
|
||||
spec.Option{Name: "./...", Description: "all packages"},
|
||||
spec.Option{Name: "-o", Description: "output file or directory"},
|
||||
spec.Option{Name: "-i", Description: "install dependency packages"},
|
||||
spec.Option{Name: "-buildmode", Description: "build mode to use"},
|
||||
),
|
||||
Subcommands: buildModeSubcommands,
|
||||
},
|
||||
@@ -54,32 +54,32 @@ func init() {
|
||||
Name: "run",
|
||||
Description: "compile and run Go program",
|
||||
MaxArgs: 1,
|
||||
Generator: core.FileGenerator(".go"),
|
||||
Generator: spec.FileGenerator(".go"),
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: ".", Description: "current package"},
|
||||
core.Option{Name: "-exec", Description: "invoke binary using xprog"},
|
||||
spec.Option{Name: ".", Description: "current package"},
|
||||
spec.Option{Name: "-exec", Description: "invoke binary using xprog"},
|
||||
),
|
||||
},
|
||||
{
|
||||
Name: "test",
|
||||
Description: "test packages",
|
||||
MaxArgs: 1,
|
||||
Generator: core.FileGenerator(".go"),
|
||||
Generator: spec.FileGenerator(".go"),
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: ".", Description: "current package"},
|
||||
core.Option{Name: "./...", Description: "all packages"},
|
||||
core.Option{Name: "-c", Description: "compile test binary but do not run"},
|
||||
core.Option{Name: "-i", Description: "install test dependencies"},
|
||||
core.Option{Name: "-json", Description: "convert output to JSON"},
|
||||
core.Option{Name: "-bench", Description: "run benchmarks"},
|
||||
core.Option{Name: "-run", Description: "run specific test regex"},
|
||||
core.Option{Name: "-cover", Description: "enable coverage report"},
|
||||
spec.Option{Name: ".", Description: "current package"},
|
||||
spec.Option{Name: "./...", Description: "all packages"},
|
||||
spec.Option{Name: "-c", Description: "compile test binary but do not run"},
|
||||
spec.Option{Name: "-i", Description: "install test dependencies"},
|
||||
spec.Option{Name: "-json", Description: "convert output to JSON"},
|
||||
spec.Option{Name: "-bench", Description: "run benchmarks"},
|
||||
spec.Option{Name: "-run", Description: "run specific test regex"},
|
||||
spec.Option{Name: "-cover", Description: "enable coverage report"},
|
||||
),
|
||||
},
|
||||
{
|
||||
Name: "mod",
|
||||
Description: "module maintenance",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "initialize new module"},
|
||||
{Name: "tidy", Description: "add missing and remove unused modules"},
|
||||
{Name: "download", Description: "download modules to local cache"},
|
||||
@@ -94,9 +94,9 @@ func init() {
|
||||
Name: "get",
|
||||
Description: "add dependencies to current module and install them",
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: "-u", Description: "update to newer minor/patch releases"},
|
||||
core.Option{Name: "-t", Description: "download modules needed for tests"},
|
||||
core.Option{Name: "-d", Description: "only download, do not install"},
|
||||
spec.Option{Name: "-u", Description: "update to newer minor/patch releases"},
|
||||
spec.Option{Name: "-t", Description: "download modules needed for tests"},
|
||||
spec.Option{Name: "-d", Description: "only download, do not install"},
|
||||
),
|
||||
},
|
||||
{
|
||||
@@ -108,16 +108,16 @@ func init() {
|
||||
Name: "list",
|
||||
Description: "list packages or modules",
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: "-m", Description: "list modules instead of packages"},
|
||||
core.Option{Name: "-u", Description: "add upgrade information"},
|
||||
core.Option{Name: "-json", Description: "print in JSON format"},
|
||||
core.Option{Name: "-f", Description: "specify alternate format"},
|
||||
spec.Option{Name: "-m", Description: "list modules instead of packages"},
|
||||
spec.Option{Name: "-u", Description: "add upgrade information"},
|
||||
spec.Option{Name: "-json", Description: "print in JSON format"},
|
||||
spec.Option{Name: "-f", Description: "specify alternate format"},
|
||||
),
|
||||
},
|
||||
{
|
||||
Name: "fmt",
|
||||
Description: "gofmt (reformat) package sources",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-n", Description: "print commands that would be executed"},
|
||||
{Name: "-x", Description: "print commands as they are executed"},
|
||||
},
|
||||
@@ -130,7 +130,7 @@ func init() {
|
||||
{
|
||||
Name: "env",
|
||||
Description: "print Go environment information",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-json", Description: "print environment in JSON format"},
|
||||
{Name: "-u", Description: "unset named environment variables"},
|
||||
{Name: "-w", Description: "change default settings of environment variables"},
|
||||
@@ -139,7 +139,7 @@ func init() {
|
||||
{
|
||||
Name: "version",
|
||||
Description: "print Go version",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-m", Description: "print embedded module version info"},
|
||||
{Name: "-v", Description: "report unrecognized files"},
|
||||
},
|
||||
@@ -148,22 +148,22 @@ func init() {
|
||||
Name: "clean",
|
||||
Description: "remove object files and cached files",
|
||||
Options: append(globalBuildOptions,
|
||||
core.Option{Name: "-i", Description: "remove installed archive or binary"},
|
||||
core.Option{Name: "-cache", Description: "remove entire go build cache"},
|
||||
core.Option{Name: "-modcache", Description: "remove entire module cache"},
|
||||
spec.Option{Name: "-i", Description: "remove installed archive or binary"},
|
||||
spec.Option{Name: "-cache", Description: "remove entire go build cache"},
|
||||
spec.Option{Name: "-modcache", Description: "remove entire module cache"},
|
||||
),
|
||||
},
|
||||
{
|
||||
Name: "tool",
|
||||
Description: "run specified go tool",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-n", Description: "print command but do not execute"},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "work",
|
||||
Description: "workspace maintenance",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "initialize workspace file"},
|
||||
{Name: "edit", Description: "edit go.work from tools or scripts"},
|
||||
{Name: "sync", Description: "sync workspace build list to modules"},
|
||||
@@ -173,7 +173,7 @@ func init() {
|
||||
{
|
||||
Name: "doc",
|
||||
Description: "show documentation for package or symbol",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-all", Description: "show all documentation"},
|
||||
{Name: "-cmd", Description: "treat package main like regular package"},
|
||||
{Name: "-src", Description: "show full source code"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package golang
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "goctl",
|
||||
Description: "A cli tool to generate go-zero code",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.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"},
|
||||
@@ -50,7 +50,7 @@ func init() {
|
||||
{Name: "upgrade", Description: "Upgrade goctl to latest version"},
|
||||
{Name: "help", Description: "Help about any command"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--api", Description: "The api file"},
|
||||
{Name: "--dir", Description: "The target dir"},
|
||||
{Name: "--hostname", Description: "Hostname of the server"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package golang
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "goreleaser",
|
||||
Description: "Deliver Go binaries as fast and easily as possible",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.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"},
|
||||
@@ -22,7 +22,7 @@ func init() {
|
||||
{Name: "r", Description: "Releases the current project"},
|
||||
{Name: "help", Description: "Help about any command"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.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"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "asar",
|
||||
Description: "A simple extensive tar-like archive format with indexing",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "pack", Description: "Create asar archive"},
|
||||
{Name: "directory", Description: "The directory you want to archive"},
|
||||
{Name: "output", Description: "The name of the output file"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "filename", Description: "The name of the file you want to extract"},
|
||||
{Name: "extract", Description: "Extract archive"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for asar"},
|
||||
{Name: "--V", Description: "Output the version number"},
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "astro",
|
||||
Description: "Add an integration",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "add", Description: "Add an integration"},
|
||||
{Name: "build", Description: "Build your project and write it to disk"},
|
||||
{Name: "check", Description: "Check your project for errors"},
|
||||
@@ -21,7 +21,7 @@ func init() {
|
||||
{Name: "disable", Description: "Disable anonymous data collection"},
|
||||
{Name: "reset", Description: "Reset anonymous data collection settings"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--yes", Description: "Accept all prompts"},
|
||||
{Name: "--drafts", Description: "Include Markdown draft pages in the build"},
|
||||
{Name: "--watch", Description: "Watch Astro files for changes and re-run checks"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "babel",
|
||||
Description: "A comma-separated list of preset names",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "A comma-separated list of preset names"},
|
||||
{Name: "--plugins", Description: "A comma-separated list of plugin names"},
|
||||
{Name: "--config-file", Description: "Path to a .babelrc file to use"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "blitz",
|
||||
Description: "Show help for command",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "build", Description: "Creates a production build"},
|
||||
{Name: "codegen", Description: "Generates Routes Manifest"},
|
||||
{Name: "console", Description: "Run the Blitz console REPL"},
|
||||
@@ -28,7 +28,7 @@ func init() {
|
||||
{Name: "autocomplete", Description: "Display autocomplete installation instructions"},
|
||||
{Name: "shell", Description: "Shell type"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for command"},
|
||||
{Name: "-p", Description: "Set port number"},
|
||||
{Name: "-H", Description: "Set server hostname"},
|
||||
|
||||
@@ -1,21 +1,21 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "browser-sync",
|
||||
Description: "Keep multiple browsers & devices in sync when building websites",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "start", Description: "Start Browsersync"},
|
||||
{Name: "init", Description: "Create a configuration file"},
|
||||
{Name: "reload", Description: "Send a reload event over HTTP protocol"},
|
||||
{Name: "recipe", Description: "Generate the files for a recipe"},
|
||||
{Name: "ls", Description: "List recipes"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--version", Description: "Show version number"},
|
||||
{Name: "--help", Description: "Show help"},
|
||||
{Name: "-s", Description: "Run a Local server (uses your cwd as the web root)"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "build-storybook",
|
||||
Description: "Storybook build CLI tools",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-o", Description: "Directory where to store built files"},
|
||||
{Name: "-w", Description: "Enables watch mode"},
|
||||
{Name: "--loglevel", Description: "Controls level of logging during build"},
|
||||
|
||||
+17
-17
@@ -1,21 +1,21 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "bun",
|
||||
Description: "bun js runtime",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "install", Description: "install packages", Options: []core.Option{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "install", Description: "install packages", Options: []spec.Option{
|
||||
{Name: "--frozen-lockfile", Description: "no lockfile update"},
|
||||
{Name: "--production", Description: "production only"},
|
||||
{Name: "--no-save", Description: "don't update package.json"},
|
||||
{Name: "--dry-run", Description: "print what would be installed"},
|
||||
}},
|
||||
{Name: "add", Description: "add package", Options: []core.Option{
|
||||
{Name: "add", Description: "add package", Options: []spec.Option{
|
||||
{Name: "-d", Description: "dev dependency"},
|
||||
{Name: "--dev", Description: "dev dependency (long form)"},
|
||||
{Name: "--optional", Description: "optional dependency"},
|
||||
@@ -24,17 +24,17 @@ func init() {
|
||||
{Name: "--exact", Description: "exact version"},
|
||||
{Name: "--no-save", Description: "don't update package.json"},
|
||||
}},
|
||||
{Name: "remove", Description: "remove package", Options: []core.Option{
|
||||
{Name: "remove", Description: "remove package", Options: []spec.Option{
|
||||
{Name: "-g", Description: "remove global package"},
|
||||
}},
|
||||
{Name: "run", Description: "run script", Generator: NpmScriptGenerator, Options: []core.Option{
|
||||
{Name: "run", Description: "run script", Generator: NpmScriptGenerator, Options: []spec.Option{
|
||||
{Name: "--silent", Description: "suppress output"},
|
||||
{Name: "--bun", Description: "force bun runtime"},
|
||||
{Name: "--watch", Description: "watch mode"},
|
||||
{Name: "--hot", Description: "hot reload"},
|
||||
{Name: "--smol", Description: "reduce memory usage"},
|
||||
}},
|
||||
{Name: "build", Description: "bundle files", Generator: core.FileGenerator(".ts", ".tsx", ".js", ".jsx"), Options: []core.Option{
|
||||
{Name: "build", Description: "bundle files", Generator: spec.FileGenerator(".ts", ".tsx", ".js", ".jsx"), Options: []spec.Option{
|
||||
{Name: "--outdir", Description: "output directory"},
|
||||
{Name: "--outfile", Description: "output file"},
|
||||
{Name: "--minify", Description: "enable all minification"},
|
||||
@@ -54,7 +54,7 @@ func init() {
|
||||
{Name: "--loader", Description: "set file loader"},
|
||||
{Name: "--public-path", Description: "prefix for public assets"},
|
||||
}},
|
||||
{Name: "test", Description: "run tests", Options: []core.Option{
|
||||
{Name: "test", Description: "run tests", Options: []spec.Option{
|
||||
{Name: "--watch", Description: "watch mode"},
|
||||
{Name: "-t", Description: "filter by test name"},
|
||||
{Name: "--coverage", Description: "collect coverage"},
|
||||
@@ -65,20 +65,20 @@ func init() {
|
||||
{Name: "--todo", Description: "show todo tests"},
|
||||
{Name: "--reporter", Description: "test reporter (default/junit/tap)"},
|
||||
}},
|
||||
{Name: "x", Description: "execute package (bunx)", Options: []core.Option{
|
||||
{Name: "x", Description: "execute package (bunx)", Options: []spec.Option{
|
||||
{Name: "--bun", Description: "force bun runtime"},
|
||||
{Name: "--silent", Description: "suppress output"},
|
||||
}},
|
||||
{Name: "outdated", Description: "check outdated packages"},
|
||||
{Name: "patch", Description: "patch a package", Options: []core.Option{
|
||||
{Name: "patch", Description: "patch a package", Options: []spec.Option{
|
||||
{Name: "--commit", Description: "commit the patch"},
|
||||
}},
|
||||
{Name: "publish", Description: "publish package to npm", Options: []core.Option{
|
||||
{Name: "publish", Description: "publish package to npm", Options: []spec.Option{
|
||||
{Name: "--dry-run", Description: "simulate publish"},
|
||||
{Name: "--tag", Description: "dist-tag"},
|
||||
{Name: "--access", Description: "public or restricted"},
|
||||
}},
|
||||
{Name: "init", Description: "create new project", Options: []core.Option{
|
||||
{Name: "init", Description: "create new project", Options: []spec.Option{
|
||||
{Name: "-y", Description: "skip prompts"},
|
||||
}},
|
||||
{Name: "create", Description: "create from template"},
|
||||
@@ -86,7 +86,7 @@ func init() {
|
||||
{Name: "upgrade", Description: "upgrade bun"},
|
||||
{Name: "link", Description: "link package"},
|
||||
{Name: "unlink", Description: "unlink package"},
|
||||
{Name: "pm", Description: "package manager helpers", Subcommands: []core.Subcommand{
|
||||
{Name: "pm", Description: "package manager helpers", Subcommands: []spec.Subcommand{
|
||||
{Name: "cache", Description: "show cache path"},
|
||||
{Name: "ls", Description: "list packages"},
|
||||
{Name: "hash", Description: "print lockfile hash"},
|
||||
@@ -95,7 +95,7 @@ func init() {
|
||||
{Name: "untrusted", Description: "show untrusted packages"},
|
||||
}},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--watch", Description: "watch for changes"},
|
||||
{Name: "--hot", Description: "hot module reload"},
|
||||
{Name: "--smol", Description: "reduce memory usage"},
|
||||
@@ -105,10 +105,10 @@ func init() {
|
||||
},
|
||||
})
|
||||
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "bunx",
|
||||
Description: "execute package (bun x)",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--bun", Description: "force bun runtime"},
|
||||
{Name: "--silent", Description: "suppress output"},
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "cordova",
|
||||
Description: "Print out the version of your cordova-cli install",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "create", Description: "Create a project"},
|
||||
{Name: "help", Description: "Get help for a command"},
|
||||
{Name: "telemetry", Description: "Turn telemetry collection on or off"},
|
||||
@@ -35,7 +35,7 @@ func init() {
|
||||
{Name: "serve", Description: "Run project with a local webserver (including prepare)"},
|
||||
{Name: "port", Description: "Port to use for local web server"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-d", Description: "Print out the version of your cordova-cli install"},
|
||||
{Name: "--no-update-notifier", Description: "Will disable updates check"},
|
||||
{Name: "--nohooks", Description: "Suppress executing hooks (taking RegExp hook patterns as parameters)"},
|
||||
|
||||
@@ -1,17 +1,17 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-completion-spec",
|
||||
Description: "Setup fig folder and create spec with the given name",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "help", Description: "Display help for command"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--here", Description: "Set if the spec should be created in the current folder"},
|
||||
{Name: "-h", Description: "Display help for command"},
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-next-app",
|
||||
Description: "Output the version number",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-V", Description: "Output the version number"},
|
||||
{Name: "--ts", Description: "Initialize as a TypeScript project"},
|
||||
{Name: "--use-npm", Description: "Explicitly tell the CLI to bootstrap the app using npm"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-nx-workspace",
|
||||
Description: "The name of the workspace",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--name", Description: "Workspace name (e.g., org name)"},
|
||||
{Name: "--preset", Description: "Empty [an empty workspace with a layout that works best for building apps]"},
|
||||
{Name: "--appName", Description: "The name of the application created by some presets"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-react-app",
|
||||
Description: "Creates a new React project",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--template", Description: "Use npm to install dependencies (default when Yarn is not installed)"},
|
||||
{Name: "--use-pnp", Description: "Use Yarn Plug'n'Play to create the app"},
|
||||
{Name: "--scripts-version", Description: "Print additional logs"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-react-native-app",
|
||||
Description: "Creates a new React Native project",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--template", Description: "The path inside of a GitHub repo where the example lives"},
|
||||
{Name: "--yes", Description: "Use the default options for creating a project"},
|
||||
{Name: "--no-install", Description: "Skip installing npm packages or CocoaPods"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-redwood-app",
|
||||
Description: "Name of your Redwood project",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help"},
|
||||
{Name: "--typescript", Description: "Generate a TypeScript project"},
|
||||
{Name: "--overwrite", Description: "Create even if target directory isn't empty"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-remix",
|
||||
Description: "Display help for command",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-h", Description: "Display help for command"},
|
||||
{Name: "-v", Description: "Display version for command"},
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-t3-app",
|
||||
Description: "The name of the application, as well as the name of the directory to create",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--noGit", Description: "Boolean value if we're running in CI (default: false)"},
|
||||
{Name: "--tailwind", Description: "Install Tailwind CSS"},
|
||||
{Name: "--nextAuth", Description: "Install NextAuth.js"},
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-video",
|
||||
Description: "CLI used to create remotion video project",
|
||||
})
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-vite",
|
||||
Description: "Create a new project powered by Vite",
|
||||
})
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "create-web3-frontend",
|
||||
Description: "Quickly create a Next.js project with wagmi and TailwindCSS ready to go",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--ts", Description: "Initialize as a TypeScript project"},
|
||||
{Name: "--use-npm", Description: "Explicitly tell the CLI to bootstrap the app using npm"},
|
||||
{Name: "--use-pnpm", Description: "Explicitly tell the CLI to bootstrap the app using pnpm"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "deno",
|
||||
Description: "A modern JavaScript and TypeScript runtime",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "bench", Description: "Run benchmarks"},
|
||||
{Name: "bundle", Description: "Bundle module and dependencies into single file"},
|
||||
{Name: "cache", Description: "Cache the dependencies"},
|
||||
@@ -34,7 +34,7 @@ func init() {
|
||||
{Name: "vendor", Description: "Vendor remote modules into a local directory"},
|
||||
{Name: "help", Description: "Print this message or the help of the given subcommand(s)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--import-map", Description: "Load import map file"},
|
||||
{Name: "-c", Description: "Specify the configuration file"},
|
||||
{Name: "--no-check", Description: "Skip type-checking modules"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "dotenv",
|
||||
Description: "Loads environment variables from .env",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-f", Description: "List of env files to parse"},
|
||||
{Name: "-h", Description: "Display help"},
|
||||
{Name: "-v", Description: "Show version"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "electron",
|
||||
Description: "Build cross platform desktop apps with JavaScript, HTML and CSS",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-i", Description: "Open a REPL to the main process"},
|
||||
{Name: "-r", Description: "Module to preload"},
|
||||
{Name: "-v", Description: "Print the version"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "elm",
|
||||
Description: "Fig spec for the Elm language cli",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "reactor", Description: "Start an Elm development server"},
|
||||
{Name: "port", Description: "The port number"},
|
||||
{Name: "package", Description: "The name of the package to install"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "bump", Description: "Bump the version of your package"},
|
||||
{Name: "diff", Description: "See what changed between versions of a package"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for elm init"},
|
||||
{Name: "--no-colors", Description: "Turn off colors in the repl"},
|
||||
{Name: "--interpreter", Description: "Path to an alternate JS interpreter, such as Node or Deno"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "elm-format",
|
||||
Description: "Format your code in the Elm idiomatic way",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for elm-format"},
|
||||
{Name: "--output", Description: "Write output to FILE instead of overwriting the given source file"},
|
||||
{Name: "--yes", Description: "Reply 'yes' to all automated prompts"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "elm-json",
|
||||
Description: "Deal with your elm.json",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "help", Description: "Prints help information or the help of the given subcommand(s)"},
|
||||
{Name: "install", Description: "Install a package"},
|
||||
{Name: "PACKAGE", Description: "Package to install, e.g. elm/core or elm/core@1.0.2 or elm/core@1"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "upgrade", Description: "Bring your dependencies up to date"},
|
||||
{Name: "INPUT", Description: "The elm.json file to upgrade [default: elm.json]"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Prints help information"},
|
||||
{Name: "--test", Description: "Install as a test-dependency"},
|
||||
{Name: "--version", Description: "Prints version information"},
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "elm-review",
|
||||
Description: "Prints a single JSON object",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "Initialize Elm Review in this directory"},
|
||||
{Name: "suppress", Description: "Generate suppression files for rules that report many errors"},
|
||||
{Name: "new-package", Description: "Creates an new project aimed to contain rules and to be published later"},
|
||||
{Name: "new-rule", Description: "Adds a new rule to your review configuration or review package"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help for elm-review init"},
|
||||
{Name: "--config", Description: "Specify the path to the elm compiler"},
|
||||
{Name: "--check-after-tests", Description: "Checks whether there are uncommitted suppression files"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "esbuild",
|
||||
Description: "An extremely fast JavaScript bundler",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--bundle", Description: "Bundle all dependencies into the output files"},
|
||||
{Name: "--define", Description: "Replace variable names with a literal value, eg. --define:DEBUG=true"},
|
||||
{Name: "--external", Description: "Exclude modules from the build"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "eslint",
|
||||
Description: "Pluggable JavaScript linter",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--no-eslintrc", Description: "Disable use of configuration from .eslintrc.*"},
|
||||
{Name: "-c", Description: "Use this configuration, overriding .eslintrc.* config options if present"},
|
||||
{Name: "--env", Description: "Specify environments"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "expo",
|
||||
Description: "Tools for creating, running, and deploying Universal Expo and React Native apps",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-h", Description: "Output usage information"},
|
||||
{Name: "-V", Description: "Output the version number"},
|
||||
{Name: "-u", Description: "Username"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "expo-cli",
|
||||
Description: "Tools for creating, running, and deploying Universal Expo and React Native apps",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-h", Description: "Output usage information"},
|
||||
{Name: "-V", Description: "Output the version number"},
|
||||
{Name: "-u", Description: "Username"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ganache-cli",
|
||||
Description: "Fast Ethereum RPC client",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-a", Description: "Specify the number of accounts to generate at startup"},
|
||||
{Name: "-e", Description: "Amount of ether to assign each test account. Default is 100"},
|
||||
{Name: "-b", Description: "Generate deterministic addresses based on a pre-defined mnemonic"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "gatsby",
|
||||
Description: "Set host. Defaults to localhost",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "develop", Description: "Start the Gatsby development server"},
|
||||
{Name: "build", Description: "Compile your application and make it ready for deployment"},
|
||||
{Name: "serve", Description: "Serve the production build of your site for testing"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "docs", Description: "Documentation about using and creating plugins"},
|
||||
{Name: "repl", Description: "Gatsby will prompt you to type in commands and explore"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-H", Description: "Set host. Defaults to localhost"},
|
||||
{Name: "-p", Description: "Set port. Defaults to env.PORT or 8000"},
|
||||
{Name: "-o", Description: "Open the site in your (default) browser for you"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "hardhat",
|
||||
Description: "Ethereum development environment",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "accounts", Description: "Prints the list of accounts"},
|
||||
{Name: "check", Description: "Check whatever you need"},
|
||||
{Name: "clean", Description: "Clears the cache and deletes all artifacts"},
|
||||
@@ -20,7 +20,7 @@ func init() {
|
||||
{Name: "run", Description: "Runs a user-defined script after compiling the project"},
|
||||
{Name: "test", Description: "Runs mocha tests"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--emoji", Description: "Use emoji in messages"},
|
||||
{Name: "--max-memory", Description: "The maximum amount of memory that Hardhat can use"},
|
||||
{Name: "--help", Description: "Shows the help text or task's help if name is provided"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ionic",
|
||||
Description: "Target engine (e.g. browser, cordova)",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "completion", Description: "Enables tab-completion for Ionic CLI commands"},
|
||||
{Name: "id", Description: "The Appflow ID of the app to link (e.g. a1b2c3d4)"},
|
||||
{Name: "email", Description: "Your email address"},
|
||||
@@ -45,7 +45,7 @@ func init() {
|
||||
{Name: "action", Description: "Add, remove, or update a platform; ls, check, or save all project platforms"},
|
||||
{Name: "plugin", Description: "The name of the plugin (corresponds to add and remove)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--engine", Description: "Target engine (e.g. browser, cordova)"},
|
||||
{Name: "--platform", Description: "Target platform on chosen engine (e.g. ios, android)"},
|
||||
{Name: "--prod", Description: "Flag to use the production configuration"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "jest",
|
||||
Description: "A delightful JavaScript Testing Framework with a focus on simplicity",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--bail", Description: "Whether to use the cache"},
|
||||
{Name: "--no-cache", Description: "Whether to use the cache"},
|
||||
{Name: "--changedFilesWithAncestor", Description: "Runs tests related to the changes since the provided branch or commit hash"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "lerna",
|
||||
Description: "Branch",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "*", Description: "Select all packages"},
|
||||
{Name: "changed", Description: "Check which packages have changed since the last release"},
|
||||
{Name: "run", Description: "Run an npm script in each package that contains that script"},
|
||||
@@ -20,7 +20,7 @@ func init() {
|
||||
{Name: "clean", Description: "Remove the node_modules directory from all packages"},
|
||||
{Name: "create", Description: "Create a new lerna-managed package"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--npm-client", Description: "The executable to run the script with"},
|
||||
{Name: "--concurrency", Description: "Set a max buffer length for each underlying process call"},
|
||||
{Name: "--no-progress", Description: "Disable progress bars. This is always the case in a CI environment"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "meteor",
|
||||
Description: "Run the meteor command-line tool",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "help", Description: "Get help on meteor command line usage"},
|
||||
{Name: "command", Description: "Built-in command"},
|
||||
{Name: "list", Description: "Lists the packages that you have explicitly added to your project"},
|
||||
@@ -32,7 +32,7 @@ func init() {
|
||||
{Name: "members", Description: "Manage members of an organization"},
|
||||
{Name: "publish-for-arch", Description: "Publish a package for the same architecture that you are currently on"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--port", Description: "Port to listen on (instead of the default 3000)"},
|
||||
{Name: "--inspect", Description: "Simulate production mode. Minify and bundle CSS and JS files"},
|
||||
{Name: "--raw-logs", Description: "Run without parsing logs from stdout and stderr"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ncu",
|
||||
Description: "Clear the default cache, or the cache file specified by --cacheFile",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--cache", Description: "Clear the default cache, or the cache file specified by --cacheFile"},
|
||||
{Name: "--cacheExpiration", Description: "Cache expiration in minutes. Only works with --cache. (default: 10)"},
|
||||
{Name: "--cacheFile", Description: "Force color in terminal"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "nest",
|
||||
Description: "Report actions that would be taken without writing out results",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "new", Description: "Creates a new nest project"},
|
||||
{Name: "project", Description: "The name of the project"},
|
||||
{Name: "generate", Description: "Generate and/or modifies files based on a schematic"},
|
||||
@@ -37,7 +37,7 @@ func init() {
|
||||
{Name: "info", Description: "Display Nest project details"},
|
||||
{Name: "update", Description: "Update Nest dependencies"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-d", Description: "Report actions that would be taken without writing out results"},
|
||||
{Name: "-p", Description: "Project in which to generate files"},
|
||||
{Name: "--flat", Description: "Enforce flat structure of generated element"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "next",
|
||||
Description: "A port number on which to start the application",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "build", Description: "Create an optimized production build of your application"},
|
||||
{Name: "dev", Description: "Start the application in development mode"},
|
||||
{Name: "start", Description: "Start the application in production mode"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "enable", Description: "Enable Next.js' telemetry collection"},
|
||||
{Name: "disable", Description: "Disable Next.js' telemetry collection"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-p", Description: "A port number on which to start the application"},
|
||||
{Name: "-H", Description: "Hostname on which to start the application"},
|
||||
{Name: "-h", Description: "Output usage information"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "ng",
|
||||
Description: "Project name",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "new", Description: "Create a new Angular app"},
|
||||
{Name: "generate", Description: "Generate new files"},
|
||||
{Name: "application", Description: "Generates a new application"},
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
{Name: "class", Description: "Generates a class"},
|
||||
{Name: "version", Description: "View your Angular CLI version (update for Angular 14+)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--project", Description: "Project name"},
|
||||
{Name: "--create-application", Description: "Create a default application?"},
|
||||
{Name: "--style", Description: "Generate a new component"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "node",
|
||||
Description: "Run the node interpreter",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-e", Description: "Evaluate script"},
|
||||
{Name: "--watch", Description: "Watch input files"},
|
||||
{Name: "--watch-path", Description: "Specify a watch directory or file"},
|
||||
|
||||
+14
-14
@@ -5,14 +5,14 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
cwd := core.GetCWD()
|
||||
func NpmScriptGenerator(tokens []string, _ string, _ string) []spec.Suggestion {
|
||||
cwd := spec.GetCWD()
|
||||
data, err := os.ReadFile(filepath.Join(cwd, "package.json"))
|
||||
if err != nil {
|
||||
return []core.Suggestion{
|
||||
return []spec.Suggestion{
|
||||
{Cmd: "dev", Desc: "development server"},
|
||||
{Cmd: "build", Desc: "build for production"},
|
||||
{Cmd: "start", Desc: "start application"},
|
||||
@@ -30,18 +30,18 @@ func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
|
||||
priority := []string{"dev", "start", "build", "test", "lint", "preview", "typecheck", "format"}
|
||||
seen := make(map[string]bool)
|
||||
var results []core.Suggestion
|
||||
var results []spec.Suggestion
|
||||
|
||||
for _, name := range priority {
|
||||
if cmd, ok := pkg.Scripts[name]; ok {
|
||||
results = append(results, core.Suggestion{Cmd: name, Desc: cmd})
|
||||
results = append(results, spec.Suggestion{Cmd: name, Desc: cmd})
|
||||
seen[name] = true
|
||||
}
|
||||
}
|
||||
|
||||
for name, cmd := range pkg.Scripts {
|
||||
if !seen[name] {
|
||||
results = append(results, core.Suggestion{Cmd: name, Desc: cmd})
|
||||
results = append(results, spec.Suggestion{Cmd: name, Desc: cmd})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,36 +49,36 @@ func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion {
|
||||
}
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "npm",
|
||||
Description: "node packages",
|
||||
Subcommands: []core.Subcommand{
|
||||
{Name: "install", Description: "install packages", Options: []core.Option{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "install", Description: "install packages", Options: []spec.Option{
|
||||
{Name: "--save-dev", Description: "save as devDependency"},
|
||||
{Name: "--save-exact", Description: "exact version"},
|
||||
{Name: "--legacy-peer-deps", Description: "skip peer deps"},
|
||||
}},
|
||||
{Name: "run", Description: "run script", Generator: NpmScriptGenerator},
|
||||
{Name: "test", Description: "run tests"},
|
||||
{Name: "init", Description: "create package.json", Options: []core.Option{
|
||||
{Name: "init", Description: "create package.json", Options: []spec.Option{
|
||||
{Name: "-y", Description: "skip prompts"},
|
||||
}},
|
||||
{Name: "publish", Description: "publish package"},
|
||||
{Name: "update", Description: "update packages"},
|
||||
{Name: "uninstall", Description: "remove package"},
|
||||
{Name: "ls", Description: "list installed"},
|
||||
{Name: "audit", Description: "security audit", Options: []core.Option{
|
||||
{Name: "audit", Description: "security audit", Options: []spec.Option{
|
||||
{Name: "fix", Description: "auto fix"},
|
||||
}},
|
||||
{Name: "ci", Description: "clean install from lockfile"},
|
||||
{Name: "pack", Description: "create tarball"},
|
||||
{Name: "link", Description: "symlink package"},
|
||||
{Name: "cache", Description: "manage cache", Subcommands: []core.Subcommand{
|
||||
{Name: "cache", Description: "manage cache", Subcommands: []spec.Subcommand{
|
||||
{Name: "clean", Description: "clear cache"},
|
||||
{Name: "verify", Description: "verify cache"},
|
||||
}},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--prefix", Description: "set working directory"},
|
||||
},
|
||||
})
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "npx",
|
||||
Description: "Execute binaries from npm packages",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--package", Description: "Package to be installed"},
|
||||
{Name: "--cache", Description: "Location of the npm cache"},
|
||||
{Name: "--always-spawn", Description: "Always spawn a child process to execute the command"},
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "nuxi",
|
||||
Description: "The directory of the target application",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--help", Description: "Show help"},
|
||||
{Name: "--verbose", Description: "Log information about the installation process"},
|
||||
{Name: "--template", Description: "Specify a Git repository to use as a template"},
|
||||
|
||||
+4
-4
@@ -1,19 +1,19 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "nuxt",
|
||||
Description: "Launch the development server",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "dev", Description: "Launch the development server"},
|
||||
{Name: "build", Description: "Build and optimize your application with webpack for production"},
|
||||
{Name: "webpack", Description: "Inspect the webpack config"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--name", Description: "Bundle name to inspect. (client, server, modern)"},
|
||||
{Name: "--dev", Description: "Inspect webpack config for dev mode"},
|
||||
{Name: "--depth", Description: "Inspection depth. Defaults to 2 to prevent verbose output"},
|
||||
|
||||
+4
-4
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "nx",
|
||||
Description: "All projects",
|
||||
Subcommands: []core.Subcommand{
|
||||
Subcommands: []spec.Subcommand{
|
||||
{Name: "init", Description: "Adds nx.json file and installs nx if not installed already"},
|
||||
{Name: "daemon", Description: "Prints information about the Nx Daemon process or starts a daemon process"},
|
||||
{Name: "graph", Description: "Graph dependencies within workspace"},
|
||||
@@ -31,7 +31,7 @@ func init() {
|
||||
{Name: "show", Description: "Show information about the workspace (e.g., list of projects)"},
|
||||
{Name: "object", Description: "What to show (e.g., projects)"},
|
||||
},
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "--all", Description: "All projects"},
|
||||
{Name: "--base", Description: "Base of the current branch (usually main)"},
|
||||
{Name: "--commitPrefix", Description: "Automatically create a git commit after each migration runs"},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package js
|
||||
|
||||
import (
|
||||
"github.com/versenilvis/iris/commands/core"
|
||||
"github.com/versenilvis/iris/spec"
|
||||
)
|
||||
|
||||
func init() {
|
||||
core.Register(&core.Spec{
|
||||
spec.Register(&spec.Spec{
|
||||
Name: "oxlint",
|
||||
Description: "All lints (except nursery)",
|
||||
Options: []core.Option{
|
||||
Options: []spec.Option{
|
||||
{Name: "-c", Description: "Path to Oxlint JSON configuration file"},
|
||||
{Name: "--tsconfig", Description: "Specify the file to use as your .eslintignore"},
|
||||
{Name: "--ignore-pattern", Description: "Specify file patterns to ignore (in addition to those in .eslintignore)"},
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user