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