From ebde9ba68f72194ba0358aef2bca3ce8690617d0 Mon Sep 17 00:00:00 2001 From: VERSE Date: Sun, 5 Jul 2026 11:27:30 +0700 Subject: [PATCH] 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 --- commands/README.md | 4 +- commands/cc/bazel.go | 8 +- commands/cc/cc.go | 28 +++--- commands/cc/cmake.go | 8 +- commands/cc/premake.go | 8 +- commands/cc/swift.go | 8 +- commands/cc/typst.go | 8 +- commands/cc/xcode_select.go | 6 +- commands/cc/xcodebuild.go | 6 +- commands/cc/xcodeproj.go | 6 +- commands/cc/xcrun.go | 8 +- commands/cc/zig.go | 8 +- commands/fs/broot.go | 6 +- commands/fs/cd.go | 8 +- commands/fs/chmod.go | 20 ++--- commands/fs/chown.go | 8 +- commands/fs/cp.go | 8 +- commands/fs/df.go | 6 +- commands/fs/dust.go | 6 +- commands/fs/exa.go | 4 +- commands/fs/eza.go | 6 +- commands/fs/find.go | 6 +- commands/fs/fold.go | 6 +- commands/fs/ln.go | 8 +- commands/fs/ls.go | 8 +- commands/fs/lsd.go | 6 +- commands/fs/mkdir.go | 6 +- commands/fs/mv.go | 8 +- commands/fs/paper.go | 8 +- commands/fs/rclone.go | 8 +- commands/fs/readlink.go | 6 +- commands/fs/rm.go | 8 +- commands/fs/rmdir.go | 6 +- commands/fs/stow.go | 6 +- commands/fs/tar.go | 8 +- commands/fs/touch.go | 6 +- commands/fs/trash.go | 6 +- commands/fs/tree.go | 6 +- commands/fs/unzip.go | 6 +- commands/fs/zip.go | 6 +- commands/fs/zoxide.go | 20 ++--- commands/git/ghq.go | 8 +- commands/git/git.go | 120 ++++++++++++------------- commands/git/git_cliff.go | 6 +- commands/git/git_flow.go | 8 +- commands/git/git_profile.go | 8 +- commands/git/git_quick_stats.go | 6 +- commands/git/github.go | 8 +- commands/git/svn.go | 8 +- commands/golang/go.go | 80 ++++++++--------- commands/golang/goctl.go | 8 +- commands/golang/goreleaser.go | 8 +- commands/js/asar.go | 8 +- commands/js/astro.go | 8 +- commands/js/babel.go | 6 +- commands/js/blitz.go | 8 +- commands/js/browser_sync.go | 8 +- commands/js/build_storybook.go | 6 +- commands/js/bun.go | 34 +++---- commands/js/cordova.go | 8 +- commands/js/create_completion_spec.go | 8 +- commands/js/create_next_app.go | 6 +- commands/js/create_nx_workspace.go | 6 +- commands/js/create_react_app.go | 6 +- commands/js/create_react_native_app.go | 6 +- commands/js/create_redwood_app.go | 6 +- commands/js/create_remix.go | 6 +- commands/js/create_t3_app.go | 6 +- commands/js/create_video.go | 4 +- commands/js/create_vite.go | 4 +- commands/js/create_web3_frontend.go | 6 +- commands/js/deno.go | 8 +- commands/js/dotenv.go | 6 +- commands/js/electron.go | 6 +- commands/js/elm.go | 8 +- commands/js/elm_format.go | 6 +- commands/js/elm_json.go | 8 +- commands/js/elm_review.go | 8 +- commands/js/esbuild.go | 6 +- commands/js/eslint.go | 6 +- commands/js/expo.go | 6 +- commands/js/expo_cli.go | 6 +- commands/js/ganache_cli.go | 6 +- commands/js/gatsby.go | 8 +- commands/js/hardhat.go | 8 +- commands/js/ionic.go | 8 +- commands/js/jest.go | 6 +- commands/js/lerna.go | 8 +- commands/js/meteor.go | 8 +- commands/js/ncu.go | 6 +- commands/js/nest.go | 8 +- commands/js/next.go | 8 +- commands/js/ng.go | 8 +- commands/js/node.go | 6 +- commands/js/npm.go | 28 +++--- commands/js/npx.go | 6 +- commands/js/nuxi.go | 6 +- commands/js/nuxt.go | 8 +- commands/js/nx.go | 8 +- commands/js/oxlint.go | 6 +- commands/js/playwright.go | 8 +- commands/js/pnpm.go | 16 ++-- commands/js/pnpx.go | 6 +- commands/js/prettier.go | 6 +- commands/js/quasar.go | 8 +- commands/js/react_native.go | 6 +- commands/js/redwood.go | 8 +- commands/js/remix.go | 8 +- commands/js/remotion.go | 8 +- commands/js/rollup.go | 6 +- commands/js/rome.go | 8 +- commands/js/rush.go | 8 +- commands/js/sequelize.go | 6 +- commands/js/serve.go | 6 +- commands/js/shadcn_ui.go | 8 +- commands/js/start_storybook.go | 6 +- commands/js/stencil.go | 8 +- commands/js/swagger_typescript_api.go | 6 +- commands/js/swc.go | 6 +- commands/js/truffle.go | 8 +- commands/js/ts_node.go | 6 +- commands/js/tsc.go | 6 +- commands/js/tsx.go | 8 +- commands/js/turbo.go | 8 +- commands/js/typeorm.go | 8 +- commands/js/vite.go | 6 +- commands/js/vr.go | 8 +- commands/js/vsce.go | 8 +- commands/js/vue.go | 8 +- commands/js/watchman.go | 8 +- commands/js/webpack.go | 8 +- commands/js/yalc.go | 8 +- commands/js/yarn.go | 20 ++--- commands/jvm/clojure.go | 6 +- commands/jvm/dart.go | 8 +- commands/jvm/flutter.go | 8 +- commands/jvm/fvm.go | 8 +- commands/jvm/gradle.go | 8 +- commands/jvm/jenv.go | 8 +- commands/jvm/jmeter.go | 6 +- commands/jvm/jvm.go | 20 ++--- commands/jvm/kdoctor.go | 6 +- commands/jvm/keytool.go | 6 +- commands/jvm/mvn.go | 6 +- commands/jvm/spring.go | 8 +- commands/ops/amplify.go | 8 +- commands/ops/ampx.go | 8 +- commands/ops/ansible.go | 6 +- commands/ops/ansible_config.go | 8 +- commands/ops/ansible_doc.go | 6 +- commands/ops/ansible_galaxy.go | 8 +- commands/ops/ansible_lint.go | 6 +- commands/ops/ansible_playbook.go | 6 +- commands/ops/appwrite.go | 8 +- commands/ops/arch.go | 6 +- commands/ops/arduino_cli.go | 8 +- commands/ops/argo.go | 8 +- commands/ops/asdf.go | 6 +- commands/ops/atlas.go | 8 +- commands/ops/aws.go | 8 +- commands/ops/aws_vault.go | 6 +- commands/ops/bit.go | 8 +- commands/ops/bosh.go | 8 +- commands/ops/capacitor.go | 8 +- commands/ops/cdk.go | 8 +- commands/ops/cf.go | 8 +- commands/ops/checkov.go | 6 +- commands/ops/circleci.go | 8 +- commands/ops/cloudflared.go | 8 +- commands/ops/coda.go | 8 +- commands/ops/command.go | 6 +- commands/ops/copilot.go | 8 +- commands/ops/cosign.go | 8 +- commands/ops/dapr.go | 8 +- commands/ops/datree.go | 8 +- commands/ops/deployctl.go | 8 +- commands/ops/direnv.go | 6 +- commands/ops/docker.go | 82 ++++++++--------- commands/ops/doctl.go | 8 +- commands/ops/doppler.go | 8 +- commands/ops/eas.go | 8 +- commands/ops/fastly.go | 8 +- commands/ops/firebase.go | 8 +- commands/ops/flyctl.go | 8 +- commands/ops/fnm.go | 8 +- commands/ops/gcloud.go | 6 +- commands/ops/gh.go | 8 +- commands/ops/gpg.go | 6 +- commands/ops/hasura.go | 8 +- commands/ops/helm.go | 8 +- commands/ops/helmfile.go | 8 +- commands/ops/hugo.go | 8 +- commands/ops/k3d.go | 8 +- commands/ops/k6.go | 8 +- commands/ops/k9s.go | 8 +- commands/ops/kind.go | 8 +- commands/ops/knex.go | 8 +- commands/ops/kubectl.go | 12 +-- commands/ops/kubectx.go | 6 +- commands/ops/kubens.go | 6 +- commands/ops/limactl.go | 8 +- commands/ops/locust.go | 6 +- commands/ops/lpass.go | 8 +- commands/ops/minikube.go | 8 +- commands/ops/mongocli.go | 8 +- commands/ops/mongoimport.go | 6 +- commands/ops/mongosh.go | 6 +- commands/ops/multipass.go | 8 +- commands/ops/mysql.go | 6 +- commands/ops/netlify.go | 8 +- commands/ops/newman.go | 8 +- commands/ops/nginx.go | 6 +- commands/ops/ngrok.go | 8 +- commands/ops/nvm.go | 8 +- commands/ops/oci.go | 8 +- commands/ops/okteto.go | 8 +- commands/ops/op.go | 8 +- commands/ops/opa.go | 8 +- commands/ops/osqueryi.go | 6 +- commands/ops/pass.go | 8 +- commands/ops/pg_dump.go | 6 +- commands/ops/pgcli.go | 6 +- commands/ops/pm2.go | 8 +- commands/ops/pod.go | 8 +- commands/ops/podman.go | 8 +- commands/ops/pscale.go | 8 +- commands/ops/psql.go | 6 +- commands/ops/pulumi.go | 8 +- commands/ops/qodana.go | 8 +- commands/ops/railway.go | 8 +- commands/ops/rbenv.go | 8 +- commands/ops/robot.go | 6 +- commands/ops/serverless.go | 8 +- commands/ops/sfdx.go | 8 +- commands/ops/sftp.go | 6 +- commands/ops/space.go | 8 +- commands/ops/sqlite3.go | 6 +- commands/ops/src.go | 8 +- commands/ops/ssh.go | 20 ++--- commands/ops/ssh_keygen.go | 6 +- commands/ops/stripe.go | 16 ++-- commands/ops/supabase.go | 8 +- commands/ops/surreal.go | 8 +- commands/ops/tailscale.go | 8 +- commands/ops/terraform.go | 8 +- commands/ops/terragrunt.go | 8 +- commands/ops/tfenv.go | 8 +- commands/ops/tfsec.go | 6 +- commands/ops/tkn.go | 8 +- commands/ops/trivy.go | 8 +- commands/ops/tsuru.go | 8 +- commands/ops/vault.go | 8 +- commands/ops/vela.go | 8 +- commands/ops/vercel.go | 8 +- commands/ops/volta.go | 8 +- commands/ops/watson.go | 8 +- commands/ops/whois.go | 6 +- commands/ops/wrangler.go | 8 +- commands/ops/xc.go | 6 +- commands/ops/xcodes.go | 8 +- commands/pkginstaller/dpkg.go | 8 +- commands/pkginstaller/pkgmgr.go | 72 +++++++-------- commands/pkginstaller/pkgutil.go | 8 +- commands/python/black.go | 6 +- commands/python/conda.go | 8 +- commands/python/django_admin.go | 8 +- commands/python/googler.go | 6 +- commands/python/jupyter.go | 8 +- commands/python/mamba.go | 8 +- commands/python/mypy.go | 6 +- commands/python/pip.go | 24 ++--- commands/python/pipenv.go | 8 +- commands/python/pipx.go | 8 +- commands/python/pre_commit.go | 8 +- commands/python/pyenv.go | 8 +- commands/python/pytest.go | 6 +- commands/python/python.go | 44 ++++----- commands/python/ruff.go | 8 +- commands/python/sqlfluff.go | 8 +- commands/python/sqlmesh.go | 8 +- commands/python/streamlit.go | 8 +- commands/python/youtube_dl.go | 6 +- commands/runner/ant.go | 6 +- commands/runner/composer.go | 6 +- commands/runner/dbt.go | 8 +- commands/runner/drush.go | 4 +- commands/runner/elixir.go | 6 +- commands/runner/gem.go | 8 +- commands/runner/hexo.go | 8 +- commands/runner/justfile.go | 10 +-- commands/runner/laravel.go | 8 +- commands/runner/magento.go | 4 +- commands/runner/makefile.go | 10 +-- commands/runner/mix.go | 8 +- commands/runner/php.go | 4 +- commands/runner/phpunit.go | 6 +- commands/runner/phpunit_watcher.go | 6 +- commands/runner/rails.go | 6 +- commands/runner/rake.go | 6 +- commands/runner/rubocop.go | 6 +- commands/runner/ruby.go | 6 +- commands/runner/rvm.go | 8 +- commands/runner/sidekiq.go | 6 +- commands/runner/symfony.go | 8 +- commands/runner/valet.go | 8 +- commands/runner/vapor.go | 8 +- commands/rust/cargo.go | 8 +- commands/rust/dprint.go | 8 +- commands/rust/pijul.go | 8 +- commands/rust/rustc.go | 8 +- commands/rust/rustup.go | 8 +- commands/rust/taplo.go | 8 +- commands/rust/tokei.go | 6 +- commands/rust/trunk.go | 8 +- commands/rust/wasm_bindgen.go | 6 +- commands/rust/wasm_pack.go | 8 +- commands/rust/zellij.go | 6 +- commands/sys/adb.go | 8 +- commands/sys/ag.go | 6 +- commands/sys/airflow.go | 8 +- commands/sys/aliases.go | 8 +- commands/sys/asciinema.go | 8 +- commands/sys/asr.go | 8 +- commands/sys/atuin.go | 8 +- commands/sys/basename.go | 6 +- commands/sys/bc.go | 6 +- commands/sys/btop.go | 6 +- commands/sys/bundle.go | 8 +- commands/sys/cal.go | 6 +- commands/sys/cci.go | 8 +- commands/sys/cdk8s.go | 8 +- commands/sys/chezmoi.go | 8 +- commands/sys/chsh.go | 6 +- commands/sys/codesign.go | 6 +- commands/sys/croc.go | 8 +- commands/sys/crontab.go | 6 +- commands/sys/date.go | 6 +- commands/sys/dateseq.go | 6 +- commands/sys/dcli.go | 8 +- commands/sys/dd.go | 4 +- commands/sys/ddev.go | 8 +- commands/sys/defaults.go | 8 +- commands/sys/degit.go | 6 +- commands/sys/deta.go | 8 +- commands/sys/dirname.go | 4 +- commands/sys/do_release_upgrade.go | 6 +- commands/sys/dog.go | 8 +- commands/sys/dotnet.go | 6 +- commands/sys/dscacheutil.go | 8 +- commands/sys/dscl.go | 8 +- commands/sys/dtm.go | 8 +- commands/sys/echo.go | 6 +- commands/sys/eleventy.go | 4 +- commands/sys/env.go | 18 ++-- commands/sys/exec.go | 4 +- commands/sys/fastlane.go | 8 +- commands/sys/fdisk.go | 6 +- commands/sys/ffmpeg.go | 6 +- commands/sys/firefox.go | 6 +- commands/sys/fisher.go | 8 +- commands/sys/fmt.go | 6 +- commands/sys/forc.go | 8 +- commands/sys/forge.go | 8 +- commands/sys/fzf.go | 6 +- commands/sys/fzf_tmux.go | 6 +- commands/sys/gltfjsx.go | 6 +- commands/sys/goto.go | 6 +- commands/sys/gum.go | 8 +- commands/sys/herd.go | 8 +- commands/sys/hop.go | 8 +- commands/sys/hostname.go | 6 +- commands/sys/htop.go | 6 +- commands/sys/http.go | 6 +- commands/sys/hyper.go | 6 +- commands/sys/hyperfine.go | 6 +- commands/sys/ibus.go | 6 +- commands/sys/id.go | 6 +- commands/sys/ignite_cli.go | 8 +- commands/sys/install.go | 6 +- commands/sys/join.go | 6 +- commands/sys/julia.go | 6 +- commands/sys/kafkactl.go | 8 +- commands/sys/kamal.go | 8 +- commands/sys/kitty.go | 8 +- commands/sys/klist.go | 6 +- commands/sys/kool.go | 8 +- commands/sys/launchctl.go | 8 +- commands/sys/leaf.go | 8 +- commands/sys/lima.go | 6 +- commands/sys/login.go | 6 +- commands/sys/lsblk.go | 6 +- commands/sys/lsof.go | 6 +- commands/sys/man.go | 6 +- commands/sys/meroxa.go | 8 +- commands/sys/mkdocs.go | 8 +- commands/sys/mkfifo.go | 6 +- commands/sys/mkinitcpio.go | 6 +- commands/sys/mknod.go | 8 +- commands/sys/mosh.go | 6 +- commands/sys/mount.go | 6 +- commands/sys/ncal.go | 6 +- commands/sys/neofetch.go | 6 +- commands/sys/network.go | 46 +++++----- commands/sys/networkquality.go | 6 +- commands/sys/networksetup.go | 8 +- commands/sys/nextflow.go | 8 +- commands/sys/nhost.go | 8 +- commands/sys/nmap.go | 6 +- commands/sys/nrm.go | 6 +- commands/sys/ns.go | 8 +- commands/sys/nylas.go | 8 +- commands/sys/oh_my_posh.go | 8 +- commands/sys/okta.go | 8 +- commands/sys/ollama.go | 8 +- commands/sys/omz.go | 6 +- commands/sys/pac.go | 8 +- commands/sys/passwd.go | 6 +- commands/sys/pathchk.go | 6 +- commands/sys/pdfunite.go | 6 +- commands/sys/pkg_config.go | 6 +- commands/sys/pmset.go | 8 +- commands/sys/pocketbase.go | 8 +- commands/sys/prisma.go | 8 +- commands/sys/pro.go | 8 +- commands/sys/pry.go | 6 +- commands/sys/ps.go | 28 +++--- commands/sys/publish.go | 8 +- commands/sys/pwd.go | 6 +- commands/sys/rancher.go | 8 +- commands/sys/repeat.go | 4 +- commands/sys/rscript.go | 6 +- commands/sys/sam.go | 8 +- commands/sys/sanity.go | 8 +- commands/sys/screen.go | 8 +- commands/sys/shell_config.go | 8 +- commands/sys/shortcuts.go | 8 +- commands/sys/simctl.go | 8 +- commands/sys/source.go | 4 +- commands/sys/speedtest_cli.go | 6 +- commands/sys/spotify.go | 8 +- commands/sys/st2.go | 8 +- commands/sys/stack.go | 8 +- commands/sys/starkli.go | 8 +- commands/sys/su.go | 6 +- commands/sys/sudo.go | 6 +- commands/sys/sysctl.go | 6 +- commands/sys/systemctl.go | 8 +- commands/sys/tac.go | 6 +- commands/sys/tailcall.go | 8 +- commands/sys/tailwindcss.go | 8 +- commands/sys/time.go | 4 +- commands/sys/tldr.go | 6 +- commands/sys/tmux.go | 8 +- commands/sys/tmuxinator.go | 8 +- commands/sys/top.go | 6 +- commands/sys/traceroute.go | 6 +- commands/sys/trap.go | 6 +- commands/sys/trex.go | 8 +- commands/sys/tsh.go | 8 +- commands/sys/tuist.go | 8 +- commands/sys/twilio.go | 8 +- commands/sys/uname.go | 6 +- commands/sys/visudo.go | 6 +- commands/sys/vultr_cli.go | 8 +- commands/sys/wezterm.go | 8 +- commands/sys/where.go | 6 +- commands/sys/whereis.go | 6 +- commands/sys/which.go | 6 +- commands/sys/who.go | 8 +- commands/sys/wing.go | 8 +- commands/sys/wp.go | 8 +- commands/sys/wrk.go | 6 +- commands/sys/wscat.go | 6 +- commands/sys/yank.go | 6 +- commands/sys/ykman.go | 8 +- commands/sys/zapier.go | 8 +- commands/text/diff.go | 6 +- commands/text/dos2unix.go | 6 +- commands/text/find.go | 8 +- commands/text/grep.go | 14 +-- commands/text/iconv.go | 6 +- commands/text/jq.go | 6 +- commands/text/pandoc.go | 6 +- commands/text/rg.go | 14 +-- commands/text/seq.go | 6 +- commands/text/sha1sum.go | 6 +- commands/text/shasum.go | 6 +- commands/text/shred.go | 6 +- commands/text/split.go | 6 +- commands/text/textproc.go | 52 +++++------ commands/text/truncate.go | 6 +- commands/text/typos.go | 6 +- commands/text/unix2dos.go | 4 +- commands/text/vale.go | 8 +- commands/view/bat.go | 6 +- commands/view/cat.go | 8 +- commands/view/code.go | 6 +- commands/view/cot.go | 4 +- commands/view/du.go | 8 +- commands/view/emacs.go | 4 +- commands/view/file.go | 6 +- commands/view/glow.go | 8 +- commands/view/head.go | 8 +- commands/view/idea.go | 8 +- commands/view/less.go | 6 +- commands/view/lvim.go | 6 +- commands/view/micro.go | 8 +- commands/view/more.go | 6 +- commands/view/nano.go | 4 +- commands/view/nvim.go | 6 +- commands/view/rich.go | 6 +- commands/view/stat.go | 6 +- commands/view/subl.go | 6 +- commands/view/tail.go | 8 +- commands/view/vi.go | 6 +- commands/view/vim.go | 6 +- commands/view/vimr.go | 6 +- commands/view/wc.go | 8 +- commands/view/xed.go | 6 +- commands/view/xxd.go | 6 +- commands/view/zed.go | 6 +- integration/overlay.go | 10 +-- root/suggestions.go | 14 +-- root/wrapper.go | 12 +-- scripts/cmds_docs.go | 6 +- {commands/core => spec}/filegen.go | 2 +- {commands/core => spec}/lookup.go | 2 +- {commands/core => spec}/spec.go | 2 +- {commands/core => spec}/system.go | 2 +- {commands/core => spec}/utils.go | 2 +- tests/dev/git_test.go | 42 ++++----- tests/dev/npm_ssh_test.go | 10 +-- tests/integration_test.go | 4 +- tests/{core => spec}/filegen_test.go | 12 +-- tests/{core => spec}/lookup_test.go | 32 +++---- tests/{core => spec}/utils_test.go | 6 +- 536 files changed, 2241 insertions(+), 2241 deletions(-) rename {commands/core => spec}/filegen.go (99%) rename {commands/core => spec}/lookup.go (99%) rename {commands/core => spec}/spec.go (98%) rename {commands/core => spec}/system.go (98%) rename {commands/core => spec}/utils.go (98%) rename tests/{core => spec}/filegen_test.go (91%) rename tests/{core => spec}/lookup_test.go (70%) rename tests/{core => spec}/utils_test.go (90%) diff --git a/commands/README.md b/commands/README.md index 5097b0b..01e797b 100644 --- a/commands/README.md +++ b/commands/README.md @@ -1,8 +1,8 @@ # Iris commands -This directory contains all modular CLI command specifications and autocompletion definitions supported by **Iris**. Every command is defined as a `core.Spec` registered via package `init()` functions and grouped into category subdirectories. +This directory contains all modular CLI command specifications and autocompletion definitions supported by **Iris**. Every command is defined as a `spec.Spec` registered via package `init()` functions and grouped into category subdirectories. -The **[`core/`](./core)** subdirectory is the primary engine package. It implements the underlying command registry (`core.Registry`), data structures (`Spec`, `Arg`, `Flag`), dynamic generators, and autocompletion matching logic. The top-level **[`all.go`](./all.go)** file anonymously imports all category subpackages to trigger their initialization and register all available commands at startup. +The top-level **[`spec/`](../spec)** package is the primary engine package. It implements the underlying command registry (`spec.Registry`), data structures (`Spec`, `Arg`, `Flag`), dynamic generators, and autocompletion matching logic. The **[`all.go`](./all.go)** file anonymously imports all category subpackages to trigger their initialization and register all available commands at startup. ## Overview diff --git a/commands/cc/bazel.go b/commands/cc/bazel.go index 24c59ae..a211e46 100644 --- a/commands/cc/bazel.go +++ b/commands/cc/bazel.go @@ -1,19 +1,19 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bazel", Description: "Bazel target", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "run", Description: "Runs the specified target"}, {Name: "test", Description: "Builds and runs the specified test targets"}, {Name: "build", Description: "Builds the specified targets"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--autodetect_server_javabase", Description: "Back to the local JDK for running the bazel server and instead exits"}, {Name: "--nobatch", Description: "Run with a server"}, {Name: "--batch_cpu_scheduling", Description: "Only on Linux; use 'batch' CPU scheduling for Bazel"}, diff --git a/commands/cc/cc.go b/commands/cc/cc.go index 70a4beb..2d761fe 100644 --- a/commands/cc/cc.go +++ b/commands/cc/cc.go @@ -1,11 +1,11 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - cOptions := []core.Option{ + cOptions := []spec.Option{ {Name: "-o", Description: "output file"}, {Name: "-c", Description: "compile only (no link)"}, {Name: "-g", Description: "debug symbols"}, @@ -35,45 +35,45 @@ func init() { {Name: "--version", Description: "print version"}, } - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gcc", Description: "GNU C compiler", - Generator: core.FileGenerator(".c", ".h"), + Generator: spec.FileGenerator(".c", ".h"), Options: cOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "g++", Description: "GNU C++ compiler", - Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), + Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), Options: cOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cc", Description: "C compiler (alias)", - Generator: core.FileGenerator(".c", ".h"), + Generator: spec.FileGenerator(".c", ".h"), Options: cOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "c++", Description: "C++ compiler (alias)", - Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), + Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), Options: cOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "clang", Description: "LLVM C compiler", - Generator: core.FileGenerator(".c", ".h"), + Generator: spec.FileGenerator(".c", ".h"), Options: cOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "clang++", Description: "LLVM C++ compiler", - Generator: core.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), + Generator: spec.FileGenerator(".cpp", ".cc", ".cxx", ".h", ".hpp"), Options: cOptions, }) } diff --git a/commands/cc/cmake.go b/commands/cc/cmake.go index a8573a7..5058961 100644 --- a/commands/cc/cmake.go +++ b/commands/cc/cmake.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cmake", Description: "Command-line interface of the cross-platform buildsystem generator CMake", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "permissions", Description: "Format: "}, {Name: "cat", Description: "Concatenate files and print on the standard output"}, {Name: "chdir", Description: "Change the current working directory and run a command"}, @@ -37,7 +37,7 @@ func init() { {Name: "time", Description: "Run command and display elapsed time"}, {Name: "true", Description: "Do nothing, with an exit code of 0"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--build", Description: "Use a build preset to specify build options"}, {Name: "--list-presets", Description: "For multi-configuration tools, choose configuration "}, {Name: "--clean-first", Description: "Build target clean first, then build"}, diff --git a/commands/cc/premake.go b/commands/cc/premake.go index 2e2967a..ce7ff1f 100644 --- a/commands/cc/premake.go +++ b/commands/cc/premake.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "premake", Description: "The premake5.lua file", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "clean", Description: "Remove all binaries and generated files"}, {Name: "vs2022", Description: "Generate Visual Studio 2022 project files"}, {Name: "vs2019", Description: "Generate Visual Studio 2019 project files"}, @@ -24,7 +24,7 @@ func init() { {Name: "xcode4", Description: "Generate Apple Xcode 4 project files"}, {Name: "codelite", Description: "Generate CodeLite project files"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--file", Description: "The premake5.lua file"}, {Name: "--debugger", Description: "Start MobDebug remote debugger. Works with ZeroBrane Studio"}, {Name: "--fatal", Description: "Treat warnings from project scripts as errors"}, diff --git a/commands/cc/swift.go b/commands/cc/swift.go index 7d55110..057638c 100644 --- a/commands/cc/swift.go +++ b/commands/cc/swift.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "swift", Description: "Show help information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build sources into binary products"}, {Name: "target", Description: "The name of the target to build"}, {Name: "product", Description: "The name of the product to build"}, @@ -60,7 +60,7 @@ func init() { {Name: "compute-checksum", Description: "Compute the checksum for a binary artifact"}, {Name: "archive-source", Description: "Create a source archive for the package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help information"}, {Name: "--version", Description: "Show the version"}, {Name: "-access-notes-path", Description: "Specify YAML file to override attributes on Swift declarations in this module"}, diff --git a/commands/cc/typst.go b/commands/cc/typst.go index 1f23ac9..2a4e393 100644 --- a/commands/cc/typst.go +++ b/commands/cc/typst.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "typst", Description: "The Typst compiler", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "compile", Description: "Compiles an input file into a supported output format"}, {Name: "input", Description: "Path to input Typst file"}, {Name: "output", Description: "Path to output file (PDF, PNG, or SVG)"}, @@ -20,7 +20,7 @@ func init() { {Name: "version", Description: "Which version to update to (defaults to latest)"}, {Name: "help", Description: "Print this message or the help of the given subcommand(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--root", Description: "Configures the project root (for absolute paths)"}, {Name: "--font-path", Description: "Adds additional directories to search for fonts"}, {Name: "--diagnostic-format", Description: "The format to emit diagnostics in"}, diff --git a/commands/cc/xcode_select.go b/commands/cc/xcode_select.go index 79777c0..f757fd2 100644 --- a/commands/cc/xcode_select.go +++ b/commands/cc/xcode_select.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xcode-select", Description: "Active developer directory for Xcode tools", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Help message"}, {Name: "-p", Description: "Display path to active developer directory"}, {Name: "-s", Description: "Set path to active developer directory"}, diff --git a/commands/cc/xcodebuild.go b/commands/cc/xcodebuild.go index 255474f..f0f1068 100644 --- a/commands/cc/xcodebuild.go +++ b/commands/cc/xcodebuild.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xcodebuild", Description: "Build Xcode projects", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-usage", Description: "Print brief usage"}, {Name: "-help", Description: "Print complete usage"}, {Name: "-verbose", Description: "Provide additional status output"}, diff --git a/commands/cc/xcodeproj.go b/commands/cc/xcodeproj.go index 7bae2dd..6fadad7 100644 --- a/commands/cc/xcodeproj.go +++ b/commands/cc/xcodeproj.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xcodeproj", Description: "Xcodeproj lets you create and modify Xcode projects", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ignore", Description: "A key to ignore in the comparison. Can be specified multiple times"}, {Name: "--format", Description: "YAML output format"}, {Name: "--group-option", Description: "Shows the difference between two targets"}, diff --git a/commands/cc/xcrun.go b/commands/cc/xcrun.go index b49afae..273eb57 100644 --- a/commands/cc/xcrun.go +++ b/commands/cc/xcrun.go @@ -1,17 +1,17 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xcrun", Description: "SceneKit CLI utilities", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "scntool", Description: "SceneKit CLI utilities"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--convert", Description: "File to convert"}, {Name: "--format", Description: "Format to convert to"}, {Name: "--output", Description: "Path to the output file"}, diff --git a/commands/cc/zig.go b/commands/cc/zig.go index 8c65da0..9b0541a 100644 --- a/commands/cc/zig.go +++ b/commands/cc/zig.go @@ -1,14 +1,14 @@ package cc import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zig", Description: "Enable or disable colored message", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build project from build.zig"}, {Name: "install", Description: "Copy build artifacts to prefix path"}, {Name: "uninstall", Description: "Remove build artifacts from prefix path"}, @@ -40,7 +40,7 @@ func init() { {Name: "version", Description: "Print version number and exit"}, {Name: "zen", Description: "Print Zen of Zig and exit"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--color", Description: "Enable or disable colored message"}, {Name: "--cache-dir", Description: "Override path to local Zig cache directory"}, {Name: "--global-cache-dir", Description: "Override path to global Zig cache directory"}, diff --git a/commands/fs/broot.go b/commands/fs/broot.go index 42ab169..994853a 100644 --- a/commands/fs/broot.go +++ b/commands/fs/broot.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "broot", Description: "Show the last modified date of files and directories", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--dates", Description: "Show the last modified date of files and directories"}, {Name: "--no-dates", Description: "Don't show the last modified date"}, {Name: "--only-folders", Description: "Only show folders"}, diff --git a/commands/fs/cd.go b/commands/fs/cd.go index 815f311..85123d0 100644 --- a/commands/fs/cd.go +++ b/commands/fs/cd.go @@ -3,17 +3,17 @@ package fs import ( "strings" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cd", Description: "change directory", MaxArgs: 0, - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { fullQuery := strings.Join(tokens[1:], " ") - return core.FileGenerator("/")(tokens, prefix, fullQuery) + return spec.FileGenerator("/")(tokens, prefix, fullQuery) }, }) } diff --git a/commands/fs/chmod.go b/commands/fs/chmod.go index d13c308..5df92cf 100644 --- a/commands/fs/chmod.go +++ b/commands/fs/chmod.go @@ -1,16 +1,16 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "chmod", Description: "change file permissions", MaxArgs: 2, // 1 option + 1 file - Subcommands: []core.Subcommand{}, - Options: []core.Option{ + Subcommands: []spec.Subcommand{}, + Options: []spec.Option{ {Name: "-R", Description: "apply recursively to directories"}, {Name: "--recursive", Description: "apply recursively to directories"}, {Name: "-v", Description: "verbose: show each file processed"}, @@ -31,8 +31,8 @@ func init() { // modeGenerator suggests common chmod mode strings as the first argument, // then falls back to file suggestions for subsequent arguments -func modeGenerator() core.GeneratorFunc { - filegen := core.FileGenerator(".sh", ".py", ".bin", ".run") +func modeGenerator() spec.GeneratorFunc { + filegen := spec.FileGenerator(".sh", ".py", ".bin", ".run") commonModes := []struct { mode string @@ -63,7 +63,7 @@ func modeGenerator() core.GeneratorFunc { {"664", "rw-rw-r-- (group can read+write)"}, } - return func(tokens []string, prefix string, partial string) []core.Suggestion { + return func(tokens []string, prefix string, partial string) []spec.Suggestion { argCount := 0 for i := 1; i < len(tokens); i++ { t := tokens[i] @@ -73,10 +73,10 @@ func modeGenerator() core.GeneratorFunc { } if argCount == 0 { - var results []core.Suggestion + var results []spec.Suggestion for _, m := range commonModes { - if partial == "" || core.HasPrefixCI(m.mode, partial) { - results = append(results, core.Suggestion{ + if partial == "" || spec.HasPrefixCI(m.mode, partial) { + results = append(results, spec.Suggestion{ Cmd: m.mode, Desc: m.desc, }) diff --git a/commands/fs/chown.go b/commands/fs/chown.go index b64fef2..ff99a0b 100644 --- a/commands/fs/chown.go +++ b/commands/fs/chown.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "chown", Description: "change file owner", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-R", Description: "recursive"}, }, }) diff --git a/commands/fs/cp.go b/commands/fs/cp.go index 4ed47b0..a7dc014 100644 --- a/commands/fs/cp.go +++ b/commands/fs/cp.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cp", Description: "copy files and directories", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-r", Description: "recursive"}, {Name: "-a", Description: "archive mode"}, {Name: "-v", Description: "verbose"}, diff --git a/commands/fs/df.go b/commands/fs/df.go index 593628a..828cfdc 100644 --- a/commands/fs/df.go +++ b/commands/fs/df.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "df", Description: "Display free disk space", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Show all mount points"}, {Name: "-b", Description: "Use 512-byte blocks (default)"}, {Name: "-g", Description: "Use 1073741824-byte (1-Gbyte) blocks"}, diff --git a/commands/fs/dust.go b/commands/fs/dust.go index c13b26e..0533f32 100644 --- a/commands/fs/dust.go +++ b/commands/fs/dust.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dust", Description: "Like du but more intuitive", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for dust"}, {Name: "--version", Description: "Print version information"}, {Name: "--no-percent-bars", Description: "No percent bars or percentages will be displayed"}, diff --git a/commands/fs/exa.go b/commands/fs/exa.go index 164019a..0335152 100644 --- a/commands/fs/exa.go +++ b/commands/fs/exa.go @@ -1,11 +1,11 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "exa", Description: "A modern replacement for ls", }) diff --git a/commands/fs/eza.go b/commands/fs/eza.go index 2c7458c..70c98c9 100644 --- a/commands/fs/eza.go +++ b/commands/fs/eza.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "eza", Description: "A modern replacement for ls", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-?", Description: "Show list of command-line options"}, {Name: "-v", Description: "Show version of eza"}, {Name: "-1", Description: "Display one entry per line"}, diff --git a/commands/fs/find.go b/commands/fs/find.go index ee5355f..2b2bdfe 100644 --- a/commands/fs/find.go +++ b/commands/fs/find.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "find", Description: "Walk a file hierarchy", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-E", Description: "Permit find to be safely used in conjunction with xargs"}, {Name: "-d", Description: "Cause find to perform a depth-first traversal"}, {Name: "-f", Description: "Specify a file hierarch for find to traverse"}, diff --git a/commands/fs/fold.go b/commands/fs/fold.go index f1582fa..b456202 100644 --- a/commands/fs/fold.go +++ b/commands/fs/fold.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fold", Description: "Fold long lines for finite width output device", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-b", Description: "File(s) to fold"}, }, }) diff --git a/commands/fs/ln.go b/commands/fs/ln.go index 9d6d2c1..6f7b4e2 100644 --- a/commands/fs/ln.go +++ b/commands/fs/ln.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ln", Description: "create links", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-s", Description: "symbolic link"}, {Name: "-f", Description: "force"}, }, diff --git a/commands/fs/ls.go b/commands/fs/ls.go index 9f45f99..32e99c4 100644 --- a/commands/fs/ls.go +++ b/commands/fs/ls.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ls", Description: "list directory contents", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-a", Description: "all files"}, {Name: "-l", Description: "long format"}, {Name: "-h", Description: "human readable"}, diff --git a/commands/fs/lsd.go b/commands/fs/lsd.go index c9f0118..b3739aa 100644 --- a/commands/fs/lsd.go +++ b/commands/fs/lsd.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lsd", Description: "An ls command with a lot of pretty colors and some other stuff", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-1", Description: "Display one entry per line"}, {Name: "-A", Description: "Do not list implied . and"}, {Name: "-a", Description: "Do not ignore entries starting with"}, diff --git a/commands/fs/mkdir.go b/commands/fs/mkdir.go index a187a0e..8cbe713 100644 --- a/commands/fs/mkdir.go +++ b/commands/fs/mkdir.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mkdir", Description: "make directories", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "create parent dirs"}, {Name: "-v", Description: "verbose"}, }, diff --git a/commands/fs/mv.go b/commands/fs/mv.go index 44504f0..d82f7c4 100644 --- a/commands/fs/mv.go +++ b/commands/fs/mv.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mv", Description: "move (rename) files", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-i", Description: "interactive"}, {Name: "-f", Description: "force (overwrite)"}, {Name: "-n", Description: "no clobber (don't overwrite)"}, diff --git a/commands/fs/paper.go b/commands/fs/paper.go index 90f1b46..44010b3 100644 --- a/commands/fs/paper.go +++ b/commands/fs/paper.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "paper", Description: "The Paper CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bench", Description: "Benchmark a Paper query"}, {Name: "build", Description: "Build an Paper bundle"}, {Name: "check", Description: "Check Paper source files"}, @@ -29,7 +29,7 @@ func init() { {Name: "version", Description: "Print the version of Paper"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--benchmem", Description: "Report memory allocations with benchmark results"}, {Name: "--bundle", Description: "Set bundle file(s) or directory path(s). This flag can be repeated"}, {Name: "--count", Description: "Number of times to repeat each benchmark"}, diff --git a/commands/fs/rclone.go b/commands/fs/rclone.go index b3ee1a1..f9f0869 100644 --- a/commands/fs/rclone.go +++ b/commands/fs/rclone.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rclone", Description: "Only list directories", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "about", Description: "Get quota information from the remote"}, {Name: "authorize", Description: "Remote authorization"}, {Name: "backend", Description: "Run a backend specific command"}, @@ -60,7 +60,7 @@ func init() { {Name: "size", Description: "Prints the total size and number of objects in remote:path"}, {Name: "sync", Description: "Make source and dest identical, modifying destination only"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--dirs-only", Description: "Only list directories"}, {Name: "--files-only", Description: "Only list files"}, {Name: "--recursive", Description: "Recurse into the listing"}, diff --git a/commands/fs/readlink.go b/commands/fs/readlink.go index b4c982f..eec2441 100644 --- a/commands/fs/readlink.go +++ b/commands/fs/readlink.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "readlink", Description: "Display file status", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Do not force a newline to appear at the end of each piece of output"}, }, }) diff --git a/commands/fs/rm.go b/commands/fs/rm.go index f80ed8a..89f9d1d 100644 --- a/commands/fs/rm.go +++ b/commands/fs/rm.go @@ -1,15 +1,15 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rm", Description: "remove files or directories", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-r", Description: "recursive"}, {Name: "-f", Description: "force"}, {Name: "-i", Description: "interactive"}, diff --git a/commands/fs/rmdir.go b/commands/fs/rmdir.go index 6f6859e..8571475 100644 --- a/commands/fs/rmdir.go +++ b/commands/fs/rmdir.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rmdir", Description: "Remove directories", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Remove each directory of path"}, }, }) diff --git a/commands/fs/stow.go b/commands/fs/stow.go index 358bb31..efb597b 100644 --- a/commands/fs/stow.go +++ b/commands/fs/stow.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "stow", Description: "Manage farms of symbolic links", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "Set the target directory to 'DIR' instead of the parent of the stow directory"}, {Name: "-v", Description: "Ignore files ending in this Perl regex"}, {Name: "--defer", Description: "Show Stow version, and exit"}, diff --git a/commands/fs/tar.go b/commands/fs/tar.go index 8aa1bc2..021cf5d 100644 --- a/commands/fs/tar.go +++ b/commands/fs/tar.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tar", Description: "Use archive file or device ARCHIVE", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "A", Description: "Append archive to the end of another archive"}, {Name: "c", Description: "Create a new archive"}, {Name: "b", Description: "Set record size to BLOCKSx512 bytes"}, @@ -41,7 +41,7 @@ func init() { {Name: "bad-dumpdir", Description: "\\"}, {Name: "?", Description: "Display a short option summary and exit"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--force-local", Description: "Archive file is local even if it has a colon"}, {Name: "--rmt-command", Description: "Use COMMAND instead of rmt when accessing remote archives"}, {Name: "--rsh-command", Description: "Use COMMAND instead of rsh when accessing remote archives"}, diff --git a/commands/fs/touch.go b/commands/fs/touch.go index 66002d9..957e439 100644 --- a/commands/fs/touch.go +++ b/commands/fs/touch.go @@ -1,13 +1,13 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "touch", Description: "create or update file timestamp", - Generator: core.FileGenerator(), + Generator: spec.FileGenerator(), }) } diff --git a/commands/fs/trash.go b/commands/fs/trash.go index e49dc1e..2da783d 100644 --- a/commands/fs/trash.go +++ b/commands/fs/trash.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "trash", Description: "Trash, move files/folders to the trash", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Print verbose output while moving items"}, {Name: "-F", Description: "Use the Finder API to move items to the trash"}, {Name: "-l", Description: "List items in the trash"}, diff --git a/commands/fs/tree.go b/commands/fs/tree.go index c60755f..2bfcc04 100644 --- a/commands/fs/tree.go +++ b/commands/fs/tree.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tree", Description: "Display directories as trees (with optional color/HTML output)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "All files are listed"}, {Name: "-d", Description: "List directories only"}, {Name: "-l", Description: "Follow symbolic links like directories"}, diff --git a/commands/fs/unzip.go b/commands/fs/unzip.go index 46621c3..2c10c85 100644 --- a/commands/fs/unzip.go +++ b/commands/fs/unzip.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "unzip", Description: "Extract compressed files in a ZIP archive", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "List the contents of a zip file without extracting"}, }, }) diff --git a/commands/fs/zip.go b/commands/fs/zip.go index f17ef71..c3655e3 100644 --- a/commands/fs/zip.go +++ b/commands/fs/zip.go @@ -1,14 +1,14 @@ package fs import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zip", Description: "Package and compress (archive) files into zip file", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-r", Description: "Package and compress a directory and its contents, recursively"}, {Name: "-e", Description: "Archive a directory and its contents with the highest level [9] of compression"}, }, diff --git a/commands/fs/zoxide.go b/commands/fs/zoxide.go index 8149366..e2fc818 100644 --- a/commands/fs/zoxide.go +++ b/commands/fs/zoxide.go @@ -12,17 +12,17 @@ import ( "strings" "github.com/versenilvis/fuzzy" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "z", Description: "jump to directory", MaxArgs: 0, Generator: ZoxideGenerator(), }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zi", Description: "jump to directory interactively", MaxArgs: 0, @@ -30,12 +30,12 @@ func init() { }) } -func ZoxideGenerator() core.GeneratorFunc { - return func(tokens []string, prefix string, partial string) []core.Suggestion { +func ZoxideGenerator() spec.GeneratorFunc { + return func(tokens []string, prefix string, partial string) []spec.Suggestion { fullQuery := strings.Join(tokens[1:], " ") - localSuggestions := core.FileGenerator("/")(tokens, prefix, fullQuery) + localSuggestions := spec.FileGenerator("/")(tokens, prefix, fullQuery) - var zoxideSuggestions []core.Suggestion + var zoxideSuggestions []spec.Suggestion cmd := exec.CommandContext(context.Background(), "zoxide", "query", "-l") out, err := cmd.Output() if err == nil { @@ -55,7 +55,7 @@ func ZoxideGenerator() core.GeneratorFunc { for i := 0; i < limit; i++ { path := dirs[i] display := strings.Replace(path, home, "~", 1) - zoxideSuggestions = append(zoxideSuggestions, core.Suggestion{ + zoxideSuggestions = append(zoxideSuggestions, spec.Suggestion{ Cmd: path, Desc: display, }) @@ -66,7 +66,7 @@ func ZoxideGenerator() core.GeneratorFunc { for _, m := range matches { path := m.Str display := strings.Replace(path, home, "~", 1) - zoxideSuggestions = append(zoxideSuggestions, core.Suggestion{ + zoxideSuggestions = append(zoxideSuggestions, spec.Suggestion{ Cmd: path, Desc: display, }) @@ -74,7 +74,7 @@ func ZoxideGenerator() core.GeneratorFunc { } } - var finalResults []core.Suggestion + var finalResults []spec.Suggestion seen := make(map[string]bool) finalResults = append(finalResults, localSuggestions...) diff --git a/commands/git/ghq.go b/commands/git/ghq.go index 1eab25d..429a4cd 100644 --- a/commands/git/ghq.go +++ b/commands/git/ghq.go @@ -1,20 +1,20 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ghq", Description: "Clone/sync with a remote repository", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "get", Description: "Clone/sync with a remote repository"}, {Name: "list", Description: "List local repositories"}, {Name: "root", Description: "Show repositories' root"}, {Name: "create", Description: "Create a new repository"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-u", Description: "Update local repository if cloned already (default: false)"}, {Name: "-p", Description: "Clone with SSH (default: false)"}, {Name: "--shallow", Description: "Do a shallow clone (default: false)"}, diff --git a/commands/git/git.go b/commands/git/git.go index f03416a..c880482 100644 --- a/commands/git/git.go +++ b/commands/git/git.go @@ -6,23 +6,23 @@ import ( "strings" "time" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func GitRemoteGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func GitRemoteGenerator(tokens []string, _ string, _ string) []spec.Suggestion { return getGitResults(tokens, "remote") } -func GitStashGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func GitStashGenerator(tokens []string, _ string, _ string) []spec.Suggestion { return getGitResults(tokens, "stash", "list", "--format=%gd: %gs") } -func GitTagGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func GitTagGenerator(tokens []string, _ string, _ string) []spec.Suggestion { return getGitResults(tokens, "tag", "-l") } -func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion { - cwd := core.GetCWD() +func GitCommitGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + cwd := spec.GetCWD() ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -33,7 +33,7 @@ func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion { return nil } - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { @@ -45,17 +45,17 @@ func GitCommitGenerator(tokens []string, _ string, _ string) []core.Suggestion { if len(parts) == 2 { desc = parts[1] } - results = append(results, core.Suggestion{Cmd: hash, Desc: desc}) + results = append(results, spec.Suggestion{Cmd: hash, Desc: desc}) } return results } -func getGitResults(tokens []string, args ...string) []core.Suggestion { +func getGitResults(tokens []string, args ...string) []spec.Suggestion { return getGitResultsFiltered(tokens, false, args...) } -func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []core.Suggestion { - cwd := core.GetCWD() +func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []spec.Suggestion { + cwd := spec.GetCWD() ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -78,7 +78,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co seen := make(map[string]bool) lines := strings.Split(string(out), "\n") - var results []core.Suggestion + var results []spec.Suggestion // find the subcommand by skipping global flags that take arguments subcommand := "" @@ -146,7 +146,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co } } - results = append(results, core.Suggestion{ + results = append(results, spec.Suggestion{ Cmd: suggestionCmd, Desc: suggestionDesc, }) @@ -166,7 +166,7 @@ func getGitResultsFiltered(tokens []string, localOnly bool, args ...string) []co } // GitBranchGenerator suggests git branches (local + remote, deduped) -func GitBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func GitBranchGenerator(tokens []string, _ string, _ string) []spec.Suggestion { // check if we are in "create" mode (-b or -B or -c) isCreateMode := false for _, t := range tokens { @@ -185,7 +185,7 @@ func GitBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion { // gitLocalBranchGenerator is like GitBranchGenerator but only local branches // used for push/pull where remote tracking branches cause duplicates -func gitLocalBranchGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func gitLocalBranchGenerator(tokens []string, _ string, _ string) []spec.Suggestion { isCreateMode := false for _, t := range tokens { if t == "-b" || t == "-B" || t == "-c" || t == "-C" { @@ -199,7 +199,7 @@ func gitLocalBranchGenerator(tokens []string, _ string, _ string) []core.Suggest return getGitResultsFiltered(tokens, true, "branch", "-a", "--format=%(refname:short)") } -func GitPushPullGenerator(tokens []string, prefix string, partial string) []core.Suggestion { +func GitPushPullGenerator(tokens []string, prefix string, partial string) []spec.Suggestion { // count completed positional args (not flags, not the partial being typed) // tokens[0] = "git", tokens[1] = "push"/"pull", so start at 2 // exclude tokens[len-1] because that's the partial being typed @@ -225,18 +225,18 @@ func GitPushPullGenerator(tokens []string, prefix string, partial string) []core } func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "git", Description: "version control", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "print version"}, {Name: "--help", Description: "show help"}, }, - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ { Name: "init", Description: "create empty repo", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--bare", Description: "create bare repo"}, {Name: "-b", Description: "initial branch name"}, }, @@ -244,7 +244,7 @@ func init() { { Name: "clone", Description: "clone a repository", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--depth", Description: "shallow clone depth"}, {Name: "--branch", Description: "specific branch"}, {Name: "--bare", Description: "clone as bare"}, @@ -253,7 +253,7 @@ func init() { { Name: "status", Description: "show working tree", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-s", Description: "short format"}, {Name: "--porcelain", Description: "machine format"}, }, @@ -261,8 +261,8 @@ func init() { { Name: "add", Description: "stage changes", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-A", Description: "add all files"}, {Name: "-p", Description: "interactive patch"}, {Name: ".", Description: "add current dir"}, @@ -271,7 +271,7 @@ func init() { { Name: "commit", Description: "record changes", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-m", Description: "commit message"}, {Name: "-a", Description: "auto stage tracked"}, {Name: "--amend", Description: "amend last commit"}, @@ -282,7 +282,7 @@ func init() { Name: "push", Description: "update remote refs", Generator: GitPushPullGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-u", Description: "set upstream"}, {Name: "--force", Description: "force push"}, {Name: "--tags", Description: "push tags"}, @@ -292,7 +292,7 @@ func init() { Name: "pull", Description: "fetch and merge", Generator: GitPushPullGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--rebase", Description: "rebase on pull"}, }, }, @@ -300,7 +300,7 @@ func init() { Name: "fetch", Description: "download objects", Generator: GitRemoteGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--all", Description: "fetch all remotes"}, {Name: "--prune", Description: "remove stale refs"}, }, @@ -308,17 +308,17 @@ func init() { { Name: "checkout", Description: "switch branches", - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { for _, t := range tokens { if t == "-b" || t == "-B" { return nil } } branches := GitBranchGenerator(tokens, prefix, partial) - files := core.FileGenerator()(tokens, prefix, partial) + files := spec.FileGenerator()(tokens, prefix, partial) return append(branches, files...) }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-b", Description: "create new branch"}, }, }, @@ -326,7 +326,7 @@ func init() { Name: "switch", Description: "switch branches", Generator: GitBranchGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "create and switch"}, }, }, @@ -334,7 +334,7 @@ func init() { Name: "branch", Description: "manage branches", Generator: GitBranchGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "delete branch"}, {Name: "-D", Description: "force delete"}, {Name: "-a", Description: "list all"}, @@ -345,7 +345,7 @@ func init() { Name: "merge", Description: "join branches", Generator: GitBranchGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-ff", Description: "no fast forward"}, {Name: "--squash", Description: "squash commits"}, {Name: "--abort", Description: "abort merge"}, @@ -355,7 +355,7 @@ func init() { Name: "rebase", Description: "reapply commits", Generator: GitBranchGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "interactive"}, {Name: "--onto", Description: "rebase onto"}, {Name: "--abort", Description: "abort rebase"}, @@ -365,8 +365,8 @@ func init() { { Name: "log", Description: "show commit log", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "--oneline", Description: "compact format"}, {Name: "--graph", Description: "show graph"}, {Name: "-n", Description: "limit count"}, @@ -375,8 +375,8 @@ func init() { { Name: "diff", Description: "show changes", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "--staged", Description: "staged changes"}, {Name: "--stat", Description: "diffstat only"}, {Name: "--", Description: "separate paths"}, @@ -386,7 +386,7 @@ func init() { Name: "tag", Description: "manage tags", Generator: GitTagGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "annotated tag"}, {Name: "-d", Description: "delete tag"}, {Name: "-l", Description: "list tags"}, @@ -397,12 +397,12 @@ func init() { { Name: "show", Description: "show object", - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { tags := GitTagGenerator(tokens, prefix, partial) commits := GitCommitGenerator(tokens, prefix, partial) return append(tags, commits...) }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--stat", Description: "diffstat only"}, {Name: "--name-only", Description: "filenames only"}, }, @@ -411,7 +411,7 @@ func init() { Name: "revert", Description: "revert a commit", Generator: GitCommitGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-commit", Description: "no auto commit"}, {Name: "--abort", Description: "abort revert"}, {Name: "--continue", Description: "continue revert"}, @@ -420,12 +420,12 @@ func init() { { Name: "reset", Description: "reset HEAD", - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { branches := GitBranchGenerator(tokens, prefix, partial) - files := core.FileGenerator()(tokens, prefix, partial) + files := spec.FileGenerator()(tokens, prefix, partial) return append(branches, files...) }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--hard", Description: "discard changes"}, {Name: "--soft", Description: "keep staged"}, {Name: "--mixed", Description: "unstage changes"}, @@ -434,8 +434,8 @@ func init() { { Name: "restore", Description: "restore working tree files", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-s", Description: "source tree"}, {Name: "-W", Description: "working tree"}, }, @@ -443,8 +443,8 @@ func init() { { Name: "rm", Description: "remove files", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-f", Description: "force"}, {Name: "-r", Description: "recursive"}, {Name: "--cached", Description: "unstage only"}, @@ -453,8 +453,8 @@ func init() { { Name: "stash", Description: "stash changes", - Subcommands: []core.Subcommand{ - {Name: "pop", Description: "apply and drop", Generator: GitStashGenerator, Options: []core.Option{{Name: "--index", Description: "try to reinstate index"}}}, + Subcommands: []spec.Subcommand{ + {Name: "pop", Description: "apply and drop", Generator: GitStashGenerator, Options: []spec.Option{{Name: "--index", Description: "try to reinstate index"}}}, {Name: "apply", Description: "apply stash", Generator: GitStashGenerator}, {Name: "drop", Description: "remove stash", Generator: GitStashGenerator}, {Name: "list", Description: "list stashes"}, @@ -466,8 +466,8 @@ func init() { { Name: "remote", Description: "manage remotes", - Subcommands: []core.Subcommand{ - {Name: "add", Description: "add remote", Options: []core.Option{{Name: "-f", Description: "fetch immediately"}}}, + Subcommands: []spec.Subcommand{ + {Name: "add", Description: "add remote", Options: []spec.Option{{Name: "-f", Description: "fetch immediately"}}}, {Name: "remove", Description: "remove remote", Generator: GitRemoteGenerator}, {Name: "rename", Description: "rename remote", Generator: GitRemoteGenerator}, {Name: "set-url", Description: "change remote url", Generator: GitRemoteGenerator}, @@ -478,7 +478,7 @@ func init() { Name: "cherry-pick", Description: "apply commit", Generator: GitCommitGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-commit", Description: "no auto commit"}, {Name: "--abort", Description: "abort pick"}, {Name: "--continue", Description: "continue pick"}, @@ -487,8 +487,8 @@ func init() { { Name: "worktree", Description: "manage worktrees", - Subcommands: []core.Subcommand{ - {Name: "add", Description: "add new worktree", Generator: core.FileGenerator("/")}, + Subcommands: []spec.Subcommand{ + {Name: "add", Description: "add new worktree", Generator: spec.FileGenerator("/")}, {Name: "list", Description: "list worktrees"}, {Name: "remove", Description: "remove worktree"}, {Name: "prune", Description: "prune stale worktrees"}, @@ -497,10 +497,10 @@ func init() { { Name: "submodule", Description: "manage submodules", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "add submodule"}, {Name: "init", Description: "init submodule config"}, - {Name: "update", Description: "update submodules", Options: []core.Option{{Name: "--init", Description: "init if needed"}, {Name: "--recursive", Description: "recursive update"}}}, + {Name: "update", Description: "update submodules", Options: []spec.Option{{Name: "--init", Description: "init if needed"}, {Name: "--recursive", Description: "recursive update"}}}, {Name: "status", Description: "show submodule status"}, {Name: "foreach", Description: "run command in each submodule"}, }, @@ -508,7 +508,7 @@ func init() { { Name: "bisect", Description: "binary search bug", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "start", Description: "start bisect"}, {Name: "good", Description: "mark good"}, {Name: "bad", Description: "mark bad"}, diff --git a/commands/git/git_cliff.go b/commands/git/git_cliff.go index 023bca3..c7a13e5 100644 --- a/commands/git/git_cliff.go +++ b/commands/git/git_cliff.go @@ -1,14 +1,14 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "git-cliff", Description: "Increases the logging verbosity", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--verbose", Description: "Increases the logging verbosity"}, {Name: "--init", Description: "Writes the default configuration file to cliff.toml"}, {Name: "--latest", Description: "Processes the commits starting from the latest tag"}, diff --git a/commands/git/git_flow.go b/commands/git/git_flow.go index e0ba640..626e10a 100644 --- a/commands/git/git_flow.go +++ b/commands/git/git_flow.go @@ -1,14 +1,14 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "git-flow", Description: "Git extensions to provide high-level repository operations for Vincent Driessen's branching model", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize a new git repo with support for the branching model"}, {Name: "feature", Description: "List all feature branches"}, {Name: "start", Description: "Create a new feature branch"}, @@ -21,7 +21,7 @@ func init() { {Name: "hotfix", Description: "List all hotfix branches"}, {Name: "support", Description: "List all support branches"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Use default branch naming conventions"}, {Name: "-f", Description: "Force setting of gitflow branches, even if already configured"}, }, diff --git a/commands/git/git_profile.go b/commands/git/git_profile.go index 2b163ec..f89b323 100644 --- a/commands/git/git_profile.go +++ b/commands/git/git_profile.go @@ -1,18 +1,18 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "git-profile", Description: "Use profile", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "use", Description: "Use a profile"}, {Name: "profile", Description: "Profile you want to apply in this repository"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Help for git-profile script"}, }, }) diff --git a/commands/git/git_quick_stats.go b/commands/git/git_quick_stats.go index f7e2cf5..fbcf81d 100644 --- a/commands/git/git_quick_stats.go +++ b/commands/git/git_quick_stats.go @@ -1,14 +1,14 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "git-quick-stats", Description: "Show help for git-quick-stats", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for git-quick-stats"}, {Name: "--suggest-reviewers", Description: "Show the best people to contact to review code"}, {Name: "--detailed-git-stats", Description: "Give a detailed list of git stats"}, diff --git a/commands/git/github.go b/commands/git/github.go index 30be086..ab86d43 100644 --- a/commands/git/github.go +++ b/commands/git/github.go @@ -1,19 +1,19 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "github", Description: "Open a git repository in GitHub Desktop", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "clone", Description: "Clone a repository"}, {Name: "open", Description: "Open a git repository in GitHub Desktop"}, {Name: "help", Description: "Show the help page for a command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show the help page for a command"}, {Name: "--branch", Description: "The branch to checkout after cloning"}, }, diff --git a/commands/git/svn.go b/commands/git/svn.go index 52b36cc..df3d92f 100644 --- a/commands/git/svn.go +++ b/commands/git/svn.go @@ -1,14 +1,14 @@ package git import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "svn", Description: "Specify a username ARG", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Show help for svn"}, {Name: "subcommand", Description: "Help about specific subcommand"}, {Name: "status", Description: "Show the working tree status"}, @@ -17,7 +17,7 @@ func init() { {Name: "repository", Description: "The repository you want to checkout"}, {Name: "commit", Description: "Commit to a repository"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--password", Description: "Specify a password ARG"}, {Name: "--password-from-stdin", Description: "Read password from stdin"}, {Name: "--no-auth-cache", Description: "Do not cache authentication tokens"}, diff --git a/commands/golang/go.go b/commands/golang/go.go index 8a43033..36591ba 100644 --- a/commands/golang/go.go +++ b/commands/golang/go.go @@ -1,11 +1,11 @@ package golang import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - globalBuildOptions := []core.Option{ + globalBuildOptions := []spec.Option{ {Name: "-v", Description: "print package names"}, {Name: "-n", Description: "print commands but do not run"}, {Name: "-x", Description: "print commands as they run"}, @@ -22,7 +22,7 @@ func init() { {Name: "-a", Description: "force rebuilding of up-to-date packages"}, } - buildModeSubcommands := []core.Subcommand{ + buildModeSubcommands := []spec.Subcommand{ {Name: "archive", Description: "build non-main packages into .a files"}, {Name: "c-archive", Description: "build main package into C archive"}, {Name: "c-shared", Description: "build main package into C shared library"}, @@ -32,21 +32,21 @@ func init() { {Name: "shared", Description: "combine packages into single shared library"}, } - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "go", Description: "tool for managing Go source code", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ { Name: "build", Description: "compile packages and dependencies", MaxArgs: 1, - Generator: core.FileGenerator(".go"), + Generator: spec.FileGenerator(".go"), Options: append(globalBuildOptions, - core.Option{Name: ".", Description: "current package"}, - core.Option{Name: "./...", Description: "all packages"}, - core.Option{Name: "-o", Description: "output file or directory"}, - core.Option{Name: "-i", Description: "install dependency packages"}, - core.Option{Name: "-buildmode", Description: "build mode to use"}, + spec.Option{Name: ".", Description: "current package"}, + spec.Option{Name: "./...", Description: "all packages"}, + spec.Option{Name: "-o", Description: "output file or directory"}, + spec.Option{Name: "-i", Description: "install dependency packages"}, + spec.Option{Name: "-buildmode", Description: "build mode to use"}, ), Subcommands: buildModeSubcommands, }, @@ -54,32 +54,32 @@ func init() { Name: "run", Description: "compile and run Go program", MaxArgs: 1, - Generator: core.FileGenerator(".go"), + Generator: spec.FileGenerator(".go"), Options: append(globalBuildOptions, - core.Option{Name: ".", Description: "current package"}, - core.Option{Name: "-exec", Description: "invoke binary using xprog"}, + spec.Option{Name: ".", Description: "current package"}, + spec.Option{Name: "-exec", Description: "invoke binary using xprog"}, ), }, { Name: "test", Description: "test packages", MaxArgs: 1, - Generator: core.FileGenerator(".go"), + Generator: spec.FileGenerator(".go"), Options: append(globalBuildOptions, - core.Option{Name: ".", Description: "current package"}, - core.Option{Name: "./...", Description: "all packages"}, - core.Option{Name: "-c", Description: "compile test binary but do not run"}, - core.Option{Name: "-i", Description: "install test dependencies"}, - core.Option{Name: "-json", Description: "convert output to JSON"}, - core.Option{Name: "-bench", Description: "run benchmarks"}, - core.Option{Name: "-run", Description: "run specific test regex"}, - core.Option{Name: "-cover", Description: "enable coverage report"}, + spec.Option{Name: ".", Description: "current package"}, + spec.Option{Name: "./...", Description: "all packages"}, + spec.Option{Name: "-c", Description: "compile test binary but do not run"}, + spec.Option{Name: "-i", Description: "install test dependencies"}, + spec.Option{Name: "-json", Description: "convert output to JSON"}, + spec.Option{Name: "-bench", Description: "run benchmarks"}, + spec.Option{Name: "-run", Description: "run specific test regex"}, + spec.Option{Name: "-cover", Description: "enable coverage report"}, ), }, { Name: "mod", Description: "module maintenance", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "initialize new module"}, {Name: "tidy", Description: "add missing and remove unused modules"}, {Name: "download", Description: "download modules to local cache"}, @@ -94,9 +94,9 @@ func init() { Name: "get", Description: "add dependencies to current module and install them", Options: append(globalBuildOptions, - core.Option{Name: "-u", Description: "update to newer minor/patch releases"}, - core.Option{Name: "-t", Description: "download modules needed for tests"}, - core.Option{Name: "-d", Description: "only download, do not install"}, + spec.Option{Name: "-u", Description: "update to newer minor/patch releases"}, + spec.Option{Name: "-t", Description: "download modules needed for tests"}, + spec.Option{Name: "-d", Description: "only download, do not install"}, ), }, { @@ -108,16 +108,16 @@ func init() { Name: "list", Description: "list packages or modules", Options: append(globalBuildOptions, - core.Option{Name: "-m", Description: "list modules instead of packages"}, - core.Option{Name: "-u", Description: "add upgrade information"}, - core.Option{Name: "-json", Description: "print in JSON format"}, - core.Option{Name: "-f", Description: "specify alternate format"}, + spec.Option{Name: "-m", Description: "list modules instead of packages"}, + spec.Option{Name: "-u", Description: "add upgrade information"}, + spec.Option{Name: "-json", Description: "print in JSON format"}, + spec.Option{Name: "-f", Description: "specify alternate format"}, ), }, { Name: "fmt", Description: "gofmt (reformat) package sources", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "print commands that would be executed"}, {Name: "-x", Description: "print commands as they are executed"}, }, @@ -130,7 +130,7 @@ func init() { { Name: "env", Description: "print Go environment information", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-json", Description: "print environment in JSON format"}, {Name: "-u", Description: "unset named environment variables"}, {Name: "-w", Description: "change default settings of environment variables"}, @@ -139,7 +139,7 @@ func init() { { Name: "version", Description: "print Go version", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-m", Description: "print embedded module version info"}, {Name: "-v", Description: "report unrecognized files"}, }, @@ -148,22 +148,22 @@ func init() { Name: "clean", Description: "remove object files and cached files", Options: append(globalBuildOptions, - core.Option{Name: "-i", Description: "remove installed archive or binary"}, - core.Option{Name: "-cache", Description: "remove entire go build cache"}, - core.Option{Name: "-modcache", Description: "remove entire module cache"}, + spec.Option{Name: "-i", Description: "remove installed archive or binary"}, + spec.Option{Name: "-cache", Description: "remove entire go build cache"}, + spec.Option{Name: "-modcache", Description: "remove entire module cache"}, ), }, { Name: "tool", Description: "run specified go tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "print command but do not execute"}, }, }, { Name: "work", Description: "workspace maintenance", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "initialize workspace file"}, {Name: "edit", Description: "edit go.work from tools or scripts"}, {Name: "sync", Description: "sync workspace build list to modules"}, @@ -173,7 +173,7 @@ func init() { { Name: "doc", Description: "show documentation for package or symbol", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-all", Description: "show all documentation"}, {Name: "-cmd", Description: "treat package main like regular package"}, {Name: "-src", Description: "show full source code"}, diff --git a/commands/golang/goctl.go b/commands/golang/goctl.go index d1412b8..3dee8a6 100644 --- a/commands/golang/goctl.go +++ b/commands/golang/goctl.go @@ -1,14 +1,14 @@ package golang import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "goctl", Description: "A cli tool to generate go-zero code", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "api", Description: "Generate api related files"}, {Name: "dart", Description: "Generate dart files for provided api in api file"}, {Name: "doc", Description: "Generate doc files"}, @@ -50,7 +50,7 @@ func init() { {Name: "upgrade", Description: "Upgrade goctl to latest version"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--api", Description: "The api file"}, {Name: "--dir", Description: "The target dir"}, {Name: "--hostname", Description: "Hostname of the server"}, diff --git a/commands/golang/goreleaser.go b/commands/golang/goreleaser.go index 1443b45..352ec79 100644 --- a/commands/golang/goreleaser.go +++ b/commands/golang/goreleaser.go @@ -1,14 +1,14 @@ package golang import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "goreleaser", Description: "Deliver Go binaries as fast and easily as possible", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "b", Description: "Builds the current project"}, {Name: "c", Description: "Checks if configuration is valid"}, {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, @@ -22,7 +22,7 @@ func init() { {Name: "r", Description: "Releases the current project"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--clean", Description: "Remove the dist folder before building"}, {Name: "--config", Description: "Load configuration from file"}, {Name: "--deprecated", Description: "Force print the deprecation message - tests only"}, diff --git a/commands/js/asar.go b/commands/js/asar.go index 8c58827..71cd9bf 100644 --- a/commands/js/asar.go +++ b/commands/js/asar.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "asar", Description: "A simple extensive tar-like archive format with indexing", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "pack", Description: "Create asar archive"}, {Name: "directory", Description: "The directory you want to archive"}, {Name: "output", Description: "The name of the output file"}, @@ -18,7 +18,7 @@ func init() { {Name: "filename", Description: "The name of the file you want to extract"}, {Name: "extract", Description: "Extract archive"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for asar"}, {Name: "--V", Description: "Output the version number"}, }, diff --git a/commands/js/astro.go b/commands/js/astro.go index 94c0b67..81e495d 100644 --- a/commands/js/astro.go +++ b/commands/js/astro.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "astro", Description: "Add an integration", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add an integration"}, {Name: "build", Description: "Build your project and write it to disk"}, {Name: "check", Description: "Check your project for errors"}, @@ -21,7 +21,7 @@ func init() { {Name: "disable", Description: "Disable anonymous data collection"}, {Name: "reset", Description: "Reset anonymous data collection settings"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--yes", Description: "Accept all prompts"}, {Name: "--drafts", Description: "Include Markdown draft pages in the build"}, {Name: "--watch", Description: "Watch Astro files for changes and re-run checks"}, diff --git a/commands/js/babel.go b/commands/js/babel.go index 5a2163e..f6e3d37 100644 --- a/commands/js/babel.go +++ b/commands/js/babel.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "babel", Description: "A comma-separated list of preset names", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "A comma-separated list of preset names"}, {Name: "--plugins", Description: "A comma-separated list of plugin names"}, {Name: "--config-file", Description: "Path to a .babelrc file to use"}, diff --git a/commands/js/blitz.go b/commands/js/blitz.go index 625fc53..488007c 100644 --- a/commands/js/blitz.go +++ b/commands/js/blitz.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "blitz", Description: "Show help for command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Creates a production build"}, {Name: "codegen", Description: "Generates Routes Manifest"}, {Name: "console", Description: "Run the Blitz console REPL"}, @@ -28,7 +28,7 @@ func init() { {Name: "autocomplete", Description: "Display autocomplete installation instructions"}, {Name: "shell", Description: "Shell type"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for command"}, {Name: "-p", Description: "Set port number"}, {Name: "-H", Description: "Set server hostname"}, diff --git a/commands/js/browser_sync.go b/commands/js/browser_sync.go index 5038305..c58efaf 100644 --- a/commands/js/browser_sync.go +++ b/commands/js/browser_sync.go @@ -1,21 +1,21 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "browser-sync", Description: "Keep multiple browsers & devices in sync when building websites", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "start", Description: "Start Browsersync"}, {Name: "init", Description: "Create a configuration file"}, {Name: "reload", Description: "Send a reload event over HTTP protocol"}, {Name: "recipe", Description: "Generate the files for a recipe"}, {Name: "ls", Description: "List recipes"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Show version number"}, {Name: "--help", Description: "Show help"}, {Name: "-s", Description: "Run a Local server (uses your cwd as the web root)"}, diff --git a/commands/js/build_storybook.go b/commands/js/build_storybook.go index e301299..e4d333f 100644 --- a/commands/js/build_storybook.go +++ b/commands/js/build_storybook.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "build-storybook", Description: "Storybook build CLI tools", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-o", Description: "Directory where to store built files"}, {Name: "-w", Description: "Enables watch mode"}, {Name: "--loglevel", Description: "Controls level of logging during build"}, diff --git a/commands/js/bun.go b/commands/js/bun.go index faeaa4d..55bf41c 100644 --- a/commands/js/bun.go +++ b/commands/js/bun.go @@ -1,21 +1,21 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bun", Description: "bun js runtime", - Subcommands: []core.Subcommand{ - {Name: "install", Description: "install packages", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "install", Description: "install packages", Options: []spec.Option{ {Name: "--frozen-lockfile", Description: "no lockfile update"}, {Name: "--production", Description: "production only"}, {Name: "--no-save", Description: "don't update package.json"}, {Name: "--dry-run", Description: "print what would be installed"}, }}, - {Name: "add", Description: "add package", Options: []core.Option{ + {Name: "add", Description: "add package", Options: []spec.Option{ {Name: "-d", Description: "dev dependency"}, {Name: "--dev", Description: "dev dependency (long form)"}, {Name: "--optional", Description: "optional dependency"}, @@ -24,17 +24,17 @@ func init() { {Name: "--exact", Description: "exact version"}, {Name: "--no-save", Description: "don't update package.json"}, }}, - {Name: "remove", Description: "remove package", Options: []core.Option{ + {Name: "remove", Description: "remove package", Options: []spec.Option{ {Name: "-g", Description: "remove global package"}, }}, - {Name: "run", Description: "run script", Generator: NpmScriptGenerator, Options: []core.Option{ + {Name: "run", Description: "run script", Generator: NpmScriptGenerator, Options: []spec.Option{ {Name: "--silent", Description: "suppress output"}, {Name: "--bun", Description: "force bun runtime"}, {Name: "--watch", Description: "watch mode"}, {Name: "--hot", Description: "hot reload"}, {Name: "--smol", Description: "reduce memory usage"}, }}, - {Name: "build", Description: "bundle files", Generator: core.FileGenerator(".ts", ".tsx", ".js", ".jsx"), Options: []core.Option{ + {Name: "build", Description: "bundle files", Generator: spec.FileGenerator(".ts", ".tsx", ".js", ".jsx"), Options: []spec.Option{ {Name: "--outdir", Description: "output directory"}, {Name: "--outfile", Description: "output file"}, {Name: "--minify", Description: "enable all minification"}, @@ -54,7 +54,7 @@ func init() { {Name: "--loader", Description: "set file loader"}, {Name: "--public-path", Description: "prefix for public assets"}, }}, - {Name: "test", Description: "run tests", Options: []core.Option{ + {Name: "test", Description: "run tests", Options: []spec.Option{ {Name: "--watch", Description: "watch mode"}, {Name: "-t", Description: "filter by test name"}, {Name: "--coverage", Description: "collect coverage"}, @@ -65,20 +65,20 @@ func init() { {Name: "--todo", Description: "show todo tests"}, {Name: "--reporter", Description: "test reporter (default/junit/tap)"}, }}, - {Name: "x", Description: "execute package (bunx)", Options: []core.Option{ + {Name: "x", Description: "execute package (bunx)", Options: []spec.Option{ {Name: "--bun", Description: "force bun runtime"}, {Name: "--silent", Description: "suppress output"}, }}, {Name: "outdated", Description: "check outdated packages"}, - {Name: "patch", Description: "patch a package", Options: []core.Option{ + {Name: "patch", Description: "patch a package", Options: []spec.Option{ {Name: "--commit", Description: "commit the patch"}, }}, - {Name: "publish", Description: "publish package to npm", Options: []core.Option{ + {Name: "publish", Description: "publish package to npm", Options: []spec.Option{ {Name: "--dry-run", Description: "simulate publish"}, {Name: "--tag", Description: "dist-tag"}, {Name: "--access", Description: "public or restricted"}, }}, - {Name: "init", Description: "create new project", Options: []core.Option{ + {Name: "init", Description: "create new project", Options: []spec.Option{ {Name: "-y", Description: "skip prompts"}, }}, {Name: "create", Description: "create from template"}, @@ -86,7 +86,7 @@ func init() { {Name: "upgrade", Description: "upgrade bun"}, {Name: "link", Description: "link package"}, {Name: "unlink", Description: "unlink package"}, - {Name: "pm", Description: "package manager helpers", Subcommands: []core.Subcommand{ + {Name: "pm", Description: "package manager helpers", Subcommands: []spec.Subcommand{ {Name: "cache", Description: "show cache path"}, {Name: "ls", Description: "list packages"}, {Name: "hash", Description: "print lockfile hash"}, @@ -95,7 +95,7 @@ func init() { {Name: "untrusted", Description: "show untrusted packages"}, }}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--watch", Description: "watch for changes"}, {Name: "--hot", Description: "hot module reload"}, {Name: "--smol", Description: "reduce memory usage"}, @@ -105,10 +105,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bunx", Description: "execute package (bun x)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--bun", Description: "force bun runtime"}, {Name: "--silent", Description: "suppress output"}, }, diff --git a/commands/js/cordova.go b/commands/js/cordova.go index 719ce05..72a8383 100644 --- a/commands/js/cordova.go +++ b/commands/js/cordova.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cordova", Description: "Print out the version of your cordova-cli install", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "create", Description: "Create a project"}, {Name: "help", Description: "Get help for a command"}, {Name: "telemetry", Description: "Turn telemetry collection on or off"}, @@ -35,7 +35,7 @@ func init() { {Name: "serve", Description: "Run project with a local webserver (including prepare)"}, {Name: "port", Description: "Port to use for local web server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Print out the version of your cordova-cli install"}, {Name: "--no-update-notifier", Description: "Will disable updates check"}, {Name: "--nohooks", Description: "Suppress executing hooks (taking RegExp hook patterns as parameters)"}, diff --git a/commands/js/create_completion_spec.go b/commands/js/create_completion_spec.go index 9cc8a8f..d5cd369 100644 --- a/commands/js/create_completion_spec.go +++ b/commands/js/create_completion_spec.go @@ -1,17 +1,17 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-completion-spec", Description: "Setup fig folder and create spec with the given name", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--here", Description: "Set if the spec should be created in the current folder"}, {Name: "-h", Description: "Display help for command"}, }, diff --git a/commands/js/create_next_app.go b/commands/js/create_next_app.go index 9e7811f..6e3bc6c 100644 --- a/commands/js/create_next_app.go +++ b/commands/js/create_next_app.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-next-app", Description: "Output the version number", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-V", Description: "Output the version number"}, {Name: "--ts", Description: "Initialize as a TypeScript project"}, {Name: "--use-npm", Description: "Explicitly tell the CLI to bootstrap the app using npm"}, diff --git a/commands/js/create_nx_workspace.go b/commands/js/create_nx_workspace.go index cc9c340..31bbb11 100644 --- a/commands/js/create_nx_workspace.go +++ b/commands/js/create_nx_workspace.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-nx-workspace", Description: "The name of the workspace", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--name", Description: "Workspace name (e.g., org name)"}, {Name: "--preset", Description: "Empty [an empty workspace with a layout that works best for building apps]"}, {Name: "--appName", Description: "The name of the application created by some presets"}, diff --git a/commands/js/create_react_app.go b/commands/js/create_react_app.go index 3717791..0075e49 100644 --- a/commands/js/create_react_app.go +++ b/commands/js/create_react_app.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-react-app", Description: "Creates a new React project", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--template", Description: "Use npm to install dependencies (default when Yarn is not installed)"}, {Name: "--use-pnp", Description: "Use Yarn Plug'n'Play to create the app"}, {Name: "--scripts-version", Description: "Print additional logs"}, diff --git a/commands/js/create_react_native_app.go b/commands/js/create_react_native_app.go index ad18b20..911a4a1 100644 --- a/commands/js/create_react_native_app.go +++ b/commands/js/create_react_native_app.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-react-native-app", Description: "Creates a new React Native project", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--template", Description: "The path inside of a GitHub repo where the example lives"}, {Name: "--yes", Description: "Use the default options for creating a project"}, {Name: "--no-install", Description: "Skip installing npm packages or CocoaPods"}, diff --git a/commands/js/create_redwood_app.go b/commands/js/create_redwood_app.go index ac80ede..f39c545 100644 --- a/commands/js/create_redwood_app.go +++ b/commands/js/create_redwood_app.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-redwood-app", Description: "Name of your Redwood project", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help"}, {Name: "--typescript", Description: "Generate a TypeScript project"}, {Name: "--overwrite", Description: "Create even if target directory isn't empty"}, diff --git a/commands/js/create_remix.go b/commands/js/create_remix.go index c0b8458..d9fbeb5 100644 --- a/commands/js/create_remix.go +++ b/commands/js/create_remix.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-remix", Description: "Display help for command", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display help for command"}, {Name: "-v", Description: "Display version for command"}, }, diff --git a/commands/js/create_t3_app.go b/commands/js/create_t3_app.go index 979271d..9985217 100644 --- a/commands/js/create_t3_app.go +++ b/commands/js/create_t3_app.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-t3-app", Description: "The name of the application, as well as the name of the directory to create", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--noGit", Description: "Boolean value if we're running in CI (default: false)"}, {Name: "--tailwind", Description: "Install Tailwind CSS"}, {Name: "--nextAuth", Description: "Install NextAuth.js"}, diff --git a/commands/js/create_video.go b/commands/js/create_video.go index 4c83fb3..bd138b6 100644 --- a/commands/js/create_video.go +++ b/commands/js/create_video.go @@ -1,11 +1,11 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-video", Description: "CLI used to create remotion video project", }) diff --git a/commands/js/create_vite.go b/commands/js/create_vite.go index de50688..b413980 100644 --- a/commands/js/create_vite.go +++ b/commands/js/create_vite.go @@ -1,11 +1,11 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-vite", Description: "Create a new project powered by Vite", }) diff --git a/commands/js/create_web3_frontend.go b/commands/js/create_web3_frontend.go index 4474d2a..cad7567 100644 --- a/commands/js/create_web3_frontend.go +++ b/commands/js/create_web3_frontend.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "create-web3-frontend", Description: "Quickly create a Next.js project with wagmi and TailwindCSS ready to go", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ts", Description: "Initialize as a TypeScript project"}, {Name: "--use-npm", Description: "Explicitly tell the CLI to bootstrap the app using npm"}, {Name: "--use-pnpm", Description: "Explicitly tell the CLI to bootstrap the app using pnpm"}, diff --git a/commands/js/deno.go b/commands/js/deno.go index 9e1eb1b..d36a39b 100644 --- a/commands/js/deno.go +++ b/commands/js/deno.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "deno", Description: "A modern JavaScript and TypeScript runtime", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bench", Description: "Run benchmarks"}, {Name: "bundle", Description: "Bundle module and dependencies into single file"}, {Name: "cache", Description: "Cache the dependencies"}, @@ -34,7 +34,7 @@ func init() { {Name: "vendor", Description: "Vendor remote modules into a local directory"}, {Name: "help", Description: "Print this message or the help of the given subcommand(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--import-map", Description: "Load import map file"}, {Name: "-c", Description: "Specify the configuration file"}, {Name: "--no-check", Description: "Skip type-checking modules"}, diff --git a/commands/js/dotenv.go b/commands/js/dotenv.go index 8553d26..0f655ef 100644 --- a/commands/js/dotenv.go +++ b/commands/js/dotenv.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dotenv", Description: "Loads environment variables from .env", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "List of env files to parse"}, {Name: "-h", Description: "Display help"}, {Name: "-v", Description: "Show version"}, diff --git a/commands/js/electron.go b/commands/js/electron.go index 997d3eb..dcf620e 100644 --- a/commands/js/electron.go +++ b/commands/js/electron.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "electron", Description: "Build cross platform desktop apps with JavaScript, HTML and CSS", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Open a REPL to the main process"}, {Name: "-r", Description: "Module to preload"}, {Name: "-v", Description: "Print the version"}, diff --git a/commands/js/elm.go b/commands/js/elm.go index 2c4a390..28dafb6 100644 --- a/commands/js/elm.go +++ b/commands/js/elm.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "elm", Description: "Fig spec for the Elm language cli", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "reactor", Description: "Start an Elm development server"}, {Name: "port", Description: "The port number"}, {Name: "package", Description: "The name of the package to install"}, @@ -18,7 +18,7 @@ func init() { {Name: "bump", Description: "Bump the version of your package"}, {Name: "diff", Description: "See what changed between versions of a package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for elm init"}, {Name: "--no-colors", Description: "Turn off colors in the repl"}, {Name: "--interpreter", Description: "Path to an alternate JS interpreter, such as Node or Deno"}, diff --git a/commands/js/elm_format.go b/commands/js/elm_format.go index 35a5a4d..1e27d6b 100644 --- a/commands/js/elm_format.go +++ b/commands/js/elm_format.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "elm-format", Description: "Format your code in the Elm idiomatic way", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for elm-format"}, {Name: "--output", Description: "Write output to FILE instead of overwriting the given source file"}, {Name: "--yes", Description: "Reply 'yes' to all automated prompts"}, diff --git a/commands/js/elm_json.go b/commands/js/elm_json.go index e2778c7..20afdc7 100644 --- a/commands/js/elm_json.go +++ b/commands/js/elm_json.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "elm-json", Description: "Deal with your elm.json", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Prints help information or the help of the given subcommand(s)"}, {Name: "install", Description: "Install a package"}, {Name: "PACKAGE", Description: "Package to install, e.g. elm/core or elm/core@1.0.2 or elm/core@1"}, @@ -18,7 +18,7 @@ func init() { {Name: "upgrade", Description: "Bring your dependencies up to date"}, {Name: "INPUT", Description: "The elm.json file to upgrade [default: elm.json]"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Prints help information"}, {Name: "--test", Description: "Install as a test-dependency"}, {Name: "--version", Description: "Prints version information"}, diff --git a/commands/js/elm_review.go b/commands/js/elm_review.go index 0294515..79db59a 100644 --- a/commands/js/elm_review.go +++ b/commands/js/elm_review.go @@ -1,20 +1,20 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "elm-review", Description: "Prints a single JSON object", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize Elm Review in this directory"}, {Name: "suppress", Description: "Generate suppression files for rules that report many errors"}, {Name: "new-package", Description: "Creates an new project aimed to contain rules and to be published later"}, {Name: "new-rule", Description: "Adds a new rule to your review configuration or review package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for elm-review init"}, {Name: "--config", Description: "Specify the path to the elm compiler"}, {Name: "--check-after-tests", Description: "Checks whether there are uncommitted suppression files"}, diff --git a/commands/js/esbuild.go b/commands/js/esbuild.go index 4feffab..185e74f 100644 --- a/commands/js/esbuild.go +++ b/commands/js/esbuild.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "esbuild", Description: "An extremely fast JavaScript bundler", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--bundle", Description: "Bundle all dependencies into the output files"}, {Name: "--define", Description: "Replace variable names with a literal value, eg. --define:DEBUG=true"}, {Name: "--external", Description: "Exclude modules from the build"}, diff --git a/commands/js/eslint.go b/commands/js/eslint.go index 0a55b75..f0995a9 100644 --- a/commands/js/eslint.go +++ b/commands/js/eslint.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "eslint", Description: "Pluggable JavaScript linter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-eslintrc", Description: "Disable use of configuration from .eslintrc.*"}, {Name: "-c", Description: "Use this configuration, overriding .eslintrc.* config options if present"}, {Name: "--env", Description: "Specify environments"}, diff --git a/commands/js/expo.go b/commands/js/expo.go index 930696a..05f444a 100644 --- a/commands/js/expo.go +++ b/commands/js/expo.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "expo", Description: "Tools for creating, running, and deploying Universal Expo and React Native apps", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "-V", Description: "Output the version number"}, {Name: "-u", Description: "Username"}, diff --git a/commands/js/expo_cli.go b/commands/js/expo_cli.go index ef2d272..b69d82f 100644 --- a/commands/js/expo_cli.go +++ b/commands/js/expo_cli.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "expo-cli", Description: "Tools for creating, running, and deploying Universal Expo and React Native apps", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "-V", Description: "Output the version number"}, {Name: "-u", Description: "Username"}, diff --git a/commands/js/ganache_cli.go b/commands/js/ganache_cli.go index 2937d50..74fa635 100644 --- a/commands/js/ganache_cli.go +++ b/commands/js/ganache_cli.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ganache-cli", Description: "Fast Ethereum RPC client", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Specify the number of accounts to generate at startup"}, {Name: "-e", Description: "Amount of ether to assign each test account. Default is 100"}, {Name: "-b", Description: "Generate deterministic addresses based on a pre-defined mnemonic"}, diff --git a/commands/js/gatsby.go b/commands/js/gatsby.go index d742be3..c23709e 100644 --- a/commands/js/gatsby.go +++ b/commands/js/gatsby.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gatsby", Description: "Set host. Defaults to localhost", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "develop", Description: "Start the Gatsby development server"}, {Name: "build", Description: "Compile your application and make it ready for deployment"}, {Name: "serve", Description: "Serve the production build of your site for testing"}, @@ -18,7 +18,7 @@ func init() { {Name: "docs", Description: "Documentation about using and creating plugins"}, {Name: "repl", Description: "Gatsby will prompt you to type in commands and explore"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-H", Description: "Set host. Defaults to localhost"}, {Name: "-p", Description: "Set port. Defaults to env.PORT or 8000"}, {Name: "-o", Description: "Open the site in your (default) browser for you"}, diff --git a/commands/js/hardhat.go b/commands/js/hardhat.go index 127e41e..8056192 100644 --- a/commands/js/hardhat.go +++ b/commands/js/hardhat.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hardhat", Description: "Ethereum development environment", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "accounts", Description: "Prints the list of accounts"}, {Name: "check", Description: "Check whatever you need"}, {Name: "clean", Description: "Clears the cache and deletes all artifacts"}, @@ -20,7 +20,7 @@ func init() { {Name: "run", Description: "Runs a user-defined script after compiling the project"}, {Name: "test", Description: "Runs mocha tests"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--emoji", Description: "Use emoji in messages"}, {Name: "--max-memory", Description: "The maximum amount of memory that Hardhat can use"}, {Name: "--help", Description: "Shows the help text or task's help if name is provided"}, diff --git a/commands/js/ionic.go b/commands/js/ionic.go index 90b576a..1b9743c 100644 --- a/commands/js/ionic.go +++ b/commands/js/ionic.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ionic", Description: "Target engine (e.g. browser, cordova)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Enables tab-completion for Ionic CLI commands"}, {Name: "id", Description: "The Appflow ID of the app to link (e.g. a1b2c3d4)"}, {Name: "email", Description: "Your email address"}, @@ -45,7 +45,7 @@ func init() { {Name: "action", Description: "Add, remove, or update a platform; ls, check, or save all project platforms"}, {Name: "plugin", Description: "The name of the plugin (corresponds to add and remove)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--engine", Description: "Target engine (e.g. browser, cordova)"}, {Name: "--platform", Description: "Target platform on chosen engine (e.g. ios, android)"}, {Name: "--prod", Description: "Flag to use the production configuration"}, diff --git a/commands/js/jest.go b/commands/js/jest.go index 63bbc08..386590f 100644 --- a/commands/js/jest.go +++ b/commands/js/jest.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "jest", Description: "A delightful JavaScript Testing Framework with a focus on simplicity", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--bail", Description: "Whether to use the cache"}, {Name: "--no-cache", Description: "Whether to use the cache"}, {Name: "--changedFilesWithAncestor", Description: "Runs tests related to the changes since the provided branch or commit hash"}, diff --git a/commands/js/lerna.go b/commands/js/lerna.go index 68fe915..c6f970a 100644 --- a/commands/js/lerna.go +++ b/commands/js/lerna.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lerna", Description: "Branch", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "*", Description: "Select all packages"}, {Name: "changed", Description: "Check which packages have changed since the last release"}, {Name: "run", Description: "Run an npm script in each package that contains that script"}, @@ -20,7 +20,7 @@ func init() { {Name: "clean", Description: "Remove the node_modules directory from all packages"}, {Name: "create", Description: "Create a new lerna-managed package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--npm-client", Description: "The executable to run the script with"}, {Name: "--concurrency", Description: "Set a max buffer length for each underlying process call"}, {Name: "--no-progress", Description: "Disable progress bars. This is always the case in a CI environment"}, diff --git a/commands/js/meteor.go b/commands/js/meteor.go index 0654b17..2047d4b 100644 --- a/commands/js/meteor.go +++ b/commands/js/meteor.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "meteor", Description: "Run the meteor command-line tool", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Get help on meteor command line usage"}, {Name: "command", Description: "Built-in command"}, {Name: "list", Description: "Lists the packages that you have explicitly added to your project"}, @@ -32,7 +32,7 @@ func init() { {Name: "members", Description: "Manage members of an organization"}, {Name: "publish-for-arch", Description: "Publish a package for the same architecture that you are currently on"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--port", Description: "Port to listen on (instead of the default 3000)"}, {Name: "--inspect", Description: "Simulate production mode. Minify and bundle CSS and JS files"}, {Name: "--raw-logs", Description: "Run without parsing logs from stdout and stderr"}, diff --git a/commands/js/ncu.go b/commands/js/ncu.go index a4901a1..c8ec941 100644 --- a/commands/js/ncu.go +++ b/commands/js/ncu.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ncu", Description: "Clear the default cache, or the cache file specified by --cacheFile", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cache", Description: "Clear the default cache, or the cache file specified by --cacheFile"}, {Name: "--cacheExpiration", Description: "Cache expiration in minutes. Only works with --cache. (default: 10)"}, {Name: "--cacheFile", Description: "Force color in terminal"}, diff --git a/commands/js/nest.go b/commands/js/nest.go index 5686668..80a9268 100644 --- a/commands/js/nest.go +++ b/commands/js/nest.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nest", Description: "Report actions that would be taken without writing out results", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Creates a new nest project"}, {Name: "project", Description: "The name of the project"}, {Name: "generate", Description: "Generate and/or modifies files based on a schematic"}, @@ -37,7 +37,7 @@ func init() { {Name: "info", Description: "Display Nest project details"}, {Name: "update", Description: "Update Nest dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Report actions that would be taken without writing out results"}, {Name: "-p", Description: "Project in which to generate files"}, {Name: "--flat", Description: "Enforce flat structure of generated element"}, diff --git a/commands/js/next.go b/commands/js/next.go index 6a3dd2a..e93b051 100644 --- a/commands/js/next.go +++ b/commands/js/next.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "next", Description: "A port number on which to start the application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Create an optimized production build of your application"}, {Name: "dev", Description: "Start the application in development mode"}, {Name: "start", Description: "Start the application in production mode"}, @@ -18,7 +18,7 @@ func init() { {Name: "enable", Description: "Enable Next.js' telemetry collection"}, {Name: "disable", Description: "Disable Next.js' telemetry collection"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "A port number on which to start the application"}, {Name: "-H", Description: "Hostname on which to start the application"}, {Name: "-h", Description: "Output usage information"}, diff --git a/commands/js/ng.go b/commands/js/ng.go index f9b76f2..b335f42 100644 --- a/commands/js/ng.go +++ b/commands/js/ng.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ng", Description: "Project name", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Create a new Angular app"}, {Name: "generate", Description: "Generate new files"}, {Name: "application", Description: "Generates a new application"}, @@ -18,7 +18,7 @@ func init() { {Name: "class", Description: "Generates a class"}, {Name: "version", Description: "View your Angular CLI version (update for Angular 14+)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--project", Description: "Project name"}, {Name: "--create-application", Description: "Create a default application?"}, {Name: "--style", Description: "Generate a new component"}, diff --git a/commands/js/node.go b/commands/js/node.go index 152c7bb..f75a3f0 100644 --- a/commands/js/node.go +++ b/commands/js/node.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "node", Description: "Run the node interpreter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Evaluate script"}, {Name: "--watch", Description: "Watch input files"}, {Name: "--watch-path", Description: "Specify a watch directory or file"}, diff --git a/commands/js/npm.go b/commands/js/npm.go index 76ad945..e46811f 100644 --- a/commands/js/npm.go +++ b/commands/js/npm.go @@ -5,14 +5,14 @@ import ( "os" "path/filepath" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion { - cwd := core.GetCWD() +func NpmScriptGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + cwd := spec.GetCWD() data, err := os.ReadFile(filepath.Join(cwd, "package.json")) if err != nil { - return []core.Suggestion{ + return []spec.Suggestion{ {Cmd: "dev", Desc: "development server"}, {Cmd: "build", Desc: "build for production"}, {Cmd: "start", Desc: "start application"}, @@ -30,18 +30,18 @@ func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion { priority := []string{"dev", "start", "build", "test", "lint", "preview", "typecheck", "format"} seen := make(map[string]bool) - var results []core.Suggestion + var results []spec.Suggestion for _, name := range priority { if cmd, ok := pkg.Scripts[name]; ok { - results = append(results, core.Suggestion{Cmd: name, Desc: cmd}) + results = append(results, spec.Suggestion{Cmd: name, Desc: cmd}) seen[name] = true } } for name, cmd := range pkg.Scripts { if !seen[name] { - results = append(results, core.Suggestion{Cmd: name, Desc: cmd}) + results = append(results, spec.Suggestion{Cmd: name, Desc: cmd}) } } @@ -49,36 +49,36 @@ func NpmScriptGenerator(tokens []string, _ string, _ string) []core.Suggestion { } func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "npm", Description: "node packages", - Subcommands: []core.Subcommand{ - {Name: "install", Description: "install packages", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "install", Description: "install packages", Options: []spec.Option{ {Name: "--save-dev", Description: "save as devDependency"}, {Name: "--save-exact", Description: "exact version"}, {Name: "--legacy-peer-deps", Description: "skip peer deps"}, }}, {Name: "run", Description: "run script", Generator: NpmScriptGenerator}, {Name: "test", Description: "run tests"}, - {Name: "init", Description: "create package.json", Options: []core.Option{ + {Name: "init", Description: "create package.json", Options: []spec.Option{ {Name: "-y", Description: "skip prompts"}, }}, {Name: "publish", Description: "publish package"}, {Name: "update", Description: "update packages"}, {Name: "uninstall", Description: "remove package"}, {Name: "ls", Description: "list installed"}, - {Name: "audit", Description: "security audit", Options: []core.Option{ + {Name: "audit", Description: "security audit", Options: []spec.Option{ {Name: "fix", Description: "auto fix"}, }}, {Name: "ci", Description: "clean install from lockfile"}, {Name: "pack", Description: "create tarball"}, {Name: "link", Description: "symlink package"}, - {Name: "cache", Description: "manage cache", Subcommands: []core.Subcommand{ + {Name: "cache", Description: "manage cache", Subcommands: []spec.Subcommand{ {Name: "clean", Description: "clear cache"}, {Name: "verify", Description: "verify cache"}, }}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--prefix", Description: "set working directory"}, }, }) diff --git a/commands/js/npx.go b/commands/js/npx.go index 958bb7b..8533da6 100644 --- a/commands/js/npx.go +++ b/commands/js/npx.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "npx", Description: "Execute binaries from npm packages", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--package", Description: "Package to be installed"}, {Name: "--cache", Description: "Location of the npm cache"}, {Name: "--always-spawn", Description: "Always spawn a child process to execute the command"}, diff --git a/commands/js/nuxi.go b/commands/js/nuxi.go index 07be83d..a924ac7 100644 --- a/commands/js/nuxi.go +++ b/commands/js/nuxi.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nuxi", Description: "The directory of the target application", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help"}, {Name: "--verbose", Description: "Log information about the installation process"}, {Name: "--template", Description: "Specify a Git repository to use as a template"}, diff --git a/commands/js/nuxt.go b/commands/js/nuxt.go index 2f6e3d2..b998425 100644 --- a/commands/js/nuxt.go +++ b/commands/js/nuxt.go @@ -1,19 +1,19 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nuxt", Description: "Launch the development server", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "dev", Description: "Launch the development server"}, {Name: "build", Description: "Build and optimize your application with webpack for production"}, {Name: "webpack", Description: "Inspect the webpack config"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--name", Description: "Bundle name to inspect. (client, server, modern)"}, {Name: "--dev", Description: "Inspect webpack config for dev mode"}, {Name: "--depth", Description: "Inspection depth. Defaults to 2 to prevent verbose output"}, diff --git a/commands/js/nx.go b/commands/js/nx.go index 9e4bede..0058526 100644 --- a/commands/js/nx.go +++ b/commands/js/nx.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nx", Description: "All projects", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Adds nx.json file and installs nx if not installed already"}, {Name: "daemon", Description: "Prints information about the Nx Daemon process or starts a daemon process"}, {Name: "graph", Description: "Graph dependencies within workspace"}, @@ -31,7 +31,7 @@ func init() { {Name: "show", Description: "Show information about the workspace (e.g., list of projects)"}, {Name: "object", Description: "What to show (e.g., projects)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--all", Description: "All projects"}, {Name: "--base", Description: "Base of the current branch (usually main)"}, {Name: "--commitPrefix", Description: "Automatically create a git commit after each migration runs"}, diff --git a/commands/js/oxlint.go b/commands/js/oxlint.go index 943a174..6bd923d 100644 --- a/commands/js/oxlint.go +++ b/commands/js/oxlint.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "oxlint", Description: "All lints (except nursery)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Path to Oxlint JSON configuration file"}, {Name: "--tsconfig", Description: "Specify the file to use as your .eslintignore"}, {Name: "--ignore-pattern", Description: "Specify file patterns to ignore (in addition to those in .eslintignore)"}, diff --git a/commands/js/playwright.go b/commands/js/playwright.go index e0fb6be..2566a00 100644 --- a/commands/js/playwright.go +++ b/commands/js/playwright.go @@ -1,20 +1,20 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "playwright", Description: "Display help for command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "test", Description: "Run tests with Playwright Test"}, {Name: "tests", Description: "Test files to run"}, {Name: "install", Description: "Running without arguments will install default browsers"}, {Name: "browsers", Description: "Browser to install"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display help for command"}, {Name: "-g", Description: "Run the test with the title"}, {Name: "--headed", Description: "Run tests in headed browsers"}, diff --git a/commands/js/pnpm.go b/commands/js/pnpm.go index 6cc8604..7fb0ac3 100644 --- a/commands/js/pnpm.go +++ b/commands/js/pnpm.go @@ -1,19 +1,19 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pnpm", Description: "fast node packages", - Subcommands: []core.Subcommand{ - {Name: "install", Description: "install packages", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "install", Description: "install packages", Options: []spec.Option{ {Name: "--frozen-lockfile", Description: "no lockfile update"}, {Name: "--prod", Description: "production only"}, }}, - {Name: "add", Description: "add package", Options: []core.Option{ + {Name: "add", Description: "add package", Options: []spec.Option{ {Name: "-D", Description: "save as devDependency"}, {Name: "-g", Description: "install globally"}, {Name: "-E", Description: "exact version"}, @@ -23,11 +23,11 @@ func init() { {Name: "build", Description: "build project"}, {Name: "dev", Description: "start dev server"}, {Name: "test", Description: "run tests"}, - {Name: "update", Description: "update packages", Options: []core.Option{ + {Name: "update", Description: "update packages", Options: []spec.Option{ {Name: "--latest", Description: "update to latest"}, {Name: "-i", Description: "interactive"}, }}, - {Name: "store", Description: "manage store", Subcommands: []core.Subcommand{ + {Name: "store", Description: "manage store", Subcommands: []spec.Subcommand{ {Name: "prune", Description: "remove unreferenced"}, {Name: "status", Description: "check store"}, {Name: "path", Description: "print store path"}, @@ -40,7 +40,7 @@ func init() { {Name: "init", Description: "create package.json"}, {Name: "publish", Description: "publish package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--filter", Description: "filter by package"}, {Name: "-r", Description: "recursive"}, {Name: "--workspace-root", Description: "run in workspace root"}, diff --git a/commands/js/pnpx.go b/commands/js/pnpx.go index c626735..87c4597 100644 --- a/commands/js/pnpx.go +++ b/commands/js/pnpx.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pnpx", Description: "Execute binaries from npm packages", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--package", Description: "Package to be executed"}, {Name: "--cache", Description: "Location of the npm cache"}, {Name: "--always-spawn", Description: "Always spawn a child process to execute the command"}, diff --git a/commands/js/prettier.go b/commands/js/prettier.go index 33995be..c7eef33 100644 --- a/commands/js/prettier.go +++ b/commands/js/prettier.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "prettier", Description: "Run Prettier from the command line", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Check if your files are formatted"}, {Name: "-l", Description: "Print the names of files that are different from Prettier's formatting"}, {Name: "-w", Description: "Edit files in-place"}, diff --git a/commands/js/quasar.go b/commands/js/quasar.go index dbd6112..e0a07cc 100644 --- a/commands/js/quasar.go +++ b/commands/js/quasar.go @@ -1,21 +1,21 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "quasar", Description: "Quasar Framework CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "create", Description: "Create a new Quasar project"}, {Name: "project-name", Description: "Name of the project"}, {Name: "info", Description: "Gather environment information for issue reporting"}, {Name: "upgrade", Description: "Upgrade Quasar Framework packages"}, {Name: "serve", Description: "Start development server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "--kit", Description: "Use specific starter kit"}, {Name: "--branch", Description: "Use specific branch of the starter kit"}, diff --git a/commands/js/react_native.go b/commands/js/react_native.go index 5179e41..6a674c1 100644 --- a/commands/js/react_native.go +++ b/commands/js/react_native.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "react-native", Description: "Attempt to fix all diagnosed issues", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--fix", Description: "Attempt to fix all diagnosed issues"}, {Name: "--contributor", Description: "Output usage information"}, {Name: "--entry-file", Description: "Path to the root JS file, either absolute or relative to JS root"}, diff --git a/commands/js/redwood.go b/commands/js/redwood.go index 8de258d..51cc0eb 100644 --- a/commands/js/redwood.go +++ b/commands/js/redwood.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "redwood", Description: "Script", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "side", Description: "Which side(s) to build"}, {Name: "api", Description: "Build the api server"}, {Name: "web", Description: "Build the web server"}, @@ -45,7 +45,7 @@ func init() { {Name: "deploy", Description: "Setup auth configuration for a provider"}, {Name: "up", Description: "Executes outstanding data migrations"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--forward", Description: "String of one or more Webpack Dev Server config options"}, {Name: "--side", Description: "Show help for command"}, {Name: "--build", Description: "Build (web) and Start (api) command for Render deploy"}, diff --git a/commands/js/remix.go b/commands/js/remix.go index cd80037..1e7da0d 100644 --- a/commands/js/remix.go +++ b/commands/js/remix.go @@ -1,20 +1,20 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "remix", Description: "Represent the directory of the Remix application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Create an optimized production build of your application"}, {Name: "dev", Description: "Start the application in development mode"}, {Name: "setup", Description: "Prepare node_modules/remix folder (after installation of packages)"}, {Name: "routes", Description: "Generate the route config of the application"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Output usage information"}, {Name: "-v", Description: "Output the version number"}, {Name: "--sourcemap", Description: "Enables production sourcemap"}, diff --git a/commands/js/remotion.go b/commands/js/remotion.go index 7198b59..c95c5af 100644 --- a/commands/js/remotion.go +++ b/commands/js/remotion.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "remotion", Description: "Create videos programmatically in React", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "versions", Description: "Prints and validates versions of all Remotion packages"}, {Name: "gpu", Description: "Prints information about how Chrome uses the GPU"}, {Name: "compositions", Description: "Prints the list of available compositions"}, @@ -50,7 +50,7 @@ func init() { {Name: "benchmark", Description: "Try different render configurations and compare them"}, {Name: "install", Description: "Ensure Remotion dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--props", Description: "Pass input props as filename or as JSON"}, {Name: "--env-file", Description: "Specify a location for a dotenv file"}, {Name: "--disable-headless", Description: "Run Chrome in normal mode rather than headless"}, diff --git a/commands/js/rollup.go b/commands/js/rollup.go index c59a9c8..9223275 100644 --- a/commands/js/rollup.go +++ b/commands/js/rollup.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rollup", Description: "Next-generation ES module bundler", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Directory for chunks (if absent, prints to stdout)"}, {Name: "-e", Description: "Comma-separate list of module IDs to exclude"}, {Name: "-f", Description: "Type of output (amd, cjs, es, iife, umd, system)"}, diff --git a/commands/js/rome.go b/commands/js/rome.go index 405e712..0fdc443 100644 --- a/commands/js/rome.go +++ b/commands/js/rome.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rome", Description: "Rome CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "check", Description: "Run the linter on a set of files"}, {Name: "ci", Description: "Run the linter and formatter check on a set of files"}, {Name: "format", Description: "Run the formatter on a set of files"}, @@ -20,7 +20,7 @@ func init() { {Name: "version", Description: "Shows the Rome version information and quit"}, {Name: "help", Description: "Prints help message"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--colors", Description: "Set the formatting mode for markup"}, {Name: "--use-server", Description: "Connect to a running instance of the Rome daemon server"}, {Name: "--version", Description: "Show the Rome version information and quit"}, diff --git a/commands/js/rush.go b/commands/js/rush.go index 7335df2..0153164 100644 --- a/commands/js/rush.go +++ b/commands/js/rush.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rush", Description: "Projects", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Adds one or more dependencies to the package.json and runs rush update"}, {Name: "init", Description: "Initializes a new repository to be managed by Rush"}, {Name: "init-autoinstaller", Description: "Initializes a new autoinstaller"}, @@ -21,7 +21,7 @@ func init() { {Name: "rebuild", Description: "Clean and rebuild the entire set of projects"}, {Name: "tab-complete", Description: "Provides tab completion"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-t", Description: "Multi-Project Build Tool"}, {Name: "-p", Description: "Specify package to the dependencies of the current project"}, {Name: "--exact", Description: "If specified, the dependency will be added to all projects"}, diff --git a/commands/js/sequelize.go b/commands/js/sequelize.go index 418a286..b14660a 100644 --- a/commands/js/sequelize.go +++ b/commands/js/sequelize.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sequelize", Description: "The environment to run the command in", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--env", Description: "The environment to run the command in"}, {Name: "--config", Description: "The path to the config file"}, {Name: "--options-path", Description: "The path to a JSON file with additional options"}, diff --git a/commands/js/serve.go b/commands/js/serve.go index 93e7c8f..62633b4 100644 --- a/commands/js/serve.go +++ b/commands/js/serve.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "serve", Description: "Static file serving and directory listing", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Shows help message"}, {Name: "-v", Description: "Displays the current version of serve"}, {Name: "-l", Description: "E.g. serve --listen 1234"}, diff --git a/commands/js/shadcn_ui.go b/commands/js/shadcn_ui.go index 4580172..489d278 100644 --- a/commands/js/shadcn_ui.go +++ b/commands/js/shadcn_ui.go @@ -1,21 +1,21 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "shadcn-ui", Description: "Shadcn UI CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add a component to your project"}, {Name: "components", Description: "The components to add"}, {Name: "diff", Description: "Check for updates against the registry"}, {Name: "component", Description: "The component name"}, {Name: "init", Description: "Initialize your project and install dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "Skip confirmation prompt"}, {Name: "-o", Description: "Overwrite existing files"}, {Name: "-c", Description: "The working directory. defaults to the current directory"}, diff --git a/commands/js/start_storybook.go b/commands/js/start_storybook.go index c04d1f8..297080b 100644 --- a/commands/js/start_storybook.go +++ b/commands/js/start_storybook.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "start-storybook", Description: "Display usage information", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display usage information"}, {Name: "-V", Description: "Display the version number"}, {Name: "-s", Description: "Directory where to load static files from, comma-separated list"}, diff --git a/commands/js/stencil.go b/commands/js/stencil.go index 8c36ea2..da95f8b 100644 --- a/commands/js/stencil.go +++ b/commands/js/stencil.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "stencil", Description: "CLI to build Stencil projects and generate components", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build components for development or production"}, {Name: "workers", Description: "Number of workers"}, {Name: "test", Description: "Run unit and end-to-end tests"}, @@ -17,7 +17,7 @@ func init() { {Name: "off", Description: "Disable sharing anonymous usage data"}, {Name: "on", Description: "Enable sharing anonymous usage data"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ci", Description: "Set stencil config file"}, {Name: "--debug", Description: "Set the log level to debug"}, {Name: "--dev", Description: "Development build"}, diff --git a/commands/js/swagger_typescript_api.go b/commands/js/swagger_typescript_api.go index 3fe2bcc..2e6755a 100644 --- a/commands/js/swagger_typescript_api.go +++ b/commands/js/swagger_typescript_api.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "swagger-typescript-api", Description: "Generate api via swagger scheme", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--output", Description: "Output path of generated templates"}, {Name: "--modular", Description: "Http client type"}, {Name: "--clean-output", Description: "Clean output folder before generate template"}, diff --git a/commands/js/swc.go b/commands/js/swc.go index 3bc14d3..d61c4f9 100644 --- a/commands/js/swc.go +++ b/commands/js/swc.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "swc", Description: "Path to the file", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--filename", Description: "Path to the file"}, {Name: "--config-file", Description: "Path to a .swcrc file to use"}, {Name: "--env-name", Description: "Whether or not to look up .swcrc files"}, diff --git a/commands/js/truffle.go b/commands/js/truffle.go index 3b0322e..af061d4 100644 --- a/commands/js/truffle.go +++ b/commands/js/truffle.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "truffle", Description: "Execute build pipeline (if configuration present)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Execute build pipeline (if configuration present)"}, {Name: "compile", Description: "Compile contract source files"}, {Name: "config", Description: "Set user-level configuration options"}, @@ -41,7 +41,7 @@ func init() { {Name: "box_name", Description: "Name of the Truffle Box. (required)"}, {Name: "test", Description: "Run JavaScript and Solidity tests"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--list", Description: "Compile all contracts instead of only the contracts changed since last compile"}, {Name: "--quiet", Description: "Suppress all compilation output"}, {Name: "--enable-analytics", Description: "Enable Truffle to send usage data to Google Analytics"}, diff --git a/commands/js/ts_node.go b/commands/js/ts_node.go index 2cbe672..803185f 100644 --- a/commands/js/ts_node.go +++ b/commands/js/ts_node.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ts-node", Description: "Run the TypeScript interpreter for Node.JS", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for ts-node"}, {Name: "-v", Description: "Print version information of the ts-node module"}, {Name: "-e", Description: "Evaluate script"}, diff --git a/commands/js/tsc.go b/commands/js/tsc.go index faf34e8..0509966 100644 --- a/commands/js/tsc.go +++ b/commands/js/tsc.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tsc", Description: "CLI tool for TypeScript compiler", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--all", Description: "Show all compiler options"}, {Name: "--generateTrace", Description: "Generates an event trace and a list of types"}, {Name: "--help", Description: "Gives local information for help on the CLI"}, diff --git a/commands/js/tsx.go b/commands/js/tsx.go index 17e3d08..5f76464 100644 --- a/commands/js/tsx.go +++ b/commands/js/tsx.go @@ -1,17 +1,17 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tsx", Description: "Run TypeScript file using tsx", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "watch", Description: "Run the script and watch for changes"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for tsx"}, {Name: "--no-cache", Description: "Disable caching"}, {Name: "--clear-screen", Description: "Disable clearing the screen on rerun"}, diff --git a/commands/js/turbo.go b/commands/js/turbo.go index 93c2b10..f97bca0 100644 --- a/commands/js/turbo.go +++ b/commands/js/turbo.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "turbo", Description: "Print the version", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bin", Description: "Get the path to the turbo binary"}, {Name: "link", Description: "Link your local directory to a Vercel organization and enable remote caching"}, {Name: "login", Description: "Login to your Vercel account"}, @@ -20,7 +20,7 @@ func init() { {Name: "full", Description: "Show all output"}, {Name: "none", Description: "Hide process output"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Print the version"}, {Name: "--help", Description: "Print a help message"}, {Name: "--no-gitignore", Description: "Do not create or modify .gitignore"}, diff --git a/commands/js/typeorm.go b/commands/js/typeorm.go index fba548c..87c3c70 100644 --- a/commands/js/typeorm.go +++ b/commands/js/typeorm.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "typeorm", Description: "Show help for command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "schema:sync", Description: "Synchronizes your entities with database schema"}, {Name: "schema:log", Description: "Shows sql to be executed by schema:sync command"}, {Name: "schema:drop", Description: "Drops all tables in the database on your default connection"}, @@ -24,7 +24,7 @@ func init() { {Name: "cache:clear", Description: "Clears all data stored in query runner cache"}, {Name: "init", Description: "Generates initial TypeORM project structure"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for command"}, {Name: "-v", Description: "Show the version"}, {Name: "-c", Description: "Name of the connection on which to run a query"}, diff --git a/commands/js/vite.go b/commands/js/vite.go index a24dbca..dd69893 100644 --- a/commands/js/vite.go +++ b/commands/js/vite.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vite", Description: "Native ESM-powered web dev build tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help message"}, {Name: "--host", Description: "Specify the hostname"}, {Name: "--port", Description: "Specify the port"}, diff --git a/commands/js/vr.go b/commands/js/vr.go index c9bddf6..fd7370f 100644 --- a/commands/js/vr.go +++ b/commands/js/vr.go @@ -1,19 +1,19 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vr", Description: "The npm-style script runner for Deno", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "run", Description: "Run a script"}, {Name: "export", Description: "Export one or more scripts as standalone executable files"}, {Name: "upgrade", Description: "Upgrade Velociraptor to the latest version or to a specific one"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-o", Description: "The folder where the scripts will be exported"}, {Name: "--help", Description: "Show help for Velociraptor"}, {Name: "-V", Description: "Show the version number for Velociraptor"}, diff --git a/commands/js/vsce.go b/commands/js/vsce.go index 7aec0d2..816879c 100644 --- a/commands/js/vsce.go +++ b/commands/js/vsce.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vsce", Description: "The Visual Studio Code Extension Manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ls", Description: "Lists all the files that will be published"}, {Name: "package", Description: "Packages an extension"}, {Name: "publish", Description: "Publishes an extension"}, @@ -22,7 +22,7 @@ func init() { {Name: "search", Description: "Search extension gallery"}, {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--yarn", Description: "Use yarn instead of npm (default inferred from presence of yarn.lock or .yarnrc)"}, {Name: "--no-yarn", Description: "Use npm instead of yarn (default inferred from lack of yarn.lock or .yarnrc)"}, {Name: "--packagedDependencies", Description: "Select packages that should be published only (includes dependencies)"}, diff --git a/commands/js/vue.go b/commands/js/vue.go index cec1ec3..8a1753d 100644 --- a/commands/js/vue.go +++ b/commands/js/vue.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vue", Description: "Vue cli tools", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "create", Description: "Create a new project powered by vue-cli-service"}, {Name: "add", Description: "Install a plugin and invoke its generator in an already created project"}, {Name: "invoke", Description: "Invoke the generator of a plugin in an already created project"}, @@ -23,7 +23,7 @@ func init() { {Name: "migrate", Description: "(experimental) run migrator for an already-installed cli plugin"}, {Name: "info", Description: "Print debugging information about your environment"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Skip prompts and use saved or remote preset"}, {Name: "-d", Description: "Skip prompts and use default preset"}, {Name: "-i", Description: "Skip prompts and use inline JSON string as preset"}, diff --git a/commands/js/watchman.go b/commands/js/watchman.go index 4a4bb28..1550e23 100644 --- a/commands/js/watchman.go +++ b/commands/js/watchman.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "watchman", Description: "A file watching service", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "clock", Description: "Returns the current clock value for a watched root"}, {Name: "path", Description: "The path to directory"}, {Name: "find", Description: "Finds all files that match the optional list of patterns under the specified dir"}, @@ -32,7 +32,7 @@ func init() { {Name: "watch-list", Description: "Returns a list of watched dirs"}, {Name: "watch-project", Description: "Requests that the project containing the requested dir is watched for changes"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for watchman"}, {Name: "--inetd", Description: "Spawning from an inetd style supervisor"}, {Name: "-S", Description: "Don't use the site or system spawner"}, diff --git a/commands/js/webpack.go b/commands/js/webpack.go index 9a5cdbf..d045dcd 100644 --- a/commands/js/webpack.go +++ b/commands/js/webpack.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "webpack", Description: "Run webpack (default command, can be omitted)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Run webpack (default command, can be omitted)"}, {Name: "configtest", Description: "Validate a webpack configuration"}, {Name: "config-path", Description: "Path to the webpack configuration file"}, @@ -20,7 +20,7 @@ func init() { {Name: "serve", Description: "Run the webpack development server"}, {Name: "watch", Description: "Run webpack and watch for file changes"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--config", Description: "Provide path to a webpack configuration file e.g. ./webpack.config.js"}, {Name: "--config-name", Description: "Name of the configuration to use"}, {Name: "--merge", Description: "Merge two or more configurations using 'webpack-merge'"}, diff --git a/commands/js/yalc.go b/commands/js/yalc.go index e3394d0..0b24f74 100644 --- a/commands/js/yalc.go +++ b/commands/js/yalc.go @@ -1,14 +1,14 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "yalc", Description: "Work with yarn/npm packages locally like a boss", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "publish", Description: "Copy all the files that should be published in remote NPM registry"}, {Name: "add", Description: "Copy the current version from the store to your project"}, {Name: "package", Description: "The package you want to add"}, @@ -22,7 +22,7 @@ func init() { {Name: "restore", Description: "Restore retreated packages"}, {Name: "retreat", Description: "Remove packages from project, but leave in lock file (to be restored later)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--push", Description: "Publish without running scripts"}, {Name: "--no-sig", Description: "Disable adding hash signature of all files when copying package content"}, {Name: "--content", Description: "Show included files in the published package"}, diff --git a/commands/js/yarn.go b/commands/js/yarn.go index 5473c36..050cb6c 100644 --- a/commands/js/yarn.go +++ b/commands/js/yarn.go @@ -1,19 +1,19 @@ package js import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "yarn", Description: "yarn package manager", - Subcommands: []core.Subcommand{ - {Name: "install", Description: "install packages", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "install", Description: "install packages", Options: []spec.Option{ {Name: "--frozen-lockfile", Description: "error on lockfile change"}, {Name: "--production", Description: "production only"}, }}, - {Name: "add", Description: "add package", Options: []core.Option{ + {Name: "add", Description: "add package", Options: []spec.Option{ {Name: "-D", Description: "dev dependency"}, {Name: "-P", Description: "peer dependency"}, {Name: "-E", Description: "exact version"}, @@ -24,30 +24,30 @@ func init() { {Name: "build", Description: "build project"}, {Name: "dev", Description: "start dev server"}, {Name: "test", Description: "run tests"}, - {Name: "upgrade", Description: "upgrade packages", Options: []core.Option{ + {Name: "upgrade", Description: "upgrade packages", Options: []spec.Option{ {Name: "--latest", Description: "upgrade to latest"}, {Name: "-i", Description: "interactive"}, }}, {Name: "workspace", Description: "run command in workspace"}, - {Name: "workspaces", Description: "list workspaces", Subcommands: []core.Subcommand{ + {Name: "workspaces", Description: "list workspaces", Subcommands: []spec.Subcommand{ {Name: "info", Description: "workspace info"}, {Name: "run", Description: "run in all workspaces"}, }}, {Name: "link", Description: "symlink package"}, {Name: "unlink", Description: "unlink package"}, {Name: "audit", Description: "security audit"}, - {Name: "cache", Description: "manage cache", Subcommands: []core.Subcommand{ + {Name: "cache", Description: "manage cache", Subcommands: []spec.Subcommand{ {Name: "clean", Description: "clear cache"}, {Name: "list", Description: "list cache"}, {Name: "dir", Description: "print cache dir"}, }}, - {Name: "init", Description: "create package.json", Options: []core.Option{ + {Name: "init", Description: "create package.json", Options: []spec.Option{ {Name: "-2", Description: "berry (v2+)"}, }}, {Name: "publish", Description: "publish package"}, {Name: "info", Description: "show package info"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cwd", Description: "working directory"}, {Name: "--verbose", Description: "verbose output"}, }, diff --git a/commands/jvm/clojure.go b/commands/jvm/clojure.go index 255025b..96203af 100644 --- a/commands/jvm/clojure.go +++ b/commands/jvm/clojure.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "clojure", Description: "An alias to refer to its function or a qualified function", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-A", Description: "Use concatenated aliases to modify classpath"}, {Name: "-X", Description: "Invoke tool by name or via aliases ala -X"}, {Name: "-M", Description: "Use concatenated aliases to modify classpath or supply main opts"}, diff --git a/commands/jvm/dart.go b/commands/jvm/dart.go index 3051e1f..9e60770 100644 --- a/commands/jvm/dart.go +++ b/commands/jvm/dart.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dart", Description: "The Dart file containing the main function", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "analyze", Description: "Analyze Dart code in a directory"}, {Name: "directory", Description: "Dart project directory to analyze"}, {Name: "compile", Description: "Compile Dart to various formats"}, @@ -60,7 +60,7 @@ func init() { {Name: "non-nullable", Description: "Non-nullable by default. (no-op - on by default)"}, {Name: "triple-shift", Description: "Triple-shift operator"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--offline", Description: "Use cached packages instead of accessing the network"}, {Name: "--no-offline", Description: "Do not use cached packages instead of accessing the network"}, {Name: "-n", Description: "Report what dependencies would change but don't change any"}, diff --git a/commands/jvm/flutter.go b/commands/jvm/flutter.go index 0f26fd0..d5e5575 100644 --- a/commands/jvm/flutter.go +++ b/commands/jvm/flutter.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "flutter", Description: "Available emulators", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "analyze", Description: "Analyze the project's Dart code"}, {Name: "assemble", Description: "Assemble and build Flutter resources"}, {Name: "attach", Description: "Attach to a running app"}, @@ -55,7 +55,7 @@ func init() { {Name: "file path", Description: "A file path for a symbolized stack trace to be written to"}, {Name: "test", Description: "Run Flutter unit tests for the current project"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Print this usage information"}, {Name: "-v", Description: "Target device id or name (prefixes allowed)"}, {Name: "--version", Description: "Reports the version of this tool"}, diff --git a/commands/jvm/fvm.go b/commands/jvm/fvm.go index b803ead..38992a1 100644 --- a/commands/jvm/fvm.go +++ b/commands/jvm/fvm.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fvm", Description: "Print this usage information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Set configuration for FVM"}, {Name: "path", Description: "Path to the Flutter versions cache"}, {Name: "dart", Description: "Proxies Dart commands"}, @@ -28,7 +28,7 @@ func init() { {Name: "spawn", Description: "Spawn a Flutter SDK version command"}, {Name: "use", Description: "Sets a Flutter SDK version to be used in a project"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Print this usage information"}, {Name: "--verbose", Description: "Print verbose output"}, {Name: "--version", Description: "Current FVM version"}, diff --git a/commands/jvm/gradle.go b/commands/jvm/gradle.go index bceef4e..81ca127 100644 --- a/commands/jvm/gradle.go +++ b/commands/jvm/gradle.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gradle", Description: "Log all warnings", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Compute all outputs"}, {Name: "run", Description: "Run applications"}, {Name: "check", Description: "Run all checks"}, @@ -21,7 +21,7 @@ func init() { {Name: "init", Description: "Create new Gradle builds, with new or existing projects"}, {Name: "test", Description: "Run a test task"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-?", Description: "Shows a help message with all available CLI options"}, {Name: "-v", Description: "Prints Gradle, Groovy, Ant, JVM, and operating system version information"}, {Name: "-S", Description: "Print out the full (very verbose) stacktrace for any exceptions"}, diff --git a/commands/jvm/jenv.go b/commands/jvm/jenv.go index 286e244..c60ca4c 100644 --- a/commands/jvm/jenv.go +++ b/commands/jvm/jenv.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "jenv", Description: "Executable file", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "commands", Description: "List all available JEnv commands"}, {Name: "help", Description: "Parses and displays help contents from a command's source file"}, {Name: "info", Description: "Show information about which command will be executed"}, @@ -39,7 +39,7 @@ func init() { {Name: "versions", Description: "Lists all Java versions found in `$JENV_ROOT/versions/*'"}, {Name: "whence", Description: "List all Java versions that contain the given executable"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--usage", Description: "Show information about which command will be executed"}, {Name: "--unset", Description: "Remove local jEnv settings"}, {Name: "--short", Description: "Show only files without path"}, diff --git a/commands/jvm/jmeter.go b/commands/jvm/jmeter.go index 3aa438e..1c92e18 100644 --- a/commands/jvm/jmeter.go +++ b/commands/jvm/jmeter.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "jmeter", Description: "Apache JMeter - 100% Java Load Testing Tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Print the JMeter version information and exit"}, {Name: "-h", Description: "Print usage information and exit"}, {Name: "-p", Description: "The jmeter property file to use"}, diff --git a/commands/jvm/jvm.go b/commands/jvm/jvm.go index 9612f82..73e2378 100644 --- a/commands/jvm/jvm.go +++ b/commands/jvm/jvm.go @@ -1,15 +1,15 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "javac", Description: "Java compiler", - Generator: core.FileGenerator(".java"), - Options: []core.Option{ + Generator: spec.FileGenerator(".java"), + Options: []spec.Option{ {Name: "-d", Description: "output directory"}, {Name: "-cp", Description: "class path"}, {Name: "-classpath", Description: "class path (long form)"}, @@ -24,11 +24,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "java", Description: "Java runtime", - Generator: core.FileGenerator(".jar", ".class"), - Options: []core.Option{ + Generator: spec.FileGenerator(".jar", ".class"), + Options: []spec.Option{ {Name: "-jar", Description: "run jar file"}, {Name: "-cp", Description: "class path"}, {Name: "-Xmx", Description: "max heap size (e.g. -Xmx512m)"}, @@ -41,11 +41,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kotlinc", Description: "Kotlin compiler", - Generator: core.FileGenerator(".kt", ".kts"), - Options: []core.Option{ + Generator: spec.FileGenerator(".kt", ".kts"), + Options: []spec.Option{ {Name: "-d", Description: "output dir or jar"}, {Name: "-cp", Description: "class path"}, {Name: "-include-runtime", Description: "include runtime in jar"}, diff --git a/commands/jvm/kdoctor.go b/commands/jvm/kdoctor.go index e304b40..736edf4 100644 --- a/commands/jvm/kdoctor.go +++ b/commands/jvm/kdoctor.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kdoctor", Description: "Report a version of KDoctor", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Report a version of KDoctor"}, {Name: "--verbose", Description: "Report an extended information"}, {Name: "--all", Description: "Run extra diagnostics"}, diff --git a/commands/jvm/keytool.go b/commands/jvm/keytool.go index 9717098..5f57c5a 100644 --- a/commands/jvm/keytool.go +++ b/commands/jvm/keytool.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "keytool", Description: "Show help message", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help message"}, {Name: "-v", Description: "Verbose output"}, {Name: "-alias", Description: "Alias name of the entry to process"}, diff --git a/commands/jvm/mvn.go b/commands/jvm/mvn.go index a810350..9eed98a 100644 --- a/commands/jvm/mvn.go +++ b/commands/jvm/mvn.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mvn", Description: "Maven - a Java based project management and comprehension tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--also-make", Description: "Also build projects required by project list"}, {Name: "--also-make-dependents", Description: "Also build projects that depend on projects in the project list"}, {Name: "--batch-mode", Description: "Run in non-interactive (batch)"}, diff --git a/commands/jvm/spring.go b/commands/jvm/spring.go index 53a832b..5fc7564 100644 --- a/commands/jvm/spring.go +++ b/commands/jvm/spring.go @@ -1,14 +1,14 @@ package jvm import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "spring", Description: "Initialize a new project using Spring Initializr", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize a new project using Spring Initializr"}, {Name: "gradle-build", Description: "Generate a Gradle build file"}, {Name: "gradle-project", Description: "Generate a Gradle based project archive using the Groovy DSL"}, @@ -19,7 +19,7 @@ func init() { {Name: "shell", Description: "Start a nested shell"}, {Name: "help", Description: "Show help for other commands"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Project coordinates"}, {Name: "-b", Description: "Spring Boot version"}, {Name: "--build", Description: "Build system to use"}, diff --git a/commands/ops/amplify.go b/commands/ops/amplify.go index 1ade30d..ea9d860 100644 --- a/commands/ops/amplify.go +++ b/commands/ops/amplify.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "amplify", Description: "Environment", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "push", Description: "Provisions cloud resources with the latest local developments"}, {Name: "delete", Description: "Deletes all of the resources tied to the project from the cloud"}, {Name: "add", Description: "Adds a resource for an Amplify category in your local backend"}, @@ -28,7 +28,7 @@ func init() { {Name: "get", Description: "Displays the environment details"}, {Name: "import", Description: "Imports an environment"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "Answer all question as 'Yes'"}, {Name: "-v", Description: "Deletes all of the resources tied to the project from the cloud"}, {Name: "--restore", Description: "Overwrite your local changes"}, diff --git a/commands/ops/ampx.go b/commands/ops/ampx.go index 5e7a106..d003af5 100644 --- a/commands/ops/ampx.go +++ b/commands/ops/ampx.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ampx", Description: "CLI for Amplify Gen 2", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "sandbox", Description: "Deploy to your personal cloud sandbox"}, {Name: "delete", Description: "Delete your personal cloud sandbox"}, {Name: "secret", Description: "Manage backend secrets for your personal cloud sandbox"}, @@ -23,7 +23,7 @@ func init() { {Name: "info", Description: "Generate system information for troubleshooting"}, {Name: "pipeline-deploy", Description: "Deploy Amplify project in a CI/CD pipeline"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--dir-to-watch", Description: "Directory to watch for file changes"}, {Name: "--exclude", Description: "Paths or glob patterns to ignore"}, {Name: "--identifier", Description: "Name to distinguish between sandbox environments"}, diff --git a/commands/ops/ansible.go b/commands/ops/ansible.go index 79d8243..40d3752 100644 --- a/commands/ops/ansible.go +++ b/commands/ops/ansible.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible", Description: "Define and run a single Ansible task", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ask-vault-pass", Description: "Ask for vault password"}, {Name: "--list-hosts", Description: "Outputs a list of matching hosts; does not execute"}, {Name: "--playbook-dir", Description: "Perform a syntax check on the playbook, but do not execute it"}, diff --git a/commands/ops/ansible_config.go b/commands/ops/ansible_config.go index c745309..22dbf5a 100644 --- a/commands/ops/ansible_config.go +++ b/commands/ops/ansible_config.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible-config", Description: "View ansible configuration", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "list", Description: "List and output available configs"}, {Name: "CONFIG_FILE", Description: "Path to configuration file"}, {Name: "TYPE", Description: "Plugin type"}, @@ -18,7 +18,7 @@ func init() { {Name: "init", Description: "Initializes a new config file (to stdout)"}, {Name: "FORMAT", Description: "Output format"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help and exit"}, {Name: "--verbose", Description: "Verbose mode (-vvv for more, -vvvv to enable connection debugging)"}, {Name: "-v", Description: "Verbose mode (-vvv for more, -vvvv to enable connection debugging)"}, diff --git a/commands/ops/ansible_doc.go b/commands/ops/ansible_doc.go index edb4a35..a04c712 100644 --- a/commands/ops/ansible_doc.go +++ b/commands/ops/ansible_doc.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible-doc", Description: "Displays information on modules installed in Ansible libraries", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--metadata-dump", Description: "For internal testing only Dump json metadata for all plugins"}, {Name: "--playbook-dir", Description: "Sets the relative path for many features including roles/ group_vars/ etc"}, {Name: "--version", Description: "Show plugin names and their source files without summaries (implies --list)"}, diff --git a/commands/ops/ansible_galaxy.go b/commands/ops/ansible_galaxy.go index 32f75eb..c1f4d0e 100644 --- a/commands/ops/ansible_galaxy.go +++ b/commands/ops/ansible_galaxy.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible-galaxy", Description: "The Galaxy API server URL", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "collection", Description: "Operate on collections"}, {Name: "download", Description: "Download collections"}, {Name: "init", Description: "Initialize collections"}, @@ -30,7 +30,7 @@ func init() { {Name: "info", Description: "Role information"}, {Name: "install", Description: "Install roles"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--server", Description: "The Galaxy API server URL"}, {Name: "--token", Description: "Ignore SSL certificate validation errors"}, {Name: "--clear-response-cache", Description: "Clear the existing server response cache"}, diff --git a/commands/ops/ansible_lint.go b/commands/ops/ansible_lint.go index ed21233..75f5395 100644 --- a/commands/ops/ansible_lint.go +++ b/commands/ops/ansible_lint.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible-lint", Description: "Ansible static code analysis", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Ansible static code analysis"}, {Name: "--help", Description: "Show help for ansible-lint"}, {Name: "--list-rules", Description: "List all the rules"}, diff --git a/commands/ops/ansible_playbook.go b/commands/ops/ansible_playbook.go index 4b75841..e7effc4 100644 --- a/commands/ops/ansible_playbook.go +++ b/commands/ops/ansible_playbook.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ansible-playbook", Description: "Runs Ansible playbooks, executing the defined tasks on the targeted hosts", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ask-vault-pass", Description: "Ask for vault password"}, {Name: "--flush-cache", Description: "Clears the fact cache for every host in inventory"}, {Name: "--force-handlers", Description: "Run handlers even if a task fails"}, diff --git a/commands/ops/appwrite.go b/commands/ops/appwrite.go index 03d5e66..589191a 100644 --- a/commands/ops/appwrite.go +++ b/commands/ops/appwrite.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "appwrite", Description: "Appwrite - Open-Source End-to-End Backend Server", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "login", Description: "The login command allows you to authenticate and manage a user account"}, {Name: "project", Description: "Initialise your Appwrite project"}, {Name: "function", Description: "Initialise your Appwrite cloud function"}, @@ -48,7 +48,7 @@ func init() { {Name: "updatePhoneVerification", Description: "Update the user phone verification status by its unique ID"}, {Name: "client", Description: "The client command allows you to configure your CLI"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--databaseId", Description: "Database ID"}, {Name: "--all", Description: "Flag to initialize all databases"}, {Name: "--functionId", Description: "Function ID"}, diff --git a/commands/ops/arch.go b/commands/ops/arch.go index 27525bc..83a80b1 100644 --- a/commands/ops/arch.go +++ b/commands/ops/arch.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "arch", Description: "32-bit intel", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-arch", Description: "Print architecture type or run select architecture"}, {Name: "-32", Description: "Add the native 32-bit architecture to the list of architectures"}, {Name: "-64", Description: "Add the native 64-bit architecture to the list of architectures"}, diff --git a/commands/ops/arduino_cli.go b/commands/ops/arduino_cli.go index f10ae1f..8d0fa74 100644 --- a/commands/ops/arduino_cli.go +++ b/commands/ops/arduino_cli.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "arduino-cli", Description: "Arduino CLI - build, compile, and upload Arduino sketches", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "board", Description: "Arduino board commands"}, {Name: "FQBN", Description: "Fully qualified board name"}, {Name: "port", Description: "Arduino board port connection"}, @@ -53,7 +53,7 @@ func init() { {Name: "upload", Description: "Upload Arduino sketches. This does NOT compile the sketch prior to upload"}, {Name: "version", Description: "Shows the version number of Arduino CLI which is installed on your system"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--board-options", Description: "Max time to wait for port discovery, example: '30s, 1m (default 1s)'"}, {Name: "-b", Description: "Fully Qualified Board Name, example: 'arduino:avr:uno'"}, {Name: "-h", Description: "Help for attach"}, diff --git a/commands/ops/argo.go b/commands/ops/argo.go index 02d368a..a2e507d 100644 --- a/commands/ops/argo.go +++ b/commands/ops/argo.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "argo", Description: "If True, Use the HTTP client. Defaults to the ARGO_HTTP1 environment variable", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "archive", Description: "Manage the workflow archive"}, {Name: "delete", Description: "Delete a workflow in the archive"}, {Name: "get", Description: "Get a workflow in the archive"}, @@ -41,7 +41,7 @@ func init() { {Name: "wait", Description: "Waits for workflows to complete"}, {Name: "watch", Description: "Watch a workflow until it completes"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--argo-base-href", Description: "If True, Use the HTTP client. Defaults to the ARGO_HTTP1 environment variable"}, {Name: "--argo-server", Description: "Username to impersonate for the operation"}, {Name: "--as-group", Description: "UID to impersonate for the operation"}, diff --git a/commands/ops/asdf.go b/commands/ops/asdf.go index a9bc33b..a16735a 100644 --- a/commands/ops/asdf.go +++ b/commands/ops/asdf.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "asdf", Description: "Plugin name", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--urls", Description: "Show git urls"}, {Name: "--refs", Description: "Show git refs"}, {Name: "--all", Description: "Update all plugins to latest commit on default branch"}, diff --git a/commands/ops/atlas.go b/commands/ops/atlas.go index d84ad17..7fcb088 100644 --- a/commands/ops/atlas.go +++ b/commands/ops/atlas.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "atlas", Description: "CLI tool to manage MongoDB Atlas", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Manage your profile to store access settings for your MongoDB deployment"}, {Name: "init", Description: "Configure a profile to store access settings for your MongoDB deployment"}, {Name: "set", Description: "Configure specific properties of a profile"}, @@ -60,7 +60,7 @@ func init() { {Name: "backup", Description: "Manage cloud backups for your project"}, {Name: "snapshot", Description: "Manage cloud backup snapshots for your project"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--gov", Description: "Create a default profile for atlas for gov"}, {Name: "--output", Description: "Return a specific profile"}, {Name: "--force", Description: "Manage the CLI's authentication state"}, diff --git a/commands/ops/aws.go b/commands/ops/aws.go index ca63af2..3c2ad9e 100644 --- a/commands/ops/aws.go +++ b/commands/ops/aws.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "aws", Description: "Use a specific profile from your credential file", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "account", Description: "Operations for Amazon Web Services Account Management"}, {Name: "amplifybackend", Description: "AWS Amplify Admin API"}, {Name: "apigatewayv2", Description: "Amazon API Gateway V2"}, @@ -60,7 +60,7 @@ func init() { {Name: "trustedadvisor", Description: "TrustedAdvisor Public API"}, {Name: "runtime.sagemaker", Description: "The Amazon SageMaker runtime API"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--profile", Description: "Use a specific profile from your credential file"}, }, }) diff --git a/commands/ops/aws_vault.go b/commands/ops/aws_vault.go index 9b31156..19fc549 100644 --- a/commands/ops/aws_vault.go +++ b/commands/ops/aws_vault.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "aws-vault", Description: "Add credentials to the secure keystore", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Force-remove the profile without a prompt"}, {Name: "--profiles", Description: "Show only the profile names"}, {Name: "--sessions", Description: "Show only the session names"}, diff --git a/commands/ops/bit.go b/commands/ops/bit.go index 3c145c1..27caea0 100644 --- a/commands/ops/bit.go +++ b/commands/ops/bit.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bit", Description: "Bit documentation: https://bit.dev/docs", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create or reinitialize an empty workspace"}, {Name: "new", Description: "Create a new workspace from a template"}, {Name: "config", Description: "Global config management"}, @@ -60,7 +60,7 @@ func init() { {Name: "component-names", Description: "Names or IDs of the components to link"}, {Name: "component-issues", Description: "List available component-issues"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--bare", Description: "Initialize an empty bit bare scope"}, {Name: "--shared", Description: "Add group write permissions to a scope"}, {Name: "--standalone", Description: "Do not nest component store within .git"}, diff --git a/commands/ops/bosh.go b/commands/ops/bosh.go index dae6c19..0125abe 100644 --- a/commands/ops/bosh.go +++ b/commands/ops/bosh.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bosh", Description: "Deployment", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add-blob", Description: "Add blob"}, {Name: "unignore", Description: "Unignore an instance"}, {Name: "update-cloud-config", Description: "Update current cloud config"}, @@ -60,7 +60,7 @@ func init() { {Name: "log-in", Description: "Login"}, {Name: "log-out", Description: "Log out"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Show CLI version"}, {Name: "--config", Description: "Config file path (default: ~/.bosh/config)"}, {Name: "-e", Description: "Director environment name or URL"}, diff --git a/commands/ops/capacitor.go b/commands/ops/capacitor.go index b25f734..f7c5a67 100644 --- a/commands/ops/capacitor.go +++ b/commands/ops/capacitor.go @@ -1,20 +1,20 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "capacitor", Description: "Add a native platform project to your app", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add a native platform project to your app"}, {Name: "ls", Description: "List all installed Cordova and Capacitor plugins"}, {Name: "sync", Description: "This command runs copy and then update"}, {Name: "update", Description: "Updates the native plugins and dependencies referenced in package.json"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--list", Description: "Print a list of target devices available to the given platform"}, {Name: "--target", Description: "Run on a specific target device"}, {Name: "--deployment", Description: "Podfile.lock won't be deleted and pod install will use --deployment option"}, diff --git a/commands/ops/cdk.go b/commands/ops/cdk.go index 34d6140..e2ab3b5 100644 --- a/commands/ops/cdk.go +++ b/commands/ops/cdk.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cdk", Description: "AWS CDK CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a new, empty CDK project from a template"}, {Name: "metadata", Description: "Returns all metadata associated with this stack"}, {Name: "doctor", Description: "Check your set-up for potential problems"}, @@ -25,7 +25,7 @@ func init() { {Name: "context", Description: "Manage cached context values"}, {Name: "doc", Description: "Opens the reference documentation in a browser"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "The current version"}, {Name: "-h", Description: "Show help"}, }, diff --git a/commands/ops/cf.go b/commands/ops/cf.go index f54eba0..e00e26a 100644 --- a/commands/ops/cf.go +++ b/commands/ops/cf.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cf", Description: "Cloudfoundry cli", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "app", Description: "Display health and status for app"}, {Name: "APP_NAME", Description: "The app you want to get health and status for"}, {Name: "ssh", Description: "Display health and status for app"}, @@ -60,7 +60,7 @@ func init() { {Name: "unbind-route-service", Description: "Unbind a service instance from an HTTP route"}, {Name: "create-user-provided-service", Description: "Make a user-provided service instance available to CF apps"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--guid", Description: "Display health and status for app"}, {Name: "-v", Description: "Verbose output"}, {Name: "-a", Description: "API endpoint (e.g. https://api.example.com)"}, diff --git a/commands/ops/checkov.go b/commands/ops/checkov.go index 94e20be..ed47c5f 100644 --- a/commands/ops/checkov.go +++ b/commands/ops/checkov.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "checkov", Description: "Branch", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for checkov"}, {Name: "--version", Description: "Show the version of checkov"}, {Name: "--quiet", Description: "CLI output, display only failed checks"}, diff --git a/commands/ops/circleci.go b/commands/ops/circleci.go index 146881f..534546d 100644 --- a/commands/ops/circleci.go +++ b/commands/ops/circleci.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "circleci", Description: "CircleCI CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate shell completion scripts"}, {Name: "bash", Description: "Generate bash completion scripts"}, {Name: "zsh", Description: "Generate zsh completion scripts"}, @@ -60,7 +60,7 @@ func init() { {Name: "runner", Description: "Operate on runners"}, {Name: "instance", Description: "Operate on runner instances"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--private", Description: "Show metadata of an orb"}, {Name: "-u", Description: "Include uncertified orbs"}, {Name: "--input", Description: "Path to input file, i.e. ./.circleci/config.yml"}, diff --git a/commands/ops/cloudflared.go b/commands/ops/cloudflared.go index d783a24..e5ce912 100644 --- a/commands/ops/cloudflared.go +++ b/commands/ops/cloudflared.go @@ -1,19 +1,19 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cloudflared", Description: "Specify the hostname of your application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install cloudflared as an user launch agent"}, {Name: "uninstall", Description: "Uninstall the cloudflared launch agent"}, {Name: "help", Description: "Shows a list of commands or help for one command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--hostname", Description: "Specify the hostname of your application"}, {Name: "--destination", Description: "Specify the destination address of your SSH server"}, {Name: "--url", Description: "Specify the host:port to forward data to Cloudflare edge"}, diff --git a/commands/ops/coda.go b/commands/ops/coda.go index 51a25a5..1c51784 100644 --- a/commands/ops/coda.go +++ b/commands/ops/coda.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "coda", Description: "Coda CLI - interact with Coda docs and tables", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize an empty project with the recommended settings and dependencies"}, {Name: "execute", Description: "Execute the formula and print the output to the terminal"}, {Name: "formula", Description: "Formula name to execute"}, @@ -25,7 +25,7 @@ func init() { {Name: "option", Description: "Currently the only supported option is 'timerStrategy'"}, {Name: "value", Description: "Value to set for the option"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--dynamicUrl", Description: "The URL to sync from"}, {Name: "--name", Description: "The desired Pack name"}, {Name: "--description", Description: "The Pack description"}, diff --git a/commands/ops/command.go b/commands/ops/command.go index d543ece..7b20ccf 100644 --- a/commands/ops/command.go +++ b/commands/ops/command.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "command", Description: "Run an external command", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Print the location of the command"}, }, }) diff --git a/commands/ops/copilot.go b/commands/ops/copilot.go index dafddbd..e84bd9a 100644 --- a/commands/ops/copilot.go +++ b/commands/ops/copilot.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "copilot", Description: "Name of the application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a new ECS or App Runner application"}, {Name: "docs", Description: "Open the copilot docs"}, {Name: "ls", Description: "Lists all the applications in your account"}, @@ -32,7 +32,7 @@ func init() { {Name: "update", Description: "Deploys a pipeline for the services in your workspace"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--app", Description: "Name of the application"}, {Name: "--name", Description: "Name of the environment"}, {Name: "--help", Description: "Help for command"}, diff --git a/commands/ops/cosign.go b/commands/ops/cosign.go index 10e6f25..47869d6 100644 --- a/commands/ops/cosign.go +++ b/commands/ops/cosign.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cosign", Description: "Provides utilities for attaching artifacts to other artifacts in a registry", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "attach", Description: "Provides utilities for attaching artifacts to other artifacts in a registry"}, {Name: "attestation", Description: "Attach attestation to the supplied container image"}, {Name: "sbom", Description: "Attach sbom to the supplied container image"}, @@ -38,7 +38,7 @@ func init() { {Name: "version", Description: "Prints the version"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--output-file", Description: "Log output to a file"}, {Name: "--timeout", Description: "Timeout for commands"}, {Name: "--verbose", Description: "Log debug output"}, diff --git a/commands/ops/dapr.go b/commands/ops/dapr.go index 4238c93..fcdc17a 100644 --- a/commands/ops/dapr.go +++ b/commands/ops/dapr.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dapr", Description: "Distributed Application Runtime CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build-info", Description: "Print build info of Dapr CLI and runtime"}, {Name: "completion", Description: "Generates shell completion scripts"}, {Name: "bash", Description: "Generates bash completion scripts"}, @@ -32,7 +32,7 @@ func init() { {Name: "version", Description: "Print the Dapr runtime and CLI version"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--api-token-secret", Description: "The secret to use for the API token"}, {Name: "--app-id", Description: "The app id to annotate"}, {Name: "--app-max-concurrency", Description: "The maximum number of concurrent requests to allow"}, diff --git a/commands/ops/datree.go b/commands/ops/datree.go index f85ee9f..9c9625d 100644 --- a/commands/ops/datree.go +++ b/commands/ops/datree.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "datree", Description: "Help for", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate completion script for bash,zsh,fish,powershell"}, {Name: "config", Description: "Internal configuration management for datree config file"}, {Name: "get", Description: "Get configuration value"}, @@ -18,7 +18,7 @@ func init() { {Name: "test", Description: "Test kustomization files"}, {Name: "version", Description: "Print the version number"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Help for 'test'"}, {Name: "--ignore-missing-schemas", Description: "Ignore missing schemas when executing schema validation step"}, {Name: "--no-record", Description: "Do not send policy checks metadata to the backend"}, diff --git a/commands/ops/deployctl.go b/commands/ops/deployctl.go index 8c6f060..1ad57ae 100644 --- a/commands/ops/deployctl.go +++ b/commands/ops/deployctl.go @@ -1,18 +1,18 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "deployctl", Description: "Command line tool for Deno Deploy", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "deploy", Description: "Deploy a script with static files to Deno Deploy"}, {Name: "upgrade", Description: "Upgrade deployctl"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--exclude", Description: "Exclude files that match this pattern"}, {Name: "--include", Description: "Only upload files that match this pattern"}, {Name: "--no-static", Description: "Don't include the files in the CWD as static files"}, diff --git a/commands/ops/direnv.go b/commands/ops/direnv.go index dbc56a7..20e23b2 100644 --- a/commands/ops/direnv.go +++ b/commands/ops/direnv.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "direnv", Description: "Help for direnv", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "allow", Description: "Grants direnv to load the given .envrc"}, {Name: "deny", Description: "Revokes the authorization of a given .envrc"}, {Name: "exec", Description: "Executes a command after loading the first .envrc found in DIR"}, diff --git a/commands/ops/docker.go b/commands/ops/docker.go index 7da1c2f..b9a7905 100644 --- a/commands/ops/docker.go +++ b/commands/ops/docker.go @@ -6,11 +6,11 @@ import ( "strings" "time" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func dockerContainerGenerator(tokens []string, _ string, _ string) []core.Suggestion { - cwd := core.GetCWD() +func dockerContainerGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + cwd := spec.GetCWD() ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -21,19 +21,19 @@ func dockerContainerGenerator(tokens []string, _ string, _ string) []core.Sugges return nil } - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { continue } - results = append(results, core.Suggestion{Cmd: line, Desc: "container"}) + results = append(results, spec.Suggestion{Cmd: line, Desc: "container"}) } return results } -func dockerRunningContainerGenerator(tokens []string, _ string, _ string) []core.Suggestion { - cwd := core.GetCWD() +func dockerRunningContainerGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + cwd := spec.GetCWD() ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -44,19 +44,19 @@ func dockerRunningContainerGenerator(tokens []string, _ string, _ string) []core return nil } - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { continue } - results = append(results, core.Suggestion{Cmd: line, Desc: "running"}) + results = append(results, spec.Suggestion{Cmd: line, Desc: "running"}) } return results } -func dockerImageGenerator(tokens []string, _ string, _ string) []core.Suggestion { - cwd := core.GetCWD() +func dockerImageGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + cwd := spec.GetCWD() ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -68,27 +68,27 @@ func dockerImageGenerator(tokens []string, _ string, _ string) []core.Suggestion } seen := make(map[string]bool) - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" || line == ":" || seen[line] { continue } seen[line] = true - results = append(results, core.Suggestion{Cmd: line, Desc: "image"}) + results = append(results, spec.Suggestion{Cmd: line, Desc: "image"}) } return results } func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "docker", Description: "container engine", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ { Name: "ps", Description: "list containers", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "show all"}, {Name: "-q", Description: "only show IDs"}, {Name: "--format", Description: "format output"}, @@ -98,8 +98,8 @@ func init() { { Name: "build", Description: "build image", - Generator: core.FileGenerator(".dockerfile", ".Dockerfile"), - Options: []core.Option{ + Generator: spec.FileGenerator(".dockerfile", ".Dockerfile"), + Options: []spec.Option{ {Name: "-t", Description: "tag name"}, {Name: "-f", Description: "dockerfile path"}, {Name: "--no-cache", Description: "no build cache"}, @@ -111,7 +111,7 @@ func init() { Name: "run", Description: "run container", Generator: dockerImageGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "detached mode"}, {Name: "-p", Description: "port mapping"}, {Name: "-v", Description: "volume mount"}, @@ -136,7 +136,7 @@ func init() { Name: "exec", Description: "exec in container", Generator: dockerRunningContainerGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-it", Description: "interactive tty"}, {Name: "-e", Description: "set env variable"}, {Name: "-u", Description: "run as user"}, @@ -161,7 +161,7 @@ func init() { Name: "rm", Description: "remove container", Generator: dockerContainerGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "force remove"}, {Name: "-v", Description: "remove volumes"}, }, @@ -170,14 +170,14 @@ func init() { Name: "rmi", Description: "remove image", Generator: dockerImageGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "force remove"}, }, }, { Name: "images", Description: "list images", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "show all"}, {Name: "-q", Description: "only IDs"}, {Name: "--format", Description: "format output"}, @@ -187,7 +187,7 @@ func init() { Name: "logs", Description: "view logs", Generator: dockerContainerGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "follow output"}, {Name: "--tail", Description: "last n lines"}, {Name: "--since", Description: "since timestamp"}, @@ -197,7 +197,7 @@ func init() { { Name: "inspect", Description: "show low-level info", - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { containers := dockerContainerGenerator(tokens, prefix, partial) images := dockerImageGenerator(tokens, prefix, partial) return append(containers, images...) @@ -206,20 +206,20 @@ func init() { { Name: "compose", Description: "multi-container", - Subcommands: []core.Subcommand{ - {Name: "up", Description: "start services", Options: []core.Option{{Name: "-d", Description: "detached"}, {Name: "--build", Description: "rebuild images"}}}, - {Name: "down", Description: "stop services", Options: []core.Option{{Name: "-v", Description: "remove volumes"}}}, + Subcommands: []spec.Subcommand{ + {Name: "up", Description: "start services", Options: []spec.Option{{Name: "-d", Description: "detached"}, {Name: "--build", Description: "rebuild images"}}}, + {Name: "down", Description: "stop services", Options: []spec.Option{{Name: "-v", Description: "remove volumes"}}}, {Name: "build", Description: "build services"}, - {Name: "logs", Description: "view logs", Options: []core.Option{{Name: "-f", Description: "follow"}}}, + {Name: "logs", Description: "view logs", Options: []spec.Option{{Name: "-f", Description: "follow"}}}, {Name: "ps", Description: "list services"}, {Name: "exec", Description: "execute command"}, {Name: "restart", Description: "restart services"}, {Name: "pull", Description: "pull images"}, {Name: "stop", Description: "stop services"}, {Name: "start", Description: "start services"}, - {Name: "config", Description: "validate config", Generator: core.FileGenerator(".yml", ".yaml")}, + {Name: "config", Description: "validate config", Generator: spec.FileGenerator(".yml", ".yaml")}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "compose file"}, {Name: "--project-name", Description: "project name"}, }, @@ -227,7 +227,7 @@ func init() { { Name: "network", Description: "manage networks", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ls", Description: "list networks"}, {Name: "create", Description: "create network"}, {Name: "rm", Description: "remove network"}, @@ -238,7 +238,7 @@ func init() { { Name: "volume", Description: "manage volumes", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ls", Description: "list volumes"}, {Name: "create", Description: "create volume"}, {Name: "rm", Description: "remove volume"}, @@ -249,8 +249,8 @@ func init() { { Name: "system", Description: "manage docker system", - Subcommands: []core.Subcommand{ - {Name: "prune", Description: "remove unused data", Options: []core.Option{{Name: "-a", Description: "remove all unused"}, {Name: "--volumes", Description: "include volumes"}}}, + Subcommands: []spec.Subcommand{ + {Name: "prune", Description: "remove unused data", Options: []spec.Option{{Name: "-a", Description: "remove all unused"}, {Name: "--volumes", Description: "include volumes"}}}, {Name: "df", Description: "show disk usage"}, {Name: "info", Description: "system info"}, }, @@ -258,20 +258,20 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "docker-compose", Description: "multi-container (legacy)", - Subcommands: []core.Subcommand{ - {Name: "up", Description: "start services", Options: []core.Option{{Name: "-d", Description: "detached"}, {Name: "--build", Description: "rebuild"}}}, - {Name: "down", Description: "stop services", Options: []core.Option{{Name: "-v", Description: "remove volumes"}}}, + Subcommands: []spec.Subcommand{ + {Name: "up", Description: "start services", Options: []spec.Option{{Name: "-d", Description: "detached"}, {Name: "--build", Description: "rebuild"}}}, + {Name: "down", Description: "stop services", Options: []spec.Option{{Name: "-v", Description: "remove volumes"}}}, {Name: "build", Description: "build services"}, - {Name: "logs", Description: "view logs", Options: []core.Option{{Name: "-f", Description: "follow"}}}, + {Name: "logs", Description: "view logs", Options: []spec.Option{{Name: "-f", Description: "follow"}}}, {Name: "ps", Description: "list services"}, {Name: "exec", Description: "execute command"}, {Name: "restart", Description: "restart services"}, {Name: "pull", Description: "pull images"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "compose file"}, }, }) diff --git a/commands/ops/doctl.go b/commands/ops/doctl.go index 0366de8..5132a26 100644 --- a/commands/ops/doctl.go +++ b/commands/ops/doctl.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "doctl", Description: "The official DigitalOcean command line interface (CLI)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Display help about commands"}, {Name: "get", Description: "Retrieve account profile details"}, {Name: "ratelimit", Description: "Retrieve your API usage and the remaining quota"}, @@ -60,7 +60,7 @@ func init() { {Name: "db", Description: "Display commands for managing individual databases within a cluster"}, {Name: "maintenance-window", Description: "Display commands for scheduling automatic maintenance on your database cluster"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Help for doctl"}, {Name: "-v", Description: "Enable verbose output"}, {Name: "-o", Description: "Desired output format"}, diff --git a/commands/ops/doppler.go b/commands/ops/doppler.go index 1130fdc..7450c50 100644 --- a/commands/ops/doppler.go +++ b/commands/ops/doppler.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "doppler", Description: "The official CLI for Doppler Secret Operations Platform", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "activity", Description: "Get workplace activity logs"}, {Name: "get", Description: "Get workplace activity log"}, {Name: "changelog", Description: "View the CLI's changelog"}, @@ -53,7 +53,7 @@ func init() { {Name: "settings", Description: "Get workplace settings"}, {Name: "setup", Description: "Setup the Doppler CLI for managing secrets"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Config (e.g. dev)"}, {Name: "--fallback-only", Description: "Disable modifying the fallback file. secrets can still be read from the file"}, {Name: "--format", Description: "Do not exit if unable to write the fallback file"}, diff --git a/commands/ops/eas.go b/commands/ops/eas.go index 5dda817..f7b72b0 100644 --- a/commands/ops/eas.go +++ b/commands/ops/eas.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "eas", Description: "Log in with your Expo account", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "account:login", Description: "Log in with your Expo account"}, {Name: "account:logout", Description: "Log out"}, {Name: "account:view", Description: "Show the username you are logged in as"}, @@ -60,7 +60,7 @@ func init() { {Name: "webhook:delete", Description: "Delete a webhook"}, {Name: "ID", Description: "ID of the webhook to delete"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-r", Description: "Refresh cache (ignores displaying instructions)"}, {Name: "--json", Description: "Enable JSON output, non-JSON messages will be printed to stderr"}, {Name: "--non-interactive", Description: "Run the command in non-interactive mode"}, diff --git a/commands/ops/fastly.go b/commands/ops/fastly.go index a138bdb..fcecd6d 100644 --- a/commands/ops/fastly.go +++ b/commands/ops/fastly.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fastly", Description: "A CLI for interacting with the Fastly platform", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "acl", Description: "Manipulate Fastly ACLs (Access Control Lists)"}, {Name: "create", Description: "Create a new ACL attached to the specified service version"}, {Name: "delete", Description: "Delete an ACL from the specified service version"}, @@ -60,7 +60,7 @@ func init() { {Name: "splunk", Description: "Manipulate Fastly service version Splunk logging endpoints"}, {Name: "sumologic", Description: "Manipulate Fastly service version Sumologic logging endpoints"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--name", Description: "'latest', 'active', or the number of a specific version"}, {Name: "--autoclone", Description: "If the selected service version is not editable, clone it and use the clone"}, {Name: "--service-id", Description: "Service ID (falls back to FASTLY_SERVICE_ID, then fastly.toml)"}, diff --git a/commands/ops/firebase.go b/commands/ops/firebase.go index b5680e5..6cb3f79 100644 --- a/commands/ops/firebase.go +++ b/commands/ops/firebase.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "firebase", Description: "ProjectAlias", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "appdistribution:distribute", Description: "Upload a distribution"}, {Name: "apps:android:sha:create", Description: "Add a SHA certificate hash for a given app id"}, {Name: "apps:android:sha:delete", Description: "Delete a SHA certificate hash for a given app id"}, @@ -60,7 +60,7 @@ func init() { {Name: "login:use", Description: "Set the default account to use for this project directory"}, {Name: "logout", Description: "Log the CLI out of Firebase"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--app", Description: "The app id of your Firebase app"}, {Name: "--release-notes", Description: "Release notes to include with this distribution"}, {Name: "--release-notes-file", Description: "Path to file with release notes to include with this distribution"}, diff --git a/commands/ops/flyctl.go b/commands/ops/flyctl.go index 9f696d5..ebbd3df 100644 --- a/commands/ops/flyctl.go +++ b/commands/ops/flyctl.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "flyctl", Description: "Command line tool for Fly.io services", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ping", Description: "Ping the Fly agent"}, {Name: "restart", Description: "Restart the Fly agent"}, {Name: "daemon-start", Description: "Run the Fly agent in the foreground"}, @@ -60,7 +60,7 @@ func init() { {Name: "docs", Description: "View Fly documentation"}, {Name: "doctor", Description: "The DOCTOR command allows you to debug your Fly environment"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--generate-name", Description: "Generate a name for the app"}, {Name: "--name", Description: "The app name to use"}, {Name: "--network", Description: "Specify custom network id"}, diff --git a/commands/ops/fnm.go b/commands/ops/fnm.go index a08b4c7..6279037 100644 --- a/commands/ops/fnm.go +++ b/commands/ops/fnm.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fnm", Description: "Fast and simple Node.js version manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install a new Node.js version"}, {Name: "uninstall", Description: "Uninstall a Node.js version"}, {Name: "use", Description: "Change Node.js version"}, @@ -24,7 +24,7 @@ func init() { {Name: "env", Description: "Print and set up required environment variables for fnm"}, {Name: "help", Description: "Prints the help page or the help of the given subcommand(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--lts", Description: "Install latest LTS"}, {Name: "--install-if-missing", Description: "Install the version if it isn't installed yet"}, {Name: "--help", Description: "Prints help information"}, diff --git a/commands/ops/gcloud.go b/commands/ops/gcloud.go index d954bb0..5c26b11 100644 --- a/commands/ops/gcloud.go +++ b/commands/ops/gcloud.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gcloud", Description: "Manage Google Cloud Platform resources and developer workflow", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "access-context-manager", Description: "Manage Access Context Manager resources"}, {Name: "active-directory", Description: "Manage Managed Microsoft AD resources"}, {Name: "ai-platform", Description: "Manage AI Platform jobs and models"}, diff --git a/commands/ops/gh.go b/commands/ops/gh.go index 73b0757..1003dd7 100644 --- a/commands/ops/gh.go +++ b/commands/ops/gh.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gh", Description: "Current branch", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "alias", Description: "Create command shortcuts"}, {Name: "delete", Description: "Delete an alias"}, {Name: "list", Description: "List available aliases"}, @@ -60,7 +60,7 @@ func init() { {Name: "key-file", Description: "Path to the public key file"}, {Name: "key-id", Description: "ID of the key to delete"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Name of the codespace"}, {Name: "--clone", Description: "Clone the fork {true|false}"}, {Name: "-y", Description: "Skip the confirmation prompt"}, diff --git a/commands/ops/gpg.go b/commands/ops/gpg.go index b1cda6c..3d9ba3f 100644 --- a/commands/ops/gpg.go +++ b/commands/ops/gpg.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gpg", Description: "Encryption and signing tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--homedir", Description: "Set the name of the home directory"}, {Name: "--options", Description: "Read options from file"}, {Name: "-a", Description: "Create ASCII armored output"}, diff --git a/commands/ops/hasura.go b/commands/ops/hasura.go index 40c9e8c..9be1838 100644 --- a/commands/ops/hasura.go +++ b/commands/ops/hasura.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hasura", Description: ".env filename to load ENV vars from", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "actions", Description: "Manage Hasura actions"}, {Name: "codegen", Description: "Generate code for actions"}, {Name: "create", Description: "Create a Hasura action"}, @@ -41,7 +41,7 @@ func init() { {Name: "update-cli", Description: "Update the CLI to latest or a specific version"}, {Name: "version", Description: "Print the CLI version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--envfile", Description: ".env filename to load ENV vars from"}, {Name: "-h", Description: "Help for hasura"}, {Name: "--log-level", Description: "Log level"}, diff --git a/commands/ops/helm.go b/commands/ops/helm.go index e6225a2..b6aaecb 100644 --- a/commands/ops/helm.go +++ b/commands/ops/helm.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "helm", Description: "The Helm package manager for Kubernetes", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate autocompletion scripts for the specified shell"}, {Name: "bash", Description: "Generate autocompletion script for bash"}, {Name: "fish", Description: "Generate autocompletion script for fish"}, @@ -58,7 +58,7 @@ func init() { {Name: "version", Description: "Print the client version information"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-descriptions", Description: "Disable completion descriptions"}, {Name: "--starter", Description: "The name or absolute path to Helm starter scaffold"}, {Name: "--keyring", Description: "Keyring containing public keys"}, diff --git a/commands/ops/helmfile.go b/commands/ops/helmfile.go index f992730..4b30147 100644 --- a/commands/ops/helmfile.go +++ b/commands/ops/helmfile.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "helmfile", Description: "Deploy helm charts", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "apply", Description: "Apply all resources from state file only when there are changes"}, {Name: "build", Description: "Build all resources from state file"}, {Name: "cache", Description: "Cache management"}, @@ -25,7 +25,7 @@ func init() { {Name: "test", Description: "Test charts from state file (helm test)"}, {Name: "version", Description: "Print the CLI version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Do not exit with an error code if the provided selector has no matching releases"}, {Name: "--allow-no-matching-release", Description: "Show help for helmfile"}, {Name: "--chart", Description: "Output with color"}, diff --git a/commands/ops/hugo.go b/commands/ops/hugo.go index 794edef..aaff295 100644 --- a/commands/ops/hugo.go +++ b/commands/ops/hugo.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hugo", Description: "The world's fastest framework for building websites", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "check", Description: "Contains some verification checks"}, {Name: "ulimit", Description: "Check system ulimit settings"}, {Name: "config", Description: "Print the site configuration"}, @@ -48,7 +48,7 @@ func init() { {Name: "server", Description: "A high performance webserver"}, {Name: "version", Description: "Print the version number of Hugo"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Config file (default is path/config.yaml|json|toml)"}, {Name: "--configDir", Description: "Config dir (default 'config')"}, {Name: "--debug", Description: "Debug output (default false)"}, diff --git a/commands/ops/k3d.go b/commands/ops/k3d.go index d73ec9b..11eb8ee 100644 --- a/commands/ops/k3d.go +++ b/commands/ops/k3d.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "k3d", Description: "Little helper to run k3s in Docker", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "cluster", Description: "Manage k3s clusters"}, {Name: "create", Description: "Create a new k3s cluster"}, {Name: "cluster name", Description: "Name of the cluster to create"}, @@ -53,7 +53,7 @@ func init() { {Name: "Registry Name", Description: "Name of the registry"}, {Name: "version", Description: "Show k3d and default k3s version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Number of agents to create"}, {Name: "--agents-memory", Description: "Memory limit imposed on the agents nodes"}, {Name: "--api-port", Description: "Specify the Kubernetes API server port exposed on the LoadBalancer"}, diff --git a/commands/ops/k6.go b/commands/ops/k6.go index 12e948c..0ef6d77 100644 --- a/commands/ops/k6.go +++ b/commands/ops/k6.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "k6", Description: "Create an archive", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "archive", Description: "Create an archive"}, {Name: "cloud", Description: "Run a test on the cloud"}, {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, @@ -60,7 +60,7 @@ func init() { {Name: "max", Description: "Max available virtual users"}, {Name: "stats", Description: "Show test metrics"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--address", Description: "Address of the API server"}, {Name: "--batch", Description: "Max parallel batch reqs (default 20)"}, {Name: "--batch-per-host", Description: "Max parallel batch reqs per host (default 6)"}, diff --git a/commands/ops/k9s.go b/commands/ops/k9s.go index ee9e6f4..cc223f7 100644 --- a/commands/ops/k9s.go +++ b/commands/ops/k9s.go @@ -1,19 +1,19 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "k9s", Description: "Kubernetes namespace", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Help about any command"}, {Name: "info", Description: "Print configuration info"}, {Name: "version", Description: "Print version/build info"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Help for info"}, {Name: "-s", Description: "Prints K9s version info in short format"}, {Name: "-A", Description: "Launch K9s in all namespaces"}, diff --git a/commands/ops/kind.go b/commands/ops/kind.go index 5070820..dd15404 100644 --- a/commands/ops/kind.go +++ b/commands/ops/kind.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kind", Description: "Cluster", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "Build", Description: "Build one of [node-image]"}, {Name: "node-image", Description: "Builds a node image"}, {Name: "architecture", Description: "Architecture to build for, defaults to the host architecture"}, @@ -34,7 +34,7 @@ func init() { {Name: "image-archive", Description: "Loads docker images from archive into all or specified nodes by name"}, {Name: "version", Description: "Prints the kind CLI version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--arch", Description: "Architecture to build for, defaults to the host architecture"}, {Name: "--base-image", Description: "Base image to use for the node image"}, {Name: "--image", Description: "Name:tag of the resulting image to be built"}, diff --git a/commands/ops/knex.go b/commands/ops/knex.go index d1c4d3d..32ac683 100644 --- a/commands/ops/knex.go +++ b/commands/ops/knex.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "knex", Description: "SQL query builder for JavaScript", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a fresh knexfile"}, {Name: "migrate:make", Description: "Create a named migration file"}, {Name: "migrate:latest", Description: "Run all migrations that have not yet been run"}, @@ -22,7 +22,7 @@ func init() { {Name: "seed:run", Description: "Run seed files"}, {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Output the version number"}, {Name: "--debug", Description: "Run with debugging"}, {Name: "--knexfile", Description: "Specify the knexfile path"}, diff --git a/commands/ops/kubectl.go b/commands/ops/kubectl.go index 7b8ef4d..3484852 100644 --- a/commands/ops/kubectl.go +++ b/commands/ops/kubectl.go @@ -1,16 +1,16 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kubectl", Description: "kubernetes cli", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "get", Description: "display resources", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "pods", Description: "list pods"}, {Name: "services", Description: "list services"}, {Name: "deployments", Description: "list deployments"}, @@ -19,13 +19,13 @@ func init() { }, }, {Name: "apply", Description: "apply config", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "filename"}, }, }, {Name: "describe", Description: "show details"}, {Name: "logs", Description: "view pod logs", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "follow logs"}, }, }, diff --git a/commands/ops/kubectx.go b/commands/ops/kubectx.go index 3b626c5..a835f03 100644 --- a/commands/ops/kubectx.go +++ b/commands/ops/kubectx.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kubectx", Description: "Switch between Kubernetes-contexts", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for kubectx"}, {Name: "--current", Description: "Show current context"}, {Name: "--unset", Description: "Unset the current context"}, diff --git a/commands/ops/kubens.go b/commands/ops/kubens.go index cb68132..4a55249 100644 --- a/commands/ops/kubens.go +++ b/commands/ops/kubens.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kubens", Description: "Switch between Kubernetes-namespaces", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for kubens"}, {Name: "--current", Description: "Show current namespace"}, }, diff --git a/commands/ops/limactl.go b/commands/ops/limactl.go index 80d9748..fd616a2 100644 --- a/commands/ops/limactl.go +++ b/commands/ops/limactl.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "limactl", Description: "Lima: Linux virtual machines, with a focus on running containers", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, {Name: "copy", Description: "Copy files between host and guest"}, {Name: "delete", Description: "Delete an instance of Lima"}, @@ -22,7 +22,7 @@ func init() { {Name: "stop", Description: "Stop an instance"}, {Name: "validate", Description: "Validate YAML files"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Debug mode"}, {Name: "--no-descriptions", Description: "Disable completion descriptions"}, {Name: "-r", Description: "Copy directories recursively"}, diff --git a/commands/ops/locust.go b/commands/ops/locust.go index 3eb5058..89a0a80 100644 --- a/commands/ops/locust.go +++ b/commands/ops/locust.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "locust", Description: "Show program", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Show program's version number and exit"}, {Name: "-h", Description: "Show this help message and exit"}, {Name: "-f", Description: "Show program's version number and exit"}, diff --git a/commands/ops/lpass.go b/commands/ops/lpass.go index 3bfcf6c..a3d86e4 100644 --- a/commands/ops/lpass.go +++ b/commands/ops/lpass.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lpass", Description: "Command line interface for LastPass", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "login", Description: "Log in to LastPass"}, {Name: "USERNAME", Description: "LastPass account username (email address)"}, {Name: "logout", Description: "Log out of LastPass"}, @@ -47,7 +47,7 @@ func init() { {Name: "limit", Description: "Manipulate LastPass Shared Folder access"}, {Name: "sites", Description: "LastPass sites to manipulate"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--trust", Description: "Subsequent logins will not require multifactor authentication"}, {Name: "--plaintext-key", Description: "Save decryption key to the hard disk in plaintext"}, {Name: "--force", Description: "Skip user confirmation"}, diff --git a/commands/ops/minikube.go b/commands/ops/minikube.go index da4d96f..62f50d1 100644 --- a/commands/ops/minikube.go +++ b/commands/ops/minikube.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "minikube", Description: "Format to print stdout in", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "start", Description: "Starts a local Kubernetes cluster"}, {Name: "status", Description: "Gets the status of a local Kubernetes cluster"}, {Name: "stop", Description: "Stops a running local Kubernetes cluster"}, @@ -60,7 +60,7 @@ func init() { {Name: "completion", Description: "Generate command completion for a shell"}, {Name: "bash", Description: "Bash completion"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--output", Description: "Format to print stdout in"}, {Name: "--shell", Description: "Force environment to be configured for a specified shell"}, {Name: "--unset", Description: "Unset variables instead of setting them"}, diff --git a/commands/ops/mongocli.go b/commands/ops/mongocli.go index 9673892..5017973 100644 --- a/commands/ops/mongocli.go +++ b/commands/ops/mongocli.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mongocli", Description: "CLI tool to manage your MongoDB Cloud", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Configure a profile to store access settings for your MongoDB deployment"}, {Name: "set", Description: "Configure specific properties of a profile"}, {Name: "ls", Description: "List available profiles"}, @@ -60,7 +60,7 @@ func init() { {Name: "disable", Description: "Disable the application-managed slow operation threshold for your project"}, {Name: "log", Description: "Download host logs for your project"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--output", Description: "Return a specific profile"}, {Name: "--force", Description: "MongoDB Atlas operations"}, {Name: "--accessListIp", Description: "IP address to be allowed to access the deployment"}, diff --git a/commands/ops/mongoimport.go b/commands/ops/mongoimport.go index 70bcf99..6dc1764 100644 --- a/commands/ops/mongoimport.go +++ b/commands/ops/mongoimport.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mongoimport", Description: "Import data from a JSON, CSV, or TSV file into a MongoDB instance", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Returns information on the options and use of mongoimport"}, {Name: "--verbose", Description: "Runs mongoimport in a quiet mode that attempts to limit the amount of output"}, {Name: "--version", Description: "Returns the mongoimport release number"}, diff --git a/commands/ops/mongosh.go b/commands/ops/mongosh.go index 7d231cd..d32a40a 100644 --- a/commands/ops/mongosh.go +++ b/commands/ops/mongosh.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mongosh", Description: "Default Connection String; Equivalent to running mongosh without any commands", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "View your current mongosh version"}, {Name: "--shell", Description: "Returns information on the options and use of the MongoDB Shell"}, {Name: "--authenticationDatabase", Description: "This option is available only in MongoDB Enterprise"}, diff --git a/commands/ops/multipass.go b/commands/ops/multipass.go index ef9b661..1e3e895 100644 --- a/commands/ops/multipass.go +++ b/commands/ops/multipass.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "multipass", Description: "Displays help on commandline options", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "alias", Description: "Create an alias"}, {Name: "definition", Description: "Alias definition in the form :"}, {Name: "aliases", Description: "List available aliases"}, @@ -41,7 +41,7 @@ func init() { {Name: "unalias", Description: "Remove an alias"}, {Name: "version", Description: "Show version details"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Displays help on commandline options"}, {Name: "--help-all", Description: "Displays help including Qt specific options"}, {Name: "-v", Description: "Increase logging verbosity. Repeat the 'v' in the short"}, diff --git a/commands/ops/mysql.go b/commands/ops/mysql.go index 203e2bf..4951c82 100644 --- a/commands/ops/mysql.go +++ b/commands/ops/mysql.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mysql", Description: "Mysql is a terminal-based front-end to MySQL", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--auto-rehash", Description: "Enable automatic rehashing"}, {Name: "--auto-vertical-output", Description: "Enable automatic vertical result set display"}, {Name: "--batch", Description: "Do not use history file"}, diff --git a/commands/ops/netlify.go b/commands/ops/netlify.go index f3ad674..3aa7468 100644 --- a/commands/ops/netlify.go +++ b/commands/ops/netlify.go @@ -1,18 +1,18 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "netlify", Description: "Print debugging information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "List available sub-commands"}, {Name: "subcommand", Description: "The command to display help for"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--debug", Description: "Print debugging information"}, {Name: "--httpProxy", Description: "Proxy server address to route requests through"}, {Name: "-f", Description: "Delete without prompting (useful for CI)"}, diff --git a/commands/ops/newman.go b/commands/ops/newman.go index c9437c6..0e6dcd7 100644 --- a/commands/ops/newman.go +++ b/commands/ops/newman.go @@ -1,18 +1,18 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "newman", Description: "Newman is a command-line collection runner for Postman", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "run", Description: "Initiate a Postman Collection run from a given URL or path"}, {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Specify a URL or path to a Postman Environment"}, {Name: "-g", Description: "Specify a URL or path to a file containing Postman Globals"}, {Name: "-r", Description: "Specify the reporters to use for this run"}, diff --git a/commands/ops/nginx.go b/commands/ops/nginx.go index 7745f46..0114a73 100644 --- a/commands/ops/nginx.go +++ b/commands/ops/nginx.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nginx", Description: "Nginx (pronounced", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Use an alternative configuration file"}, {Name: "-e", Description: "Set global configuration directives"}, {Name: "-p", Description: "Set the prefix path. The default value is %%PREFIX%%"}, diff --git a/commands/ops/ngrok.go b/commands/ops/ngrok.go index 69bbb79..5136749 100644 --- a/commands/ops/ngrok.go +++ b/commands/ops/ngrok.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ngrok", Description: "Path to log file,", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Shows a list of commands or help for one command"}, {Name: "authtoken", Description: "Save authtoken to configuration file"}, {Name: "credits", Description: "Prints author and licensing information"}, @@ -20,7 +20,7 @@ func init() { {Name: "version", Description: "Print the version string"}, {Name: "8080", Description: "Port"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--all", Description: "Start all tunnels in the configuration file"}, {Name: "--none", Description: "Start running no tunnels"}, {Name: "--remote-addr", Description: "Bind remote address (requires you reserve an address)"}, diff --git a/commands/ops/nvm.go b/commands/ops/nvm.go index a81a1da..09f5e0a 100644 --- a/commands/ops/nvm.go +++ b/commands/ops/nvm.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nvm", Description: "Node version", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "uninstall", Description: "Uninstall a version"}, {Name: "use", Description: "Modify PATH to use . Uses .nvmrc if available and version is omitted"}, {Name: "exec", Description: "Run on . Uses .nvmrc if available and version is omitted"}, @@ -25,7 +25,7 @@ func init() { {Name: "dir", Description: "Display path to the cache directory for nvm"}, {Name: "clear", Description: "Empty cache directory for nvm"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-colors", Description: "Suppress colored output"}, {Name: "--no-alias", Description: "Suppress `nvm alias` output"}, {Name: "--silent", Description: "Silences stdout/stderr output"}, diff --git a/commands/ops/oci.go b/commands/ops/oci.go index 6c1dc07..48818a0 100644 --- a/commands/ops/oci.go +++ b/commands/ops/oci.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "oci", Description: "Oracle Cloud Infrastructure CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "compute", Description: "Manage Compute resources like instances and images"}, {Name: "instance", Description: "Manage Compute instances"}, {Name: "launch", Description: "Launch a new compute instance"}, @@ -35,7 +35,7 @@ func init() { {Name: "alarm", Description: "Manage monitoring alarms"}, {Name: "budget", Description: "Manage Budgets and Cost Controls"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--availability-domain", Description: "The availability domain of the instance"}, {Name: "--compartment-id", Description: "The OCID of the compartment"}, {Name: "--shape", Description: "The shape of the instance"}, diff --git a/commands/ops/okteto.go b/commands/ops/okteto.go index 6990281..e2ddf3e 100644 --- a/commands/ops/okteto.go +++ b/commands/ops/okteto.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "okteto", Description: "Context", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "analytics", Description: "Enable / Disable analytics"}, {Name: "build", Description: "Build (and optionally push) a Docker image"}, {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, @@ -43,7 +43,7 @@ func init() { {Name: "version", Description: "View the version of the okteto binary"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--loglevel", Description: "Amount of information outputted (debug, info, warn, error)"}, {Name: "--output", Description: "Output format (tty, plain, json)"}, {Name: "--disable", Description: "Disable analytics"}, diff --git a/commands/ops/op.go b/commands/ops/op.go index 41338fd..e34c198 100644 --- a/commands/ops/op.go +++ b/commands/ops/op.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "op", Description: "Official 1Password CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "account", Description: "Manage your locally configured 1Password accounts"}, {Name: "add", Description: "Add an account to sign in to for the first time"}, {Name: "get", Description: "Get details about your account"}, @@ -42,7 +42,7 @@ func init() { {Name: "update", Description: "Check for and download updates"}, {Name: "whoami", Description: "Get information about a signed-in account"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--address", Description: "The sign-in address for your account"}, {Name: "--email", Description: "The email address associated with your account"}, {Name: "--raw", Description: "Only return the session token"}, diff --git a/commands/ops/opa.go b/commands/ops/opa.go index e1c23cb..1eaeda5 100644 --- a/commands/ops/opa.go +++ b/commands/ops/opa.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "opa", Description: "Open Policy Agent (OPA)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bench", Description: "Benchmark a Rego query"}, {Name: "build", Description: "Build an OPA bundle"}, {Name: "check", Description: "Check Rego source files"}, @@ -29,7 +29,7 @@ func init() { {Name: "version", Description: "Print the version of OPA"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--benchmem", Description: "Report memory allocations with benchmark results"}, {Name: "--bundle", Description: "Set bundle file(s) or directory path(s). This flag can be repeated"}, {Name: "--count", Description: "Number of times to repeat each benchmark"}, diff --git a/commands/ops/osqueryi.go b/commands/ops/osqueryi.go index 3cb365f..d45f22e 100644 --- a/commands/ops/osqueryi.go +++ b/commands/ops/osqueryi.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "osqueryi", Description: "Your OS as a high-performance relational database", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--flagfile", Description: "Line-delimited file of additional flags"}, {Name: "--D", Description: "Run as a daemon process"}, {Name: "--S", Description: "Run as a shell process"}, diff --git a/commands/ops/pass.go b/commands/ops/pass.go index 11eab7c..b71d61f 100644 --- a/commands/ops/pass.go +++ b/commands/ops/pass.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pass", Description: "Pass - stores, retrieves, generates, and synchronizes passwords securely", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize new password storage and use gpg-id for encryption"}, {Name: "gpg-id", Description: "The gpg-id you want to use to encrypt your password store"}, {Name: "insert", Description: "Insert a new password into the password store called pass-name"}, @@ -28,7 +28,7 @@ func init() { {Name: "find", Description: "List names of passwords inside the tree that match pass-names"}, {Name: "show", Description: "Decrypt and print a password"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--clip", Description: "Copy the password to the clipboard"}, {Name: "--qrcode", Description: "Display a QRcode of the password"}, {Name: "--help", Description: "Show help for pass"}, diff --git a/commands/ops/pg_dump.go b/commands/ops/pg_dump.go index 97a1a6c..60c492d 100644 --- a/commands/ops/pg_dump.go +++ b/commands/ops/pg_dump.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pg_dump", Description: "Dumps a database as a text file or to other formats", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for pg_dump"}, {Name: "--file", Description: "Output file or directory name"}, {Name: "--format", Description: "Output file format"}, diff --git a/commands/ops/pgcli.go b/commands/ops/pgcli.go index 5d06b8f..ebc288a 100644 --- a/commands/ops/pgcli.go +++ b/commands/ops/pgcli.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pgcli", Description: "Host address of the postgres database", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Host address of the postgres database"}, {Name: "-p", Description: "Port number at which the postgres instance is listening"}, {Name: "-U", Description: "Username to connect to the postgres database"}, diff --git a/commands/ops/pm2.go b/commands/ops/pm2.go index 8ddce43..b36ea24 100644 --- a/commands/ops/pm2.go +++ b/commands/ops/pm2.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pm2", Description: "Outputs the version number", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "start", Description: "Starts and daemonizes an app"}, {Name: "trigger", Description: "Deploy your json"}, {Name: "deploy", Description: "Deploy your json"}, @@ -60,7 +60,7 @@ func init() { {Name: "describe", Description: "Describe all parameters of a process id"}, {Name: "desc", Description: "(alias) Describe all parameters of a process id"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-V", Description: "Outputs the version number"}, {Name: "-v", Description: "Gets version"}, {Name: "-s", Description: "Hides all messages"}, diff --git a/commands/ops/pod.go b/commands/ops/pod.go index 7953a2b..5470f08 100644 --- a/commands/ops/pod.go +++ b/commands/ops/pod.go @@ -1,17 +1,17 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pod", Description: "CocoaPods, the Cocoa library package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "name", Description: "The name of the podspec file within the Git Repository"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--project-directory", Description: "The path to the root of the project directory"}, {Name: "--allow-root", Description: "Allows CocoaPods to run as root"}, {Name: "--all", Description: "Remove all the cached pods without asking"}, diff --git a/commands/ops/podman.go b/commands/ops/podman.go index b733c25..0b07883 100644 --- a/commands/ops/podman.go +++ b/commands/ops/podman.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "podman", Description: "Build an image using instructions from Containerfiles", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "events", Description: "Show podman system events"}, {Name: "info", Description: "Display podman system information"}, {Name: "inspect", Description: "Display the configuration of object denoted by ID"}, @@ -46,7 +46,7 @@ func init() { {Name: "pod", Description: "Manage pods"}, {Name: "untag", Description: "Remove a name from a local image"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--add-host", Description: "Add a custom host-to-IP mapping (host:ip)"}, {Name: "--build-arg", Description: "Set build-time variables"}, {Name: "--cache-from", Description: "Images to consider as cache sources"}, diff --git a/commands/ops/pscale.go b/commands/ops/pscale.go index 42ba853..8dc8d9a 100644 --- a/commands/ops/pscale.go +++ b/commands/ops/pscale.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pscale", Description: "The client ID for the PlanetScale CLI application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "audit-log", Description: "List audit logs"}, {Name: "list", Description: "List all audit logs of an organization"}, {Name: "auth", Description: "Login and logout via the PlanetScale API"}, @@ -45,7 +45,7 @@ func init() { {Name: "shell", Description: "Open a MySQL shell instance to a database and branch"}, {Name: "signup", Description: "Signup for a new PlanetScale account"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--client-id", Description: "The client ID for the PlanetScale CLI application"}, {Name: "--client-secret", Description: "The client ID for the PlanetScale CLI application"}, {Name: "--database", Description: "The database this project is using"}, diff --git a/commands/ops/psql.go b/commands/ops/psql.go index cdc1eda..ae5cfe0 100644 --- a/commands/ops/psql.go +++ b/commands/ops/psql.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "psql", Description: "Psql is a terminal-based front-end to PostgreSQL", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Put all query output into file filename. This is equivalent to the command \\\\o"}, {Name: "-p", Description: "Print the psql version and exit"}, {Name: "-w", Description: "Show help about psql and exit"}, diff --git a/commands/ops/pulumi.go b/commands/ops/pulumi.go index 6671697..e72a177 100644 --- a/commands/ops/pulumi.go +++ b/commands/ops/pulumi.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pulumi", Description: "The name of the stack to operate on. Defaults to the current stack", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "about", Description: "Print information about the Pulumi environment"}, {Name: "cancel", Description: "Cancel a stack’s currently running update, if any"}, {Name: "config", Description: "Manage configuration"}, @@ -59,7 +59,7 @@ func init() { {Name: "watch", Description: "[PREVIEW] Continuously update the resources in a stack"}, {Name: "whoami", Description: "Displays the username of the currently logged in user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-s", Description: "The name of the stack to operate on. Defaults to the current stack"}, {Name: "-y", Description: "Skip confirmation prompts, and proceed with cancellation anyway"}, {Name: "-j", Description: "Emit output as JSON"}, diff --git a/commands/ops/qodana.go b/commands/ops/qodana.go index 098ca7f..bc28d85 100644 --- a/commands/ops/qodana.go +++ b/commands/ops/qodana.go @@ -1,20 +1,20 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "qodana", Description: "Run Qodana as fast as possible, with minimum effort required", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Configure project for Qodana"}, {Name: "scan", Description: "Scan a project with Qodana"}, {Name: "show", Description: "Show Qodana report"}, {Name: "view", Description: "View SARIF files in CLI"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help page for command"}, {Name: "-v", Description: "Version for Qodana"}, {Name: "-i", Description: "Scan a project with Qodana"}, diff --git a/commands/ops/railway.go b/commands/ops/railway.go index b0bdf6d..213f152 100644 --- a/commands/ops/railway.go +++ b/commands/ops/railway.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "railway", Description: "CLI for managing Railway Apps", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add a plugin to your project"}, {Name: "completion", Description: "Generate shell-completions"}, {Name: "shell", Description: "The shell to generate completions for"}, @@ -45,7 +45,7 @@ func init() { {Name: "version", Description: "Get the version of railway's CLI"}, {Name: "whoami", Description: "Get the logged in user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Environment to delete from"}, {Name: "--browserless", Description: "Login without opening a browser"}, {Name: "-n", Description: "Output a specific number of lines"}, diff --git a/commands/ops/rbenv.go b/commands/ops/rbenv.go index ac36314..17976c3 100644 --- a/commands/ops/rbenv.go +++ b/commands/ops/rbenv.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rbenv", Description: "List all available rbenv commands", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "commands", Description: "List all available rbenv commands"}, {Name: "global", Description: "Set or show the global Ruby version"}, {Name: "install", Description: "Install a Ruby version using ruby-build"}, @@ -20,7 +20,7 @@ func init() { {Name: "whence", Description: "List all Ruby versions that contain the given executable"}, {Name: "which", Description: "Display the full path to an executable"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--unset", Description: "List all available rbenv commands"}, {Name: "--sh", Description: "Set or show the global Ruby version"}, {Name: "--version", Description: "Show version of ruby-build"}, diff --git a/commands/ops/robot.go b/commands/ops/robot.go index fdff96c..8baee13 100644 --- a/commands/ops/robot.go +++ b/commands/ops/robot.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "robot", Description: "Tag", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Print usage instructions"}, {Name: "--rpa", Description: "Parse only files with this extension when executing a directory"}, {Name: "-N", Description: "Set a name of the top level suite"}, diff --git a/commands/ops/serverless.go b/commands/ops/serverless.go index 2e287a3..f90ba45 100644 --- a/commands/ops/serverless.go +++ b/commands/ops/serverless.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "serverless", Description: "AWS profile to use with the command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "deploy", Description: "Deploy a Serverless service"}, {Name: "info", Description: "Display information about the service"}, {Name: "invoke", Description: "Invoke a deployed function"}, @@ -30,7 +30,7 @@ func init() { {Name: "param", Description: "Get/list value of dashboard service output"}, {Name: "slstats", Description: "Enable or disable stats"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--aws-profile", Description: "AWS profile to use with the command"}, {Name: "--function", Description: "Name of the function"}, {Name: "--region", Description: "Region of the service"}, diff --git a/commands/ops/sfdx.go b/commands/ops/sfdx.go index 3ecb366..4e11b4c 100644 --- a/commands/ops/sfdx.go +++ b/commands/ops/sfdx.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sfdx", Description: "Analyze (lint) Aura component code", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "force:lightning:lint", Description: "Analyze (lint) Aura component code"}, {Name: "fig-completion", Description: "Generate a Fig completion spec"}, {Name: "commands", Description: "List all the commands"}, @@ -60,7 +60,7 @@ func init() { {Name: "force:limits:recordcounts:display", Description: "Display record counts for the specified standard and custom objects"}, {Name: "force:org:display", Description: "Get the description for the current or target org"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--json", Description: "Format output as json"}, {Name: "--loglevel", Description: "Logging level for this command invocation"}, {Name: "-i", Description: "Pattern used to ignore some folders"}, diff --git a/commands/ops/sftp.go b/commands/ops/sftp.go index e2e1b3e..13f1a22 100644 --- a/commands/ops/sftp.go +++ b/commands/ops/sftp.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sftp", Description: "OpenSSH secure file transfer", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for sftp"}, {Name: "-4", Description: "Forces scp to use IPv4 addresses only"}, {Name: "-6", Description: "Forces scp to use IPv6 addresses only"}, diff --git a/commands/ops/space.go b/commands/ops/space.go index 36d5827..6b93ebb 100644 --- a/commands/ops/space.go +++ b/commands/ops/space.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "space", Description: "Deta Space CLI for mananging Deta Space projects", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, {Name: "bash", Description: "Generate the autocompletion script for bash"}, {Name: "fish", Description: "Generate the autocompletion script for fish"}, @@ -25,7 +25,7 @@ func init() { {Name: "upgrade", Description: "Upgrade Space CLI version"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-descriptions", Description: "Disable completion descriptions"}, {Name: "--dir", Description: "Src of project to link"}, {Name: "--id", Description: "Project id of project to link"}, diff --git a/commands/ops/sqlite3.go b/commands/ops/sqlite3.go index e320496..a83293c 100644 --- a/commands/ops/sqlite3.go +++ b/commands/ops/sqlite3.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sqlite3", Description: "A command line interface for SQLite version 3", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-append", Description: "Append the database to the end of the file"}, {Name: "-ascii", Description: "Set output mode to 'ascii'"}, {Name: "-bail", Description: "Stop after hitting an error"}, diff --git a/commands/ops/src.go b/commands/ops/src.go index 867f9be..a5b4d38 100644 --- a/commands/ops/src.go +++ b/commands/ops/src.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "src", Description: "Interact with Sourcegraph from the command line", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "apply", Description: "Apply batch"}, {Name: "exec", Description: "Execute batch"}, {Name: "new", Description: "New batch"}, @@ -24,7 +24,7 @@ func init() { {Name: "members", Description: "List organization members"}, {Name: "tag", Description: "Tag user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-display", Description: "Log GraphQL requests and responses to stdout"}, {Name: "-explain-json", Description: "Explain the JSON output schema and exit"}, {Name: "-get-curl", Description: "Skip validation of TLD certificates against trusted chains"}, diff --git a/commands/ops/ssh.go b/commands/ops/ssh.go index 2740632..3362478 100644 --- a/commands/ops/ssh.go +++ b/commands/ops/ssh.go @@ -6,10 +6,10 @@ import ( "path/filepath" "strings" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func sshHostGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func sshHostGenerator(tokens []string, _ string, _ string) []spec.Suggestion { home, err := os.UserHomeDir() if err != nil { return nil @@ -21,7 +21,7 @@ func sshHostGenerator(tokens []string, _ string, _ string) []core.Suggestion { } seen := make(map[string]bool) - var results []core.Suggestion + var results []spec.Suggestion for _, path := range paths { f, err := os.Open(path) @@ -45,7 +45,7 @@ func sshHostGenerator(tokens []string, _ string, _ string) []core.Suggestion { continue } seen[host] = true - results = append(results, core.Suggestion{Cmd: host, Desc: "ssh host"}) + results = append(results, spec.Suggestion{Cmd: host, Desc: "ssh host"}) } } _ = scanner.Err() @@ -56,7 +56,7 @@ func sshHostGenerator(tokens []string, _ string, _ string) []core.Suggestion { } func init() { - sshOptions := []core.Option{ + sshOptions := []spec.Option{ {Name: "-p", Description: "port"}, {Name: "-i", Description: "identity file"}, {Name: "-L", Description: "local port forward"}, @@ -69,18 +69,18 @@ func init() { {Name: "-X", Description: "x11 forwarding"}, } - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ssh", Description: "secure shell", Generator: sshHostGenerator, Options: sshOptions, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "scp", Description: "secure copy", Generator: sshHostGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-r", Description: "recursive"}, {Name: "-p", Description: "port"}, {Name: "-i", Description: "identity file"}, @@ -88,11 +88,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rsync", Description: "remote sync", Generator: sshHostGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-av", Description: "archive + verbose"}, {Name: "-z", Description: "compress"}, {Name: "--delete", Description: "delete extraneous"}, diff --git a/commands/ops/ssh_keygen.go b/commands/ops/ssh_keygen.go index 43b1178..71577f6 100644 --- a/commands/ops/ssh_keygen.go +++ b/commands/ops/ssh_keygen.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ssh-keygen", Description: "Generates, manages and converts authentication keys for ssh", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-A", Description: "When saving a private key, this option specifies the number of KDF"}, {Name: "-B", Description: "Show the bubblebabble digest of specified private or public key file"}, {Name: "-b", Description: "Specifies the number of bits in the key to create"}, diff --git a/commands/ops/stripe.go b/commands/ops/stripe.go index 8bece4f..16b0faf 100644 --- a/commands/ops/stripe.go +++ b/commands/ops/stripe.go @@ -1,24 +1,24 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "stripe", Description: "Stripe CLI - build, test, and manage your Stripe integrations right from your terminal", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "login", Description: "Connects to your Stripe account"}, {Name: "logout", Description: "Disconnects your Stripe account"}, - {Name: "config", Description: "Manage Stripe CLI configuration", Subcommands: []core.Subcommand{ + {Name: "config", Description: "Manage Stripe CLI configuration", Subcommands: []spec.Subcommand{ {Name: "list", Description: "List all configured options"}, {Name: "set", Description: "Set a value for the specified configuration option"}, {Name: "unset", Description: "Remove a key-value pair from the config file"}, }}, {Name: "completion", Description: "Generates shell autocompletions"}, {Name: "status", Description: "Displays Stripe's system status and service availability"}, - {Name: "open", Description: "Opens Stripe dashboard pages in your web browser", Subcommands: []core.Subcommand{ + {Name: "open", Description: "Opens Stripe dashboard pages in your web browser", Subcommands: []spec.Subcommand{ {Name: "login", Description: "Open the login page"}, {Name: "dashboard", Description: "Open the dashboard"}, {Name: "api", Description: "Open API reference docs"}, @@ -27,7 +27,7 @@ func init() { {Name: "settings", Description: "Open account settings"}, }}, {Name: "listen", Description: "Receives webhook events from Stripe locally"}, - {Name: "trigger", Description: "Trigger webhook events", Subcommands: []core.Subcommand{ + {Name: "trigger", Description: "Trigger webhook events", Subcommands: []spec.Subcommand{ {Name: "account.updated", Description: "Occurs whenever an account status or property has changed"}, {Name: "account.external_account.created", Description: "Occurs whenever an external account is created"}, {Name: "account.external_account.deleted", Description: "Occurs whenever an external account is deleted"}, @@ -53,14 +53,14 @@ func init() { {Name: "customer.discount.created", Description: "Occurs whenever a coupon is attached to a customer"}, {Name: "customer.discount.deleted", Description: "Occurs whenever a coupon is removed from a customer"}, }}, - {Name: "logs", Description: "Interact with Stripe request logs", Subcommands: []core.Subcommand{ + {Name: "logs", Description: "Interact with Stripe request logs", Subcommands: []spec.Subcommand{ {Name: "tail", Description: "Stream request logs from Stripe"}, }}, {Name: "get", Description: "Make a GET request to the Stripe API"}, {Name: "post", Description: "Make a POST request to the Stripe API"}, {Name: "delete", Description: "Make a DELETE request to the Stripe API"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--api-key", Description: "Sets your API key to use for the command"}, {Name: "--color", Description: "Enables or disables color output"}, {Name: "--config", Description: "Sets your config file"}, diff --git a/commands/ops/supabase.go b/commands/ops/supabase.go index 03f32dc..200214d 100644 --- a/commands/ops/supabase.go +++ b/commands/ops/supabase.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "supabase", Description: "Supabase CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Generate the autocompletion script for the specified shell"}, {Name: "bash", Description: "Generate the autocompletion script for bash"}, {Name: "fish", Description: "Generate the autocompletion script for fish"}, @@ -53,7 +53,7 @@ func init() { {Name: "stop", Description: "Stop all local Supabase containers"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-descriptions", Description: "Disable completion descriptions"}, {Name: "--file", Description: "Saves schema diff to a file"}, {Name: "--schema", Description: "List of schema to include"}, diff --git a/commands/ops/surreal.go b/commands/ops/surreal.go index 7a44659..84457b7 100644 --- a/commands/ops/surreal.go +++ b/commands/ops/surreal.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "surreal", Description: "Database authentication password to use when connecting [default: root]", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Print this message or the help of the given subcommand(s)"}, {Name: "start", Description: "Start the database server"}, {Name: "path", Description: "Database path used for storing data [env: DB_PATH=] [default: memory]"}, @@ -27,7 +27,7 @@ func init() { {Name: "version", Description: "Output the command-line tool version information"}, {Name: "sql", Description: "Start an SQL REPL in your terminal with pipe support"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--pass", Description: "Database authentication password to use when connecting [default: root]"}, {Name: "--user", Description: "Database authentication username to use when connecting [default: root]"}, {Name: "--conn", Description: "Remote database server url to connect to [default: https://cloud.surrealdb.com]"}, diff --git a/commands/ops/tailscale.go b/commands/ops/tailscale.go index d93b16c..7f02c38 100644 --- a/commands/ops/tailscale.go +++ b/commands/ops/tailscale.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tailscale", Description: "Connect to Tailscale, logging in if needed", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "up", Description: "Connect to Tailscale, logging in if needed"}, {Name: "down", Description: "Disconnect from Tailscale"}, {Name: "logout", Description: "Disconnect from Tailscale and expire current node key"}, @@ -27,7 +27,7 @@ func init() { {Name: "cert", Description: "Get TLS certs"}, {Name: "help", Description: "Print help message"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--accept-dns", Description: "Accept DNS configuration from the admin panel"}, {Name: "--accept-routes", Description: "Accept routes advertised by other Tailscale nodes"}, {Name: "--advertise-exit-node", Description: "Offer to be an exit node for internet traffic for the tailnet"}, diff --git a/commands/ops/terraform.go b/commands/ops/terraform.go index d56e2d2..b4dc711 100644 --- a/commands/ops/terraform.go +++ b/commands/ops/terraform.go @@ -1,20 +1,20 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "terraform", Description: "Workspace", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "show", Description: "Display the current workspace"}, {Name: "list", Description: "List the workspace"}, {Name: "delete", Description: "Delete the specified workspace"}, {Name: "select", Description: "Change the current working workspace"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-lock", Description: "Lock the state file when locking is supported. Defaults to true"}, {Name: "-force", Description: "Delete the workspace even if its state is not empty. Defaults to false"}, {Name: "-lock-timeout", Description: "Duration to retry a state lock. Default 0s"}, diff --git a/commands/ops/terragrunt.go b/commands/ops/terragrunt.go index 48e8e72..c6bc5e6 100644 --- a/commands/ops/terragrunt.go +++ b/commands/ops/terragrunt.go @@ -1,20 +1,20 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "terragrunt", Description: "Workspace", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "show", Description: "Display the current workspace"}, {Name: "list", Description: "List the workspace"}, {Name: "delete", Description: "Delete the specified workspace"}, {Name: "select", Description: "Change the current working workspace"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-lock", Description: "Lock the state file when locking is supported. Defaults to true"}, {Name: "-force", Description: "Delete the workspace even if its state is not empty. Defaults to false"}, {Name: "-lock-timeout", Description: "Duration to retry a state lock. Default 0s"}, diff --git a/commands/ops/tfenv.go b/commands/ops/tfenv.go index bdc69ba..2d6e0d3 100644 --- a/commands/ops/tfenv.go +++ b/commands/ops/tfenv.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tfenv", Description: "Version", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install a specific version of Terraform"}, {Name: "version", Description: "Possible Terraform Version"}, {Name: "use", Description: "Switch to a version to use"}, @@ -18,7 +18,7 @@ func init() { {Name: "version-name", Description: "Print current version"}, {Name: "init", Description: "Update environment to use tfenv correctly"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "View your current tfenv version"}, {Name: "--help", Description: "View commands"}, }, diff --git a/commands/ops/tfsec.go b/commands/ops/tfsec.go index bb4db73..8c8195d 100644 --- a/commands/ops/tfsec.go +++ b/commands/ops/tfsec.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tfsec", Description: "Terraform workspaces", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--concise-output", Description: "Reduce the amount of output and no statistics"}, {Name: "--config-file", Description: "Config file to use during run"}, {Name: "--custom-check-dir", Description: "Explicitly the custom checks dir location"}, diff --git a/commands/ops/tkn.go b/commands/ops/tkn.go index 8198ff5..f2f5773 100644 --- a/commands/ops/tkn.go +++ b/commands/ops/tkn.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tkn", Description: "CLI for tekton pipelines", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "tkb", Description: "Manage Tekton Bundles"}, {Name: "list", Description: "List and print a Tekton bundle's contents"}, {Name: "push", Description: "Create or replace a Tekton bundle"}, @@ -50,7 +50,7 @@ func init() { {Name: "version", Description: "Prints version information"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--allow-missing-template-keys", Description: "A directory to cache Tekton bundles in"}, {Name: "--no-cache", Description: "A Bearer token to authenticate against the repository"}, {Name: "--remote-password", Description: "If set to true, skips TLS check when connecting to the registry"}, diff --git a/commands/ops/trivy.go b/commands/ops/trivy.go index abb7921..60d3466 100644 --- a/commands/ops/trivy.go +++ b/commands/ops/trivy.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "trivy", Description: "Skip updating built-in policies [$TRIVY_SKIP_POLICY_UPDATE]", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "image", Description: "Scan an image"}, {Name: "filesystem", Description: "Scan local filesystem for language-specific dependencies and config files"}, {Name: "rootfs", Description: "Scan rootfs"}, @@ -27,7 +27,7 @@ func init() { {Name: "help", Description: "Shows a list of commands or help for one command"}, {Name: "version", Description: "Print the version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--skip-policy-update", Description: "Skip updating built-in policies [$TRIVY_SKIP_POLICY_UPDATE]"}, {Name: "--removed-pkgs", Description: "Input file path instead of image name [$TRIVY_INPUT]"}, {Name: "--config-policy", Description: "Clear image caches without scanning [$TRIVY_CLEAR_CACHE]"}, diff --git a/commands/ops/tsuru.go b/commands/ops/tsuru.go index c7a67bd..0ad4291 100644 --- a/commands/ops/tsuru.go +++ b/commands/ops/tsuru.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tsuru", Description: "Plan", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "app", Description: "App commands"}, {Name: "build", Description: "Builds a tsuru app image respecting"}, {Name: "create", Description: "Creates a new app using the given name and platform"}, @@ -53,7 +53,7 @@ func init() { {Name: "login", Description: "Login to tsuru server"}, {Name: "logout", Description: "Logout from tsuru server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "App name"}, {Name: "-o", Description: "Filter applications by pool"}, {Name: "-p", Description: "Filter applications by platform"}, diff --git a/commands/ops/vault.go b/commands/ops/vault.go index 108b444..733e13a 100644 --- a/commands/ops/vault.go +++ b/commands/ops/vault.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vault", Description: "Display help", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "read", Description: "Reads data from Vault at the given path"}, {Name: "write", Description: "Writes data from Vault at the given path"}, {Name: "delete", Description: "Deletes secrets and configuration from Vault at the given path"}, @@ -38,7 +38,7 @@ func init() { {Name: "ssh", Description: "Establishes an SSH connection with the target machine"}, {Name: "version-history", Description: "Prints the version history of the target Vault server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display help"}, {Name: "-address", Description: "Key to unlock a namespace API lock. The default is (not set)"}, {Name: "-wrap-ttl", Description: "Exit the vault server if the vault core is shutdown. The default is false"}, diff --git a/commands/ops/vela.go b/commands/ops/vela.go index 0673666..39299c2 100644 --- a/commands/ops/vela.go +++ b/commands/ops/vela.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vela", Description: "Show the reference doc for component, trait or workflow types", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "show", Description: "Show the reference doc for component, trait or workflow types"}, {Name: "env", Description: "Manage environments for vela applications to run"}, {Name: "delete", Description: "Delete an environment"}, @@ -56,7 +56,7 @@ func init() { {Name: "export", Description: "Export deploy manifests from appfile or application"}, {Name: "version", Description: "Prints the version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Specify environment name for application"}, {Name: "--help", Description: "Help for show command"}, {Name: "-n", Description: "Specify the Kubernetes namespace to use"}, diff --git a/commands/ops/vercel.go b/commands/ops/vercel.go index bf084dd..f5c00ca 100644 --- a/commands/ops/vercel.go +++ b/commands/ops/vercel.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vercel", Description: "CLI Interface for Vercel.com", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "deploy", Description: "Performs a deployment (default)"}, {Name: "dev", Description: "Start a local development server"}, {Name: "env", Description: "Manages the Environment Variables for your current Project"}, @@ -60,7 +60,7 @@ func init() { {Name: "old name", Description: "Old name of the secret to rename"}, {Name: "new name", Description: "New name of the secret"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "-v", Description: "Output the version number"}, {Name: "-V", Description: "Set the platform version to deploy to"}, diff --git a/commands/ops/volta.go b/commands/ops/volta.go index 864b5ab..c75a512 100644 --- a/commands/ops/volta.go +++ b/commands/ops/volta.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "volta", Description: "Enables verbose diagnostics", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "fetch", Description: "Fetches a tool to the local machine"}, {Name: "install", Description: "Installs a tool in your toolchain"}, {Name: "uninstall", Description: "Uninstalls a tool from your toolchain"}, @@ -21,7 +21,7 @@ func init() { {Name: "run", Description: "Run a command with custom Node, npm, and/or Yarn versions"}, {Name: "help", Description: "Prints this message or the help of the given subcommand(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--verbose", Description: "Enables verbose diagnostics"}, {Name: "--quiet", Description: "Prevents unnecessary output"}, {Name: "-h", Description: "Prints help information"}, diff --git a/commands/ops/watson.go b/commands/ops/watson.go index c42d35c..de1c529 100644 --- a/commands/ops/watson.go +++ b/commands/ops/watson.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "watson", Description: "A wonderful CLI to track your time", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add time to a project with tag(s) that was not tracked live"}, {Name: "DATETIME", Description: "The start time. Ex: 2022-03-04 12:00:00"}, {Name: "aggregate", Description: "Display a report of the time spent on each project aggregated by day"}, @@ -30,7 +30,7 @@ func init() { {Name: "sync", Description: "Get the frames from the server and push the new ones"}, {Name: "tags", Description: "Display the list of all the tags"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--from", Description: "Date and time of start of tracked activity"}, {Name: "--to", Description: "Date and time of end of tracked activity"}, {Name: "--confirm-new-project", Description: "Confirm creation of new tag"}, diff --git a/commands/ops/whois.go b/commands/ops/whois.go index edb4cd7..bcd52e5 100644 --- a/commands/ops/whois.go +++ b/commands/ops/whois.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "whois", Description: "Query a database for information about a domain registrant", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Use the American Registry for Internet Numbers (ARIN) database"}, {Name: "-A", Description: "Use the Asia/Pacific Network Information Center (APNIC) database"}, {Name: "-b", Description: "Use the Network Abuse Clearinghouse database"}, diff --git a/commands/ops/wrangler.go b/commands/ops/wrangler.go index 638443e..dc30727 100644 --- a/commands/ops/wrangler.go +++ b/commands/ops/wrangler.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wrangler", Description: "Path to configuration file [default: wrangler.toml]", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "kv:namespace", Description: "Interact with your Workers KV Namespaces"}, {Name: "create", Description: "Create a new namespace"}, {Name: "delete", Description: "Delete namespace"}, @@ -34,7 +34,7 @@ func init() { {Name: "login", Description: "Authenticate Wrangler with your Cloudflare username and password"}, {Name: "report", Description: "Report an error caught by Wrangler to Cloudflare"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Path to configuration file [default: wrangler.toml]"}, {Name: "-e", Description: "Environment to perform a command on"}, {Name: "-h", Description: "Prints help information"}, diff --git a/commands/ops/xc.go b/commands/ops/xc.go index 748bbf1..388c800 100644 --- a/commands/ops/xc.go +++ b/commands/ops/xc.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xc", Description: "List tasks from an xc-compatible markdown file", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Print the markdown code of a task rather than running it"}, {Name: "-H", Description: "List task names in a short format"}, {Name: "-h", Description: "Print this help text"}, diff --git a/commands/ops/xcodes.go b/commands/ops/xcodes.go index 2cf7ada..4a8d9b3 100644 --- a/commands/ops/xcodes.go +++ b/commands/ops/xcodes.go @@ -1,14 +1,14 @@ package ops import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xcodes", Description: "Manage the Xcode versions installed on your Mac", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "download", Description: "Download a specific version of Xcode"}, {Name: "version", Description: "The version to install"}, {Name: "install", Description: "Download and install a specific version of Xcode"}, @@ -20,7 +20,7 @@ func init() { {Name: "update", Description: "Update the list of available versions of Xcode"}, {Name: "signout", Description: "Clears the stored username and password"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--latest", Description: "Update and then install the latest non-prerelease version available"}, {Name: "--latest-prerelease", Description: "The path to an aria2 executable. Searches $PATH by default"}, {Name: "--no-aria2", Description: "Don't use aria2 to download Xcode, even if it's available"}, diff --git a/commands/pkginstaller/dpkg.go b/commands/pkginstaller/dpkg.go index f0b9338..c7f9d11 100644 --- a/commands/pkginstaller/dpkg.go +++ b/commands/pkginstaller/dpkg.go @@ -1,14 +1,14 @@ package pkginstaller import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dpkg", Description: "Debian package management system", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "query", Description: "Query the dpkg database"}, {Name: "install", Description: "Install or upgrade packages"}, {Name: "remove", Description: "Remove packages"}, @@ -20,7 +20,7 @@ func init() { {Name: "check", Description: "Check the dependencies of packages"}, {Name: "compare-versions", Description: "Compare package versions"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "List packages matching a pattern"}, {Name: "-s", Description: "Display the status of available packages"}, {Name: "-L", Description: "List files in a package"}, diff --git a/commands/pkginstaller/pkgmgr.go b/commands/pkginstaller/pkgmgr.go index bed9ff9..4dc137f 100644 --- a/commands/pkginstaller/pkgmgr.go +++ b/commands/pkginstaller/pkgmgr.go @@ -6,11 +6,11 @@ import ( "strings" "time" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func installedPackageGenerator(pm string) core.GeneratorFunc { - return func(tokens []string, _ string, _ string) []core.Suggestion { +func installedPackageGenerator(pm string) spec.GeneratorFunc { + return func(tokens []string, _ string, _ string) []spec.Suggestion { ctx, cancel := context.WithTimeout(context.Background(), 8*time.Second) defer cancel() @@ -33,13 +33,13 @@ func installedPackageGenerator(pm string) core.GeneratorFunc { return nil } - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { continue } - results = append(results, core.Suggestion{Cmd: line, Desc: "installed"}) + results = append(results, spec.Suggestion{Cmd: line, Desc: "installed"}) } return results } @@ -47,10 +47,10 @@ func installedPackageGenerator(pm string) core.GeneratorFunc { func init() { // pacman - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pacman", Description: "Arch package manager", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-S", Description: "install package"}, {Name: "-Syu", Description: "full system upgrade"}, {Name: "-Sy", Description: "sync database"}, @@ -77,10 +77,10 @@ func init() { }) // yay - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "yay", Description: "AUR helper (pacman wrapper)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-S", Description: "install package (AUR + repos)"}, {Name: "-Syu", Description: "full system upgrade + AUR"}, {Name: "-Ss", Description: "search AUR + repos"}, @@ -103,10 +103,10 @@ func init() { }) // paru - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "paru", Description: "AUR helper (feature-rich)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-S", Description: "install package"}, {Name: "-Syu", Description: "full upgrade"}, {Name: "-Ss", Description: "search"}, @@ -122,10 +122,10 @@ func init() { }) // apt - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "apt", Description: "Debian/Ubuntu package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install packages"}, {Name: "remove", Description: "remove packages", Generator: installedPackageGenerator("apt")}, {Name: "purge", Description: "remove + config files", Generator: installedPackageGenerator("apt")}, @@ -136,7 +136,7 @@ func init() { {Name: "dist-upgrade", Description: "smart upgrade"}, {Name: "search", Description: "search packages"}, {Name: "show", Description: "show package info"}, - {Name: "list", Description: "list packages", Options: []core.Option{ + {Name: "list", Description: "list packages", Options: []spec.Option{ {Name: "--installed", Description: "installed only"}, {Name: "--upgradable", Description: "upgradable only"}, }}, @@ -146,7 +146,7 @@ func init() { {Name: "depends", Description: "show dependencies"}, {Name: "rdepends", Description: "show reverse dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "yes to all"}, {Name: "--no-install-recommends", Description: "skip recommends"}, {Name: "--dry-run", Description: "simulate"}, @@ -156,10 +156,10 @@ func init() { }) // apt-get - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "apt-get", Description: "Debian/Ubuntu package manager (low-level)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install packages"}, {Name: "remove", Description: "remove packages", Generator: installedPackageGenerator("apt")}, {Name: "purge", Description: "remove + configs", Generator: installedPackageGenerator("apt")}, @@ -172,7 +172,7 @@ func init() { {Name: "download", Description: "download only"}, {Name: "source", Description: "get source package"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "yes to all"}, {Name: "--no-install-recommends", Description: "skip recommends"}, {Name: "-q", Description: "quiet"}, @@ -182,10 +182,10 @@ func init() { }) // dnf (Fedora/RHEL) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dnf", Description: "Fedora/RHEL package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install packages"}, {Name: "remove", Description: "remove packages", Generator: installedPackageGenerator("dnf")}, {Name: "update", Description: "update packages"}, @@ -194,7 +194,7 @@ func init() { {Name: "info", Description: "show package info"}, {Name: "list", Description: "list packages"}, {Name: "autoremove", Description: "remove unneeded"}, - {Name: "clean", Description: "clean cache", Subcommands: []core.Subcommand{ + {Name: "clean", Description: "clean cache", Subcommands: []spec.Subcommand{ {Name: "all", Description: "clean all"}, {Name: "packages", Description: "clean packages"}, {Name: "metadata", Description: "clean metadata"}, @@ -203,7 +203,7 @@ func init() { {Name: "history", Description: "transaction history"}, {Name: "group", Description: "manage package groups"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "yes to all"}, {Name: "-q", Description: "quiet"}, {Name: "--best", Description: "install best"}, @@ -213,10 +213,10 @@ func init() { }) // yum (RHEL/CentOS legacy) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "yum", Description: "RHEL/CentOS package manager (legacy)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install packages"}, {Name: "remove", Description: "remove packages", Generator: installedPackageGenerator("yum")}, {Name: "update", Description: "update packages"}, @@ -226,17 +226,17 @@ func init() { {Name: "clean", Description: "clean cache"}, {Name: "repolist", Description: "list repos"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-y", Description: "yes to all"}, {Name: "-q", Description: "quiet"}, }, }) // brew (macOS / Linux Homebrew) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "brew", Description: "Homebrew package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install formula/cask"}, {Name: "uninstall", Description: "remove formula", Generator: installedPackageGenerator("brew")}, {Name: "reinstall", Description: "reinstall formula", Generator: installedPackageGenerator("brew")}, @@ -250,13 +250,13 @@ func init() { {Name: "cleanup", Description: "remove old versions"}, {Name: "tap", Description: "add tap repo"}, {Name: "untap", Description: "remove tap"}, - {Name: "services", Description: "manage services", Subcommands: []core.Subcommand{ + {Name: "services", Description: "manage services", Subcommands: []spec.Subcommand{ {Name: "start", Description: "start service"}, {Name: "stop", Description: "stop service"}, {Name: "restart", Description: "restart service"}, {Name: "list", Description: "list services"}, }}, - {Name: "cask", Description: "manage GUI apps", Subcommands: []core.Subcommand{ + {Name: "cask", Description: "manage GUI apps", Subcommands: []spec.Subcommand{ {Name: "install", Description: "install cask"}, {Name: "uninstall", Description: "remove cask"}, {Name: "list", Description: "list casks"}, @@ -266,7 +266,7 @@ func init() { {Name: "link", Description: "create symlinks", Generator: installedPackageGenerator("brew")}, {Name: "unlink", Description: "remove symlinks", Generator: installedPackageGenerator("brew")}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cask", Description: "target GUI app"}, {Name: "--formula", Description: "target formula"}, {Name: "--force", Description: "force operation"}, @@ -276,10 +276,10 @@ func init() { }) // snap - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "snap", Description: "snap package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install snap"}, {Name: "remove", Description: "remove snap"}, {Name: "refresh", Description: "update snaps"}, @@ -293,7 +293,7 @@ func init() { {Name: "enable", Description: "enable snap"}, {Name: "disable", Description: "disable snap"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--classic", Description: "classic confinement"}, {Name: "--beta", Description: "beta channel"}, {Name: "--edge", Description: "edge channel"}, @@ -302,10 +302,10 @@ func init() { }) // flatpak - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "flatpak", Description: "flatpak package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "install application"}, {Name: "uninstall", Description: "remove application"}, {Name: "update", Description: "update applications"}, @@ -318,7 +318,7 @@ func init() { {Name: "remote-list", Description: "list remotes"}, {Name: "repair", Description: "repair installation"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--user", Description: "user installation"}, {Name: "--system", Description: "system installation"}, {Name: "-y", Description: "non-interactive"}, diff --git a/commands/pkginstaller/pkgutil.go b/commands/pkginstaller/pkgutil.go index 44a1d5a..dfbcf61 100644 --- a/commands/pkginstaller/pkgutil.go +++ b/commands/pkginstaller/pkgutil.go @@ -1,21 +1,21 @@ package pkginstaller import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pkgutil", Description: "Query and manipulate for macOS Installer packages and receipts", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "package-id", Description: "The package ID to list the files of"}, {Name: "path", Description: "The path to update ACLs on"}, {Name: "group-id", Description: "The group ID to list the packages of"}, {Name: "pkg-path", Description: "The path to the flat package to expand"}, {Name: "dir-path", Description: "The path to the directory to expand the package into"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--packages", Description: "List all installed package IDs on the specified --volume"}, {Name: "--pkgs-plist", Description: "List all of the files installed under the package-id"}, {Name: "--export-plist", Description: "The package ID to export the plist of"}, diff --git a/commands/python/black.go b/commands/python/black.go index 5b6530e..caef235 100644 --- a/commands/python/black.go +++ b/commands/python/black.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "black", Description: "Version", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--code", Description: "Format the code passed in as a string"}, {Name: "--line-length", Description: "How many characters per line to allow"}, {Name: "--target-version", Description: "Python versions that should be supported"}, diff --git a/commands/python/conda.go b/commands/python/conda.go index bb41fb0..c636be5 100644 --- a/commands/python/conda.go +++ b/commands/python/conda.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "conda", Description: "Name of environment", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "activate", Description: "Activate an environment"}, {Name: "deactivate", Description: "Deactivate an environment"}, {Name: "clean", Description: "Remove unused packages and caches"}, @@ -32,7 +32,7 @@ func init() { {Name: "upgrade", Description: "Alias for conda update"}, {Name: "files", Description: "Package files to convert"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "Name of environment"}, {Name: "-p", Description: "Full path to environment location (i.e. prefix)"}, {Name: "--dev", Description: "Use locally built packages. Identical to '-c local'"}, diff --git a/commands/python/django_admin.go b/commands/python/django_admin.go index 4fce8c6..79586f1 100644 --- a/commands/python/django_admin.go +++ b/commands/python/django_admin.go @@ -1,17 +1,17 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "django-admin", Description: "Show this help message and exit", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Usage and help information for django-admin"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show this help message and exit"}, {Name: "--version", Description: "Show program's version number and exit"}, {Name: "-v", Description: "Raise on CommandError exceptions"}, diff --git a/commands/python/googler.go b/commands/python/googler.go index 7ae66b3..312e3ff 100644 --- a/commands/python/googler.go +++ b/commands/python/googler.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "googler", Description: "Google from the command-line", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show this help message and exit"}, {Name: "-s", Description: "Start at the Nth result"}, {Name: "-n", Description: "Show N results"}, diff --git a/commands/python/jupyter.go b/commands/python/jupyter.go index dcd33bf..7ae6121 100644 --- a/commands/python/jupyter.go +++ b/commands/python/jupyter.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "jupyter", Description: "Set log level to logging.DEBUG (maximize logging output)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bundlerextension", Description: "Work with Jupyter bundler extensions"}, {Name: "enable", Description: "Enable a bundler extension"}, {Name: "disable", Description: "Disable a bundler extension"}, @@ -27,7 +27,7 @@ func init() { {Name: "troubleshoot", Description: "Log for troubleshooting"}, {Name: "trust", Description: "Manage trust"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--debug", Description: "Set log level to logging.DEBUG (maximize logging output)"}, {Name: "-h", Description: "Show this message"}, {Name: "--log-level", Description: "Set the log level by value or name"}, diff --git a/commands/python/mamba.go b/commands/python/mamba.go index 4a8070a..218cdda 100644 --- a/commands/python/mamba.go +++ b/commands/python/mamba.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mamba", Description: "Mamba is a fast, robust, and cross-platform package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "activate", Description: "Activate an environment"}, {Name: "deactivate", Description: "Deactivate an environment"}, {Name: "clean", Description: "Remove unused packages and caches"}, @@ -37,7 +37,7 @@ func init() { {Name: "xtl", Description: "List packages that require xtl package"}, {Name: "env", Description: "Manage environments"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "Name of environment"}, {Name: "-p", Description: "Full path to environment location (i.e. prefix)"}, {Name: "--file", Description: "Use locally built packages. Identical to '-c local'"}, diff --git a/commands/python/mypy.go b/commands/python/mypy.go index d9ff3a5..6f02287 100644 --- a/commands/python/mypy.go +++ b/commands/python/mypy.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mypy", Description: "Mypy is a static type checker for Python", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--module", Description: "Asks mypy to type check the provided module"}, {Name: "--package", Description: "Asks mypy to type check the provided package"}, {Name: "--command", Description: "Asks mypy to type check the provided string as a program"}, diff --git a/commands/python/pip.go b/commands/python/pip.go index e901091..6a52bb1 100644 --- a/commands/python/pip.go +++ b/commands/python/pip.go @@ -6,10 +6,10 @@ import ( "strings" "time" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func pipPackageGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func pipPackageGenerator(tokens []string, _ string, _ string) []spec.Suggestion { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -24,7 +24,7 @@ func pipPackageGenerator(tokens []string, _ string, _ string) []core.Suggestion } } - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { @@ -37,17 +37,17 @@ func pipPackageGenerator(tokens []string, _ string, _ string) []core.Suggestion if len(parts) == 2 { desc = "v" + parts[1] } - results = append(results, core.Suggestion{Cmd: name, Desc: desc}) + results = append(results, spec.Suggestion{Cmd: name, Desc: desc}) } return results } -func makePipSpec(name string) *core.Spec { - return &core.Spec{ +func makePipSpec(name string) *spec.Spec { + return &spec.Spec{ Name: name, Description: "python packages", - Subcommands: []core.Subcommand{ - {Name: "install", Description: "install package", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "install", Description: "install package", Options: []spec.Option{ {Name: "-r", Description: "from requirements file"}, {Name: "-U", Description: "upgrade"}, {Name: "--user", Description: "install for user only"}, @@ -55,11 +55,11 @@ func makePipSpec(name string) *core.Spec { {Name: "--index-url", Description: "custom package index"}, {Name: "--no-deps", Description: "skip dependencies"}, }}, - {Name: "uninstall", Description: "remove package", Generator: pipPackageGenerator, Options: []core.Option{ + {Name: "uninstall", Description: "remove package", Generator: pipPackageGenerator, Options: []spec.Option{ {Name: "-y", Description: "yes to all prompts"}, }}, {Name: "freeze", Description: "list installed packages"}, - {Name: "list", Description: "list installed", Options: []core.Option{ + {Name: "list", Description: "list installed", Options: []spec.Option{ {Name: "--outdated", Description: "show outdated"}, {Name: "--format", Description: "output format"}, }}, @@ -76,6 +76,6 @@ func makePipSpec(name string) *core.Spec { } func init() { - core.Register(makePipSpec("pip")) - core.Register(makePipSpec("pip3")) + spec.Register(makePipSpec("pip")) + spec.Register(makePipSpec("pip3")) } diff --git a/commands/python/pipenv.go b/commands/python/pipenv.go index 400ffa0..d6e2144 100644 --- a/commands/python/pipenv.go +++ b/commands/python/pipenv.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pipenv", Description: "Python package manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "clean", Description: "Uninstalls all packages not specified in Pipfile.lock"}, {Name: "graph", Description: "Displays currently-installed dependency graph information"}, {Name: "install", Description: "Initializes a package manager or installs all packages from Pipfile"}, @@ -23,7 +23,7 @@ func init() { {Name: "uninstall", Description: "Uninstalls a provided package and removes it from Pipfile"}, {Name: "update", Description: "Runs lock, then sync"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--unused", Description: "Given a code path, show potentially unused dependencies"}, {Name: "--db", Description: "Ignore specified vulnerability during PyUp Safety checks"}, {Name: "--output", Description: "Translates to --json, --full-report or --bare from PyUp Safety check"}, diff --git a/commands/python/pipx.go b/commands/python/pipx.go index 50b3b19..01a87f3 100644 --- a/commands/python/pipx.go +++ b/commands/python/pipx.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pipx", Description: "Installed package", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install a package"}, {Name: "package_spec", Description: "Package name or pip installation spec"}, {Name: "inject", Description: "Installs packages to an existing pipx-managed virtual environment"}, @@ -24,7 +24,7 @@ func init() { {Name: "environment", Description: "Print a list of variables used in pipx.constants"}, {Name: "completions", Description: "Print instructions on enabling shell completions for pipx"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--include-deps", Description: "Include apps of dependent packages"}, {Name: "--force", Description: "Modify existing virtual environment and files in PIPX_BIN_DIR"}, {Name: "--suffix", Description: "Optional suffix for virtual environment and executable names"}, diff --git a/commands/python/pre_commit.go b/commands/python/pre_commit.go index ca11e53..6997b47 100644 --- a/commands/python/pre_commit.go +++ b/commands/python/pre_commit.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pre-commit", Description: "Show help message and exit", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "autoupdate", Description: "Auto-update pre-commit config to the latest repos' versions"}, {Name: "clean", Description: "Clean out pre-commit files"}, {Name: "gc", Description: "Clean unused cached repos"}, @@ -23,7 +23,7 @@ func init() { {Name: "uninstall", Description: "Uninstall the pre-commit script"}, {Name: "help", Description: "Show help for a specific command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help message and exit"}, {Name: "--color", Description: "Whether to use color in output. Defaults to `auto`"}, {Name: "--config", Description: "Path to alternate config file"}, diff --git a/commands/python/pyenv.go b/commands/python/pyenv.go index bf6c7be..633b0c1 100644 --- a/commands/python/pyenv.go +++ b/commands/python/pyenv.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pyenv", Description: "Pyenv", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "commands", Description: "Lists all available pyenv commands"}, {Name: "local", Description: "Sets a local application-specific Python version"}, {Name: "global", Description: "Sets the global version of Python to be used in all shells"}, @@ -18,7 +18,7 @@ func init() { {Name: "rehash", Description: "Performs a deployment (default)"}, {Name: "whence", Description: "Lists all Python versions with the given command installed"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "--unset", Description: "Sets the global version of Python to be used in all shells"}, {Name: "-l", Description: "List all available versions"}, diff --git a/commands/python/pytest.go b/commands/python/pytest.go index c7f7caf..b9580a2 100644 --- a/commands/python/pytest.go +++ b/commands/python/pytest.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pytest", Description: "Control assertion debugging tools.", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--assert", Description: "Remove all cache contents at start of test run"}, {Name: "--cache-show", Description: "Per-test capturing method"}, {Name: "--code-highlight", Description: "Whether code should be highlighted (only if --color is also enabled)"}, diff --git a/commands/python/python.go b/commands/python/python.go index 9c5edf1..ea5f917 100644 --- a/commands/python/python.go +++ b/commands/python/python.go @@ -1,15 +1,15 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func makePythonSpec(name string) *core.Spec { - return &core.Spec{ +func makePythonSpec(name string) *spec.Spec { + return &spec.Spec{ Name: name, Description: "python interpreter", - Generator: core.FileGenerator(".py"), - Options: []core.Option{ + Generator: spec.FileGenerator(".py"), + Options: []spec.Option{ {Name: "-m", Description: "run module as script"}, {Name: "-c", Description: "run inline command"}, {Name: "-i", Description: "interactive after script"}, @@ -23,27 +23,27 @@ func makePythonSpec(name string) *core.Spec { } func init() { - core.Register(makePythonSpec("python")) - core.Register(makePythonSpec("python3")) - core.Register(makePythonSpec("py")) + spec.Register(makePythonSpec("python")) + spec.Register(makePythonSpec("python3")) + spec.Register(makePythonSpec("py")) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "uv", Description: "fast python package manager", - Subcommands: []core.Subcommand{ - {Name: "add", Description: "add dependency", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "add", Description: "add dependency", Options: []spec.Option{ {Name: "--dev", Description: "dev dependency"}, {Name: "--optional", Description: "optional dependency"}, {Name: "-e", Description: "editable install"}, {Name: "--index-url", Description: "custom index"}, }}, {Name: "remove", Description: "remove dependency", Generator: pipPackageGenerator}, - {Name: "sync", Description: "sync environment", Options: []core.Option{ + {Name: "sync", Description: "sync environment", Options: []spec.Option{ {Name: "--frozen", Description: "no lockfile update"}, {Name: "--dev", Description: "include dev deps"}, }}, - {Name: "run", Description: "run command in env", Generator: core.FileGenerator(".py")}, - {Name: "pip", Description: "pip interface", Subcommands: []core.Subcommand{ + {Name: "run", Description: "run command in env", Generator: spec.FileGenerator(".py")}, + {Name: "pip", Description: "pip interface", Subcommands: []spec.Subcommand{ {Name: "install", Description: "install packages"}, {Name: "uninstall", Description: "uninstall packages", Generator: pipPackageGenerator}, {Name: "list", Description: "list packages"}, @@ -51,7 +51,7 @@ func init() { {Name: "show", Description: "show package", Generator: pipPackageGenerator}, {Name: "compile", Description: "compile requirements"}, }}, - {Name: "venv", Description: "create virtual env", Generator: core.FileGenerator("/"), Options: []core.Option{ + {Name: "venv", Description: "create virtual env", Generator: spec.FileGenerator("/"), Options: []spec.Option{ {Name: "--python", Description: "python version"}, {Name: "--seed", Description: "install seed packages"}, }}, @@ -60,13 +60,13 @@ func init() { {Name: "publish", Description: "publish to pypi"}, {Name: "lock", Description: "update lockfile"}, {Name: "tree", Description: "show dependency tree"}, - {Name: "tool", Description: "manage tools", Subcommands: []core.Subcommand{ + {Name: "tool", Description: "manage tools", Subcommands: []spec.Subcommand{ {Name: "install", Description: "install tool"}, {Name: "run", Description: "run tool"}, {Name: "list", Description: "list tools"}, {Name: "uninstall", Description: "uninstall tool"}, }}, - {Name: "python", Description: "manage python versions", Subcommands: []core.Subcommand{ + {Name: "python", Description: "manage python versions", Subcommands: []spec.Subcommand{ {Name: "install", Description: "install python"}, {Name: "list", Description: "list versions"}, {Name: "find", Description: "find python"}, @@ -75,18 +75,18 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "poetry", Description: "python dependency manager", - Subcommands: []core.Subcommand{ - {Name: "add", Description: "add dependency", Options: []core.Option{ + Subcommands: []spec.Subcommand{ + {Name: "add", Description: "add dependency", Options: []spec.Option{ {Name: "--dev", Description: "dev dependency"}, {Name: "--group", Description: "dependency group"}, }}, {Name: "remove", Description: "remove dependency", Generator: pipPackageGenerator}, {Name: "install", Description: "install dependencies"}, {Name: "update", Description: "update dependencies"}, - {Name: "run", Description: "run in env", Generator: core.FileGenerator(".py")}, + {Name: "run", Description: "run in env", Generator: spec.FileGenerator(".py")}, {Name: "shell", Description: "activate virtual env"}, {Name: "build", Description: "build package"}, {Name: "publish", Description: "publish to pypi"}, @@ -94,7 +94,7 @@ func init() { {Name: "check", Description: "check pyproject.toml"}, {Name: "init", Description: "init new project"}, {Name: "new", Description: "create new project"}, - {Name: "env", Description: "manage envs", Subcommands: []core.Subcommand{ + {Name: "env", Description: "manage envs", Subcommands: []spec.Subcommand{ {Name: "info", Description: "show env info"}, {Name: "list", Description: "list envs"}, {Name: "use", Description: "switch python"}, diff --git a/commands/python/ruff.go b/commands/python/ruff.go index 287ea77..8adb804 100644 --- a/commands/python/ruff.go +++ b/commands/python/ruff.go @@ -1,17 +1,17 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ruff", Description: "Enable verbose logging", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "graph", Description: "Generate a map of Python file dependencies or dependents"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Enable verbose logging"}, {Name: "-q", Description: "Print diagnostics, but nothing else"}, {Name: "-s", Description: "Path to the `pyproject.toml` or `ruff.toml` file to use for configuration"}, diff --git a/commands/python/sqlfluff.go b/commands/python/sqlfluff.go index fcf66a5..6be7ade 100644 --- a/commands/python/sqlfluff.go +++ b/commands/python/sqlfluff.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sqlfluff", Description: "A dialect-flexible and configurable SQL linter", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "lint", Description: "Lint SQL files via passing a list of files or using stdin"}, {Name: "templater", Description: "Name of templater to use, eg. raw"}, {Name: "dialect", Description: "Name of dialect, eg. ANSI"}, @@ -20,7 +20,7 @@ func init() { {Name: "version", Description: "Show the version of sqlfluff"}, {Name: "rules", Description: "Show the current rules in use"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Show the version and exit"}, {Name: "--help", Description: "Show help for sqlfluff"}, {Name: "--nocolor", Description: "No color - output will be without ANSI color codes"}, diff --git a/commands/python/sqlmesh.go b/commands/python/sqlmesh.go index cd271c5..e439c2b 100644 --- a/commands/python/sqlmesh.go +++ b/commands/python/sqlmesh.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sqlmesh", Description: "SQLMesh command line tool", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a new SQLMesh repository"}, {Name: "render", Description: "Render a model's query, optionally expanding referenced models"}, {Name: "evaluate", Description: "Evaluate a model and return a dataframe with a default limit of 1000"}, @@ -26,7 +26,7 @@ func init() { {Name: "rollback", Description: "Rollback SQLMesh to the previous migration"}, {Name: "create_external_models", Description: "Create a schema file containing external model schemas"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--paths", Description: "Paths to SQLMesh project files"}, {Name: "--config", Description: "Path to config file"}, {Name: "--gateway", Description: "The name of the gateway"}, diff --git a/commands/python/streamlit.go b/commands/python/streamlit.go index 5bf3cb9..b80bb70 100644 --- a/commands/python/streamlit.go +++ b/commands/python/streamlit.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "streamlit", Description: "Streamlit", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "activate", Description: "Activate Streamlit by entering your email"}, {Name: "cache", Description: "Manage the Streamlit cache"}, {Name: "clear", Description: "Clear st.cache, st.memo, and st.singleton caches"}, @@ -21,7 +21,7 @@ func init() { {Name: "file", Description: "The Python script to run"}, {Name: "version", Description: "Print Streamlit's version number"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--log_level", Description: "Set the log level"}, {Name: "--help", Description: "Show a help message and exit"}, {Name: "--version", Description: "Show the version and exit"}, diff --git a/commands/python/youtube_dl.go b/commands/python/youtube_dl.go index fedad62..74154ca 100644 --- a/commands/python/youtube_dl.go +++ b/commands/python/youtube_dl.go @@ -1,14 +1,14 @@ package python import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "youtube-dl", Description: "Clipboard", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Print the help text and exit"}, {Name: "--version", Description: "Print program version and exit"}, {Name: "-U", Description: "Display the current browser identification"}, diff --git a/commands/runner/ant.go b/commands/runner/ant.go index f1522f6..ea2cd10 100644 --- a/commands/runner/ant.go +++ b/commands/runner/ant.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ant", Description: "Apache Ant - Java library and command-line build tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for ant"}, {Name: "--noconfig", Description: "Enable use of jikes by default, unless set explicitly in configuration files"}, {Name: "--execdebug", Description: "Print ant exec line generated by this launch script"}, diff --git a/commands/runner/composer.go b/commands/runner/composer.go index b7a9544..bf5d09a 100644 --- a/commands/runner/composer.go +++ b/commands/runner/composer.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "composer", Description: "Composer Command", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display this help message"}, {Name: "-q", Description: "Do not output any message"}, {Name: "-V", Description: "Display this application version"}, diff --git a/commands/runner/dbt.go b/commands/runner/dbt.go index 9e369e5..db3e7ef 100644 --- a/commands/runner/dbt.go +++ b/commands/runner/dbt.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dbt", Description: "CLI for dbt - Data Build Tool", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Run models, test tests, snapshot snapshots, and seed seeds"}, {Name: "directory", Description: "Directory containing profiles.yml"}, {Name: "name", Description: "Name of profile to use when running dbt project"}, @@ -45,7 +45,7 @@ func init() { {Name: "ls", Description: "Lists resources defined in a dbt project"}, {Name: "parse", Description: "Parse dbt project and write detailed timing information"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--full-refresh", Description: "Treat incremental models as table models"}, {Name: "-x", Description: "Exit immediately if a single model fails to build"}, {Name: "--profiles-dir", Description: "Set the profiles directory"}, diff --git a/commands/runner/drush.go b/commands/runner/drush.go index 06bad69..572af60 100644 --- a/commands/runner/drush.go +++ b/commands/runner/drush.go @@ -1,11 +1,11 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "drush", Description: "Drush is a command line shell and Unix scripting interface for Drupal", }) diff --git a/commands/runner/elixir.go b/commands/runner/elixir.go index c5300ed..dfd3596 100644 --- a/commands/runner/elixir.go +++ b/commands/runner/elixir.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "elixir", Description: "Elixir Language", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Evaluates the given command"}, {Name: "-h", Description: "Prints this message and exits"}, {Name: "-r", Description: "Requires the given files/patterns"}, diff --git a/commands/runner/gem.go b/commands/runner/gem.go index e1d5b22..58e2973 100644 --- a/commands/runner/gem.go +++ b/commands/runner/gem.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gem", Description: "Use HTTP proxy for remote operations", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Help about any command"}, {Name: "install", Description: "Install a gem into the local repository"}, {Name: "PLATFORM", Description: "The platform of gem"}, @@ -60,7 +60,7 @@ func init() { {Name: "GEM", Description: "Name of gem"}, {Name: "uninstall", Description: "Uninstall gems from the local repository"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Use HTTP proxy for remote operations"}, {Name: "--no-http-proxy", Description: "Do not use HTTP proxy for remote operations"}, {Name: "-l", Description: "Restrict operations to the LOCAL domain"}, diff --git a/commands/runner/hexo.go b/commands/runner/hexo.go index 336d3af..353dd2b 100644 --- a/commands/runner/hexo.go +++ b/commands/runner/hexo.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hexo", Description: "Draft for", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Get or set configurations"}, {Name: "help", Description: "Displays a help for each command"}, {Name: "command", Description: "The command to display help for"}, @@ -35,7 +35,7 @@ func init() { {Name: "list", Description: "List all routes"}, {Name: "version", Description: "Display version information"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-clone", Description: "Copy files instead of cloning from GitHub"}, {Name: "--no-install", Description: "Skip npm install"}, {Name: "-p", Description: "Post path. Customize the path of the post"}, diff --git a/commands/runner/justfile.go b/commands/runner/justfile.go index 9182c42..9ca656b 100644 --- a/commands/runner/justfile.go +++ b/commands/runner/justfile.go @@ -6,15 +6,15 @@ import ( "regexp" "strings" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "just", Description: "command runner", MaxArgs: 1, - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { file, err := os.Open("justfile") if err != nil { // try uppercase @@ -25,7 +25,7 @@ func init() { } defer func() { _ = file.Close() }() - var suggestions []core.Suggestion + var suggestions []spec.Suggestion seen := make(map[string]bool) scanner := bufio.NewScanner(file) // matching recipes like `build:` @@ -61,7 +61,7 @@ func init() { desc = lastComment } - suggestions = append(suggestions, core.Suggestion{ + suggestions = append(suggestions, spec.Suggestion{ Cmd: cmd, Desc: desc, }) diff --git a/commands/runner/laravel.go b/commands/runner/laravel.go index 976ca90..4575bf8 100644 --- a/commands/runner/laravel.go +++ b/commands/runner/laravel.go @@ -1,17 +1,17 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "laravel", Description: "The output format (txt, xml, json, or md)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Create a new Laravel application"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--format", Description: "The output format (txt, xml, json, or md)"}, {Name: "--raw", Description: "To output raw command list"}, {Name: "--dev", Description: "Initialize a Git repository"}, diff --git a/commands/runner/magento.go b/commands/runner/magento.go index 5254c46..1180a7f 100644 --- a/commands/runner/magento.go +++ b/commands/runner/magento.go @@ -1,11 +1,11 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "magento", Description: "Open-source E-commerce", }) diff --git a/commands/runner/makefile.go b/commands/runner/makefile.go index ba9e8e4..7539348 100644 --- a/commands/runner/makefile.go +++ b/commands/runner/makefile.go @@ -5,14 +5,14 @@ import ( "os" "regexp" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "make", Description: "build automation", - Generator: func(tokens []string, prefix string, partial string) []core.Suggestion { + Generator: func(tokens []string, prefix string, partial string) []spec.Suggestion { // Read the Makefile file, err := os.Open("Makefile") if err != nil { @@ -21,7 +21,7 @@ func init() { } defer func() { _ = file.Close() }() - var suggestions []core.Suggestion + var suggestions []spec.Suggestion seen := make(map[string]bool) scanner := bufio.NewScanner(file) // Matches targets like `build:`, ` run :`, etc. @@ -42,7 +42,7 @@ func init() { if prefix != "" { cmd = prefix + " " + target } - suggestions = append(suggestions, core.Suggestion{ + suggestions = append(suggestions, spec.Suggestion{ Cmd: cmd, Desc: "make target", }) diff --git a/commands/runner/mix.go b/commands/runner/mix.go index eac30d3..1aba97a 100644 --- a/commands/runner/mix.go +++ b/commands/runner/mix.go @@ -1,20 +1,20 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mix", Description: "Build tool for Elixir", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Creates a new Elixir project at the given path"}, {Name: "run", Description: "Starts the current application and runs code"}, {Name: "code", Description: "String containing code to execute"}, {Name: "file|pattern", Description: "The file|pattern to execute"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "--app", Description: "Name the OTP application for the project"}, {Name: "--modules", Description: "Name the modules in the generated code skeleton"}, diff --git a/commands/runner/php.go b/commands/runner/php.go index 3ceb4ba..7e53c3e 100644 --- a/commands/runner/php.go +++ b/commands/runner/php.go @@ -1,11 +1,11 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "php", Description: "Run the PHP interpreter", }) diff --git a/commands/runner/phpunit.go b/commands/runner/phpunit.go index 08ce793..186bf29 100644 --- a/commands/runner/phpunit.go +++ b/commands/runner/phpunit.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "phpunit", Description: "Generate code coverage report in Clover XML format,", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--coverage-clover", Description: "Generate code coverage report in Clover XML format,"}, {Name: "--coverage-crap4j", Description: "Generate code coverage report in Crap4J XML format"}, {Name: "--coverage-html", Description: "Generate code coverage report in HTML format"}, diff --git a/commands/runner/phpunit_watcher.go b/commands/runner/phpunit_watcher.go index 0f36e38..676ef64 100644 --- a/commands/runner/phpunit_watcher.go +++ b/commands/runner/phpunit_watcher.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "phpunit-watcher", Description: "Automatically rerun PHPUnit tests when source code changes", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--filter", Description: "Watch a specific test"}, }, }) diff --git a/commands/runner/rails.go b/commands/runner/rails.go index 1142e26..cea152b 100644 --- a/commands/runner/rails.go +++ b/commands/runner/rails.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rails", Description: "Create a new rails application", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-skip-namespace", Description: "Skip namespace (affects only isolated applications)"}, {Name: "-r", Description: "Path to the Ruby binary of your choice"}, {Name: "-m", Description: "Path to some application template (can be a filesystem path or URL)"}, diff --git a/commands/runner/rake.go b/commands/runner/rake.go index bb2f2e7..7d6e12a 100644 --- a/commands/runner/rake.go +++ b/commands/runner/rake.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rake", Description: "A ruby build program with capabilities similar to make", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "Do a dry run without executing actions"}, {Name: "-h", Description: "Display this help message"}, {Name: "-I", Description: "Include LIBDIR in the search path for required modules"}, diff --git a/commands/runner/rubocop.go b/commands/runner/rubocop.go index 106bd6e..68a6846 100644 --- a/commands/runner/rubocop.go +++ b/commands/runner/rubocop.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rubocop", Description: "Run only lint cops", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "Run only lint cops"}, {Name: "-x", Description: "Run only layout cops, with autocorrect on"}, {Name: "--safe", Description: "Run only safe cops"}, diff --git a/commands/runner/ruby.go b/commands/runner/ruby.go index 9a2afed..f3cd74a 100644 --- a/commands/runner/ruby.go +++ b/commands/runner/ruby.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ruby", Description: "Interpreted object-oriented scripting language", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--copyright", Description: "Prints the copyright notice"}, {Name: "--version", Description: "Prints the version of Ruby interpreter"}, {Name: "-0", Description: "Specifies the input record separator ($/) as an octal number"}, diff --git a/commands/runner/rvm.go b/commands/runner/rvm.go index 78ca36e..6e42d63 100644 --- a/commands/runner/rvm.go +++ b/commands/runner/rvm.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rvm", Description: "Show version of rvm", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "use", Description: "Setup current shell to use a specific ruby version"}, {Name: "reset", Description: "Remove default and current settings, exit the shell"}, {Name: "info", Description: "Show information about the current ruby environment"}, @@ -23,7 +23,7 @@ func init() { {Name: "uninstall", Description: "Uninstall one or many ruby versions, leaves their sources"}, {Name: "remove", Description: "Remove one or many ruby versions, including their sources"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Show version of rvm"}, {Name: "--default", Description: "When used with ruby selection, sets a default ruby for new shells"}, {Name: "--debug", Description: "Enable debug mode"}, diff --git a/commands/runner/sidekiq.go b/commands/runner/sidekiq.go index 7b7f3ef..89d50f0 100644 --- a/commands/runner/sidekiq.go +++ b/commands/runner/sidekiq.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sidekiq", Description: "Background job framework for Ruby", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--concurrency", Description: "Processor threads to use"}, {Name: "--environment", Description: "Application environment"}, {Name: "--tag", Description: "Process tag for procline"}, diff --git a/commands/runner/symfony.go b/commands/runner/symfony.go index 7883599..fd94508 100644 --- a/commands/runner/symfony.go +++ b/commands/runner/symfony.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "symfony", Description: "Symfony Binary", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "cloud:clear-cache", Description: "Clear the CLI cache"}, {Name: "cloud:docs", Description: "Open the online documentation"}, {Name: "cloud:multi", Description: "Execute a command on multiple projects"}, @@ -60,7 +60,7 @@ func init() { {Name: "cloud:environment:url", Description: "Get the public URLs of an environment"}, {Name: "cloud:environment:xdebug", Description: "Open a tunnel to Xdebug on the environment"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help"}, {Name: "-q", Description: "Do not output any message"}, {Name: "--no-ansi", Description: "Disable ANSI output"}, diff --git a/commands/runner/valet.go b/commands/runner/valet.go index 90f68f4..c7bdf60 100644 --- a/commands/runner/valet.go +++ b/commands/runner/valet.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "valet", Description: "Do not output any message", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "diagnose", Description: "Output diagnostics to aid in debugging Valet"}, {Name: "fetch-share-url", Description: "Get the URL to the current share tunnel (for Expose or ngrok)"}, {Name: "forget", Description: "Remove the current working (or specified) directory from Valet's list of paths"}, @@ -46,7 +46,7 @@ func init() { {Name: "share-tool", Description: "Get the name of the current share tool (Expose or ngrok)"}, {Name: "status", Description: "Output the status of Valet and its installed services and config"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Do not output any message"}, {Name: "-V", Description: "Display this application version"}, {Name: "--ansi", Description: "Force (or disable --no-ansi) ANSI output"}, diff --git a/commands/runner/vapor.go b/commands/runner/vapor.go index 6bebb05..0320232 100644 --- a/commands/runner/vapor.go +++ b/commands/runner/vapor.go @@ -1,14 +1,14 @@ package runner import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vapor", Description: "Vapor Toolbox (Server-side Swift web framework)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Builds an app in the console"}, {Name: "new", Description: "Generates a new app"}, {Name: "name", Description: "Name of project and folder"}, @@ -21,7 +21,7 @@ func init() { {Name: "update", Description: "Updates Supervisor entry for current project"}, {Name: "xcode", Description: "Opens an app in Xcode"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--template", Description: "The URL of a Git repository to use as a template"}, {Name: "--branch", Description: "Template repository branch to use"}, {Name: "--output", Description: "The directory to place the new project in"}, diff --git a/commands/rust/cargo.go b/commands/rust/cargo.go index 793eca4..85f00e8 100644 --- a/commands/rust/cargo.go +++ b/commands/rust/cargo.go @@ -1,16 +1,16 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cargo", Description: "rust toolchain", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "compile project", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--release", Description: "optimized build"}, }, }, diff --git a/commands/rust/dprint.go b/commands/rust/dprint.go index 08d899b..e78b158 100644 --- a/commands/rust/dprint.go +++ b/commands/rust/dprint.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dprint", Description: "Prints the help of the given subcommand(s)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initializes a configuration file in the current directory"}, {Name: "fmt", Description: "Formats the source files and writes the result to the file system"}, {Name: "check", Description: "Checks for any files that haven't been formatted"}, @@ -19,7 +19,7 @@ func init() { {Name: "clear-cache", Description: "Deletes the plugin cache directory"}, {Name: "license", Description: "Outputs the software license"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--excludes", Description: "A pluggable and configurable code formatting platform written in Rust"}, {Name: "--diff", Description: "Outputs a check-like diff of every formatted file"}, {Name: "--stdin", Description: "Checks for any files that haven't been formatted"}, diff --git a/commands/rust/pijul.go b/commands/rust/pijul.go index eec5df9..5581e44 100644 --- a/commands/rust/pijul.go +++ b/commands/rust/pijul.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pijul", Description: "Adds a path to the tree", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Adds a path to the tree"}, {Name: "PATHS", Description: "Paths to add to the internal tree"}, {Name: "apply", Description: "Applies changes to a channel"}, @@ -42,7 +42,7 @@ func init() { {Name: "unrecord", Description: "Unrecords a list of changes"}, {Name: "CHANGE_ID", Description: "The hash of a change (unambiguous prefixes are accepted)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Print help information"}, {Name: "-r", Description: "Applies changes to a channel"}, {Name: "--channel", Description: "Apply change to this channel"}, diff --git a/commands/rust/rustc.go b/commands/rust/rustc.go index 0168462..c0d408d 100644 --- a/commands/rust/rustc.go +++ b/commands/rust/rustc.go @@ -1,15 +1,15 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rustc", Description: "Rust compiler", - Generator: core.FileGenerator(".rs"), - Options: []core.Option{ + Generator: spec.FileGenerator(".rs"), + Options: []spec.Option{ {Name: "-o", Description: "output file"}, {Name: "--edition", Description: "Rust edition (2015/2018/2021/2024)"}, {Name: "--crate-type", Description: "crate type (bin/lib/dylib/cdylib/rlib)"}, diff --git a/commands/rust/rustup.go b/commands/rust/rustup.go index 32dc8b2..498b203 100644 --- a/commands/rust/rustup.go +++ b/commands/rust/rustup.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rustup", Description: "The Rust toolchain installer", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "show", Description: "Show the active and installed toolchains or profiles"}, {Name: "active-toolchain", Description: "Show the active toolchain"}, {Name: "home", Description: "Display the computed value of RUSTUP_HOME"}, @@ -37,7 +37,7 @@ func init() { {Name: "auto-self-update", Description: "The rustup auto self update mode"}, {Name: "completions", Description: "Generate tab-completion scripts for your shell"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Prints help information"}, {Name: "--force", Description: "Force an update, even if some components are missing"}, {Name: "--force-non-host", Description: "Prints help information"}, diff --git a/commands/rust/taplo.go b/commands/rust/taplo.go index 81715ce..f23c678 100644 --- a/commands/rust/taplo.go +++ b/commands/rust/taplo.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "taplo", Description: "Set color values for the output", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Operations with the Taplo config file"}, {Name: "default", Description: "Print the default `.taplo.toml` configuration file"}, {Name: "help", Description: "Print this message or the help of the given subcommand(s)"}, @@ -22,7 +22,7 @@ func init() { {Name: "stdio", Description: "Run the language server over the standard input and output"}, {Name: "tcp", Description: "Run the language server and listen on a TCP address"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--colors", Description: "Set color values for the output"}, {Name: "--verbose", Description: "Enable verbose logging format"}, {Name: "--log-spans", Description: "Enable logging spans"}, diff --git a/commands/rust/tokei.go b/commands/rust/tokei.go index 72eb985..28ae8b3 100644 --- a/commands/rust/tokei.go +++ b/commands/rust/tokei.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tokei", Description: "Count your code, quickly", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Will print out statistics on individual files"}, {Name: "-h", Description: "Prints help information"}, {Name: "--hidden", Description: "Count hidden files"}, diff --git a/commands/rust/trunk.go b/commands/rust/trunk.go index a8c21be..197b421 100644 --- a/commands/rust/trunk.go +++ b/commands/rust/trunk.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "trunk", Description: "Run on all files instead of only changed files", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Setup trunk in this repo"}, {Name: "check", Description: "Universal code checker"}, {Name: "upgrade", Description: "Upgrade all linters to latest versions"}, @@ -28,7 +28,7 @@ func init() { {Name: "shutdown", Description: "Shutdown the trunk daemon if it is running"}, {Name: "status", Description: "Report daemon status"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Run on all files instead of only changed files"}, {Name: "-n", Description: "Don't automatically apply fixes"}, {Name: "--include-existing-autofixes", Description: "Show autofixes for existing issues"}, diff --git a/commands/rust/wasm_bindgen.go b/commands/rust/wasm_bindgen.go index c5ea30e..3daf794 100644 --- a/commands/rust/wasm_bindgen.go +++ b/commands/rust/wasm_bindgen.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wasm-bindgen", Description: "Generate bindings between WebAssembly and JavaScript", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for wasm-bindgen"}, {Name: "--version", Description: "Show version for wasm-bindgen"}, {Name: "--out-dir", Description: "Output directory"}, diff --git a/commands/rust/wasm_pack.go b/commands/rust/wasm_pack.go index a90c09e..084887a 100644 --- a/commands/rust/wasm_pack.go +++ b/commands/rust/wasm_pack.go @@ -1,18 +1,18 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wasm-pack", Description: "Build an npm package", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Prints this message or the help of the given subcommand(s)"}, {Name: "test", Description: "Run tests for WebAssembly module"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for wasm-pack or for the given subcommand(s)"}, {Name: "--quiet", Description: "Suppress output from stdout"}, {Name: "--version", Description: "Show version for wasm-pack"}, diff --git a/commands/rust/zellij.go b/commands/rust/zellij.go index 4d049fe..4df95cf 100644 --- a/commands/rust/zellij.go +++ b/commands/rust/zellij.go @@ -1,14 +1,14 @@ package rust import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zellij", Description: "Change where zellij looks for the configuration file", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Change where zellij looks for the configuration file"}, {Name: "--config-dir", Description: "Change where zellij looks for the configuration directory"}, {Name: "-d", Description: "Specify emitting additional debug information"}, diff --git a/commands/sys/adb.go b/commands/sys/adb.go index 9358a4f..7854f81 100644 --- a/commands/sys/adb.go +++ b/commands/sys/adb.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "adb", Description: "Forward-lock the app", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "devices", Description: "List connected devices"}, {Name: "help", Description: "Show this help message"}, {Name: "get-state", Description: "Print offline | bootloader | device"}, @@ -60,7 +60,7 @@ func init() { {Name: "install-multiple", Description: "Push multiple APKs to the device for a single package and install them"}, {Name: "install-multi-package", Description: "Push one or more packages to the device and install them atomically"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "Forward-lock the app"}, {Name: "-r", Description: "Replace existing application"}, {Name: "-t", Description: "Allow test packages"}, diff --git a/commands/sys/ag.go b/commands/sys/ag.go index 4b8082a..959af68 100644 --- a/commands/sys/ag.go +++ b/commands/sys/ag.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ag", Description: "Recursively search for PATTERN in PATH. Like grep or ack, but faster", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ackmate", Description: "Set thread affinity (if platform supports it)"}, {Name: "--noaffinity", Description: "Don't set thread affinity (if platform supports it)"}, {Name: "-a", Description: "Print lines after match"}, diff --git a/commands/sys/airflow.go b/commands/sys/airflow.go index 92f9bd4..e226640 100644 --- a/commands/sys/airflow.go +++ b/commands/sys/airflow.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "airflow", Description: "Subcommand", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "celery", Description: "Celery components"}, {Name: "broker_api", Description: "Broker API"}, {Name: "flower_conf", Description: "Configuration file for flower"}, @@ -60,7 +60,7 @@ func init() { {Name: "db", Description: "Database operations"}, {Name: "migration_wait_timeout", Description: "Timeout to wait for db to migrate"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show this help message and exit"}, {Name: "-A", Description: "Broker API"}, {Name: "-D", Description: "Daemonize instead of running in the foreground"}, diff --git a/commands/sys/aliases.go b/commands/sys/aliases.go index f047672..8faeecb 100644 --- a/commands/sys/aliases.go +++ b/commands/sys/aliases.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "aliases", Description: "Prints help information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "add", Description: "Add an alias via the cli"}, {Name: "name", Description: "The name of the alias"}, {Name: "command", Description: "The command you want to run"}, @@ -30,7 +30,7 @@ func init() { {Name: "move", Description: "Move a user up or down the prioritization list"}, {Name: "use", Description: "Assign a user to the top of the priority list"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Prints help information"}, {Name: "--version", Description: "Prints version information"}, {Name: "-E", Description: "Whether to enable the user if they are not currently enabled"}, diff --git a/commands/sys/asciinema.go b/commands/sys/asciinema.go index 3cdbe2c..490b6af 100644 --- a/commands/sys/asciinema.go +++ b/commands/sys/asciinema.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "asciinema", Description: "Terminal session recorder", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "rec", Description: "Start a recording"}, {Name: "play", Description: "Replay recorded asciicast in a terminal"}, {Name: "seconds", Description: "Can be fractional"}, @@ -17,7 +17,7 @@ func init() { {Name: "upload", Description: "Upload recorded asciicast to asciinema.org site"}, {Name: "auth", Description: "Link and manage your install ID with your asciinema.org user account"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Output version information and exit"}, {Name: "-h", Description: "Output help message and exit"}, {Name: "--stdin", Description: "Enable stdin (keyboard) recording"}, diff --git a/commands/sys/asr.go b/commands/sys/asr.go index fc5e2e6..6e95c52 100644 --- a/commands/sys/asr.go +++ b/commands/sys/asr.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "asr", Description: "Can be a disk image, /dev entry, or volume mountpoint", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Displays asr usage information"}, {Name: "version", Description: "Displays asr version"}, {Name: "restore", Description: "Restores a disk image or volume to another volume"}, @@ -17,7 +17,7 @@ func init() { {Name: "interface", Description: "The network interface to be used for multicasting"}, {Name: "configuration", Description: "Configuration file in standard property list format"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--source", Description: "Can be a disk image, /dev entry, or volume mountpoint"}, {Name: "--target", Description: "Can be a /dev entry, or volume mountpoint"}, {Name: "--file", Description: "When performing a multicast restore, --file can be specified instead of --target"}, diff --git a/commands/sys/atuin.go b/commands/sys/atuin.go index 13a4b01..293d561 100644 --- a/commands/sys/atuin.go +++ b/commands/sys/atuin.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "atuin", Description: "Magical shell history", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "history", Description: "Manipulate shell history"}, {Name: "start", Description: "Begins a new command in the history"}, {Name: "end", Description: "Finishes a new command in the history (adds time, exit code)"}, @@ -28,7 +28,7 @@ func init() { {Name: "uuid", Description: "Generate a UUID"}, {Name: "gen-completions", Description: "Generate shell completions"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--exit", Description: "List all items in history"}, {Name: "--cwd", Description: "Show only the text of the command"}, {Name: "--format", Description: "Get the last command ran"}, diff --git a/commands/sys/basename.go b/commands/sys/basename.go index 364dab8..e975d8a 100644 --- a/commands/sys/basename.go +++ b/commands/sys/basename.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "basename", Description: "Return filename portion of pathname", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Treat every argument as a string"}, {Name: "-s", Description: "Suffix to remove from string"}, }, diff --git a/commands/sys/bc.go b/commands/sys/bc.go index 94193ce..6dee77a 100644 --- a/commands/sys/bc.go +++ b/commands/sys/bc.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bc", Description: "An arbitrary precision calculator language", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Print the usage and exit"}, {Name: "--interactive", Description: "Force interactive mode"}, {Name: "--mathlib", Description: "Define the standard math library"}, diff --git a/commands/sys/btop.go b/commands/sys/btop.go index 78d50d3..357ceaa 100644 --- a/commands/sys/btop.go +++ b/commands/sys/btop.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "btop", Description: "Beautifuler htop (interactive process viewer)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Shows help for btop"}, {Name: "--low-color", Description: "Disables truecolor, converts 24-bit colors to 256-color"}, {Name: "--tty_on", Description: "Forces ON tty mode, max 16 colors and tty friendly graph symbol"}, diff --git a/commands/sys/bundle.go b/commands/sys/bundle.go index 85b8136..72a0220 100644 --- a/commands/sys/bundle.go +++ b/commands/sys/bundle.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bundle", Description: "Gem", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install the gems specified by the Gemfile or Gemfile.lock"}, {Name: "update", Description: "Update dependencies to their latest versions"}, {Name: "exec", Description: "Execute a command in the context of the bundle"}, @@ -26,7 +26,7 @@ func init() { {Name: "clean", Description: "Clean up unused gems in your Bundler directory"}, {Name: "doctor", Description: "Display warnings about common problems"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--binstubs", Description: "Create binstubs in dir"}, {Name: "--clean", Description: "Remove unused gems after install"}, {Name: "--deployment", Description: "For Production and CI use"}, diff --git a/commands/sys/cal.go b/commands/sys/cal.go index bff22e2..79d260e 100644 --- a/commands/sys/cal.go +++ b/commands/sys/cal.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cal", Description: "Displays a calendar and the date of Easter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Turns off highlighting of today"}, {Name: "-j", Description: "Display Julian days (days one-based, numbered from January 1)"}, {Name: "-m", Description: "Display a calendar for the specified year"}, diff --git a/commands/sys/cci.go b/commands/sys/cci.go index b89fc5e..e90eac7 100644 --- a/commands/sys/cci.go +++ b/commands/sys/cci.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cci", Description: "CumulusCI command line interface", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "flow", Description: "Commands for finding and running flows for a project"}, {Name: "doc", Description: "Exports RST format documentation for all flows"}, {Name: "info", Description: "Displays information for a flow"}, @@ -49,7 +49,7 @@ func init() { {Name: "project", Description: "Commands for interacting with project repository configurations"}, {Name: "init", Description: "Initialize a new project for use with the cumulusci toolbelt"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--project", Description: "Include project-specific flows only"}, {Name: "--help", Description: "Help for flow doc"}, {Name: "--plain", Description: "Print the table using plain ascii"}, diff --git a/commands/sys/cdk8s.go b/commands/sys/cdk8s.go index d7ed894..9fc452f 100644 --- a/commands/sys/cdk8s.go +++ b/commands/sys/cdk8s.go @@ -1,21 +1,21 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cdk8s", Description: "CDK for K8s", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Create a new, empty CDK8S project"}, {Name: "type", Description: "Select language you are using"}, {Name: "import", Description: "Import a CRD schema to generate generate resources"}, {Name: "spec", Description: "Path to the CRD schema"}, {Name: "synth", Description: "Synthesizes Kubernetes manifests for all charts in your app"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--language", Description: "Output programming language"}, {Name: "--class-prefix", Description: "A prefix to add to all generated class names"}, {Name: "--no-class-prefix", Description: "Does not add a prefix to generated class names"}, diff --git a/commands/sys/chezmoi.go b/commands/sys/chezmoi.go index 4b7de5f..b545e4c 100644 --- a/commands/sys/chezmoi.go +++ b/commands/sys/chezmoi.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "chezmoi", Description: "Attribute modifier", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "manage", Description: "Add an existing file, directory, or symlink to the source state"}, {Name: "apply", Description: "Update the destination directory to match the target state"}, {Name: "archive", Description: "Generate a tar archive of the target state"}, @@ -53,7 +53,7 @@ func init() { {Name: "help", Description: "Help about any command"}, {Name: "generate", Description: "Generate a file for use with chezmoi"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--autotemplate", Description: "Generate the template when adding files as templates"}, {Name: "--create", Description: "Add files that should exist, irrespective of their contents"}, {Name: "--encrypt", Description: "Encrypt files"}, diff --git a/commands/sys/chsh.go b/commands/sys/chsh.go index 82f16d4..dd15314 100644 --- a/commands/sys/chsh.go +++ b/commands/sys/chsh.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "chsh", Description: "Change your login shell", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-s", Description: "Specify login shell"}, {Name: "-l", Description: "Print list of shells and exit"}, {Name: "-u", Description: "Print help message and exit"}, diff --git a/commands/sys/codesign.go b/commands/sys/codesign.go index 5288930..ce3ca00 100644 --- a/commands/sys/codesign.go +++ b/commands/sys/codesign.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "codesign", Description: "Create and manipulate code signatures", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--all-architectures", Description: "Display information about the code at the path(s) given"}, {Name: "-D", Description: "Constructs and prints the hosting chain of a running program"}, {Name: "-i", Description: "Indicates the granularity of code signing. Pagesize must be a power of two"}, diff --git a/commands/sys/croc.go b/commands/sys/croc.go index 5beb74b..711eea4 100644 --- a/commands/sys/croc.go +++ b/commands/sys/croc.go @@ -1,19 +1,19 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "croc", Description: "Send file(s), or folder", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "send", Description: "Send file(s), or folder"}, {Name: "relay", Description: "Start your own relay"}, {Name: "help", Description: "Shows a list of commands or help for one command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--code", Description: "Codephrase used to connect to relay"}, {Name: "--hash", Description: "Hash algorithm"}, {Name: "--text", Description: "Send some text"}, diff --git a/commands/sys/crontab.go b/commands/sys/crontab.go index 384f0f0..ce44d0a 100644 --- a/commands/sys/crontab.go +++ b/commands/sys/crontab.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "crontab", Description: "Maintain crontab file for individual users", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "Edit the current crontab"}, {Name: "-l", Description: "Display the current crontab"}, {Name: "-r", Description: "Remove the current crontab"}, diff --git a/commands/sys/date.go b/commands/sys/date.go index d437b4e..188fe7e 100644 --- a/commands/sys/date.go +++ b/commands/sys/date.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "date", Description: "Display or set date and time", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Set the kernel's value for daylight saving time"}, {Name: "-f", Description: "The format with which to parse the new date value"}, {Name: "-j", Description: "Don't try to set the date"}, diff --git a/commands/sys/dateseq.go b/commands/sys/dateseq.go index fa3f5c0..43a0041 100644 --- a/commands/sys/dateseq.go +++ b/commands/sys/dateseq.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dateseq", Description: "Print help and exit", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Print help and exit"}, {Name: "--version", Description: "Print version and exit"}, {Name: "--quiet", Description: "Suppress message about date/time and duration parse errors and fix-ups"}, diff --git a/commands/sys/dcli.go b/commands/sys/dcli.go index 206316b..a54b966 100644 --- a/commands/sys/dcli.go +++ b/commands/sys/dcli.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dcli", Description: "Display help for command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "sync", Description: "Manually synchronize the local vault with Dashlane"}, {Name: "read", Description: "Retrieve a secret from the local vault via its path"}, {Name: "path", Description: "Path to the secret (dl:///<field> or dl://<id>/<field>)"}, @@ -38,7 +38,7 @@ func init() { {Name: "backup", Description: "Backup your local vault (will use the current directory by default)"}, {Name: "logout", Description: "Logout and clean your local database and OS keychain"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Input file of a template to inject the credential into"}, {Name: "-o", Description: "Output file to write the injected template to"}, {Name: "--print", Description: "Prints just the OTP code, instead of copying it to the clipboard"}, diff --git a/commands/sys/dd.go b/commands/sys/dd.go index eb12a19..b45e878 100644 --- a/commands/sys/dd.go +++ b/commands/sys/dd.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dd", Description: "The same as", }) diff --git a/commands/sys/ddev.go b/commands/sys/ddev.go index a2bbe8f..b0ac420 100644 --- a/commands/sys/ddev.go +++ b/commands/sys/ddev.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ddev", Description: "DDEV-Local local development environment", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "auth", Description: "A collection of authentication commands"}, {Name: "ssh", Description: "Add ssh key authentication to the ddev-ssh-auth container"}, {Name: "clean", Description: "Removes items ddev has created"}, @@ -54,7 +54,7 @@ func init() { {Name: "version", Description: "Print ddev version and component versions"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--ssh-key-path", Description: "Full path to ssh key directory"}, {Name: "--all", Description: "Clean all ddev projects"}, {Name: "--dry-run", Description: "Run the clean command without deleting"}, diff --git a/commands/sys/defaults.go b/commands/sys/defaults.go index 6f92213..9023c2c 100644 --- a/commands/sys/defaults.go +++ b/commands/sys/defaults.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "defaults", Description: "Global domain", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "read", Description: "Shows defaults"}, {Name: "write", Description: "Writes key for domain"}, {Name: "delete", Description: "Deletes domain or key in domain"}, @@ -19,7 +19,7 @@ func init() { {Name: "help", Description: "Show help text"}, {Name: "read-type", Description: "Shows the type for the given domain, key"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-globalDomain", Description: "Global domain"}, {Name: "-app", Description: "Application name"}, {Name: "-string", Description: "Command line interface to a user's defaults"}, diff --git a/commands/sys/degit.go b/commands/sys/degit.go index 4abaf40..16a2432 100644 --- a/commands/sys/degit.go +++ b/commands/sys/degit.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "degit", Description: "Straightforward project scaffolding", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Print help"}, {Name: "-f", Description: "Overwrite existing files"}, {Name: "-c", Description: "Use a cache"}, diff --git a/commands/sys/deta.go b/commands/sys/deta.go index c6099cb..32ca22d 100644 --- a/commands/sys/deta.go +++ b/commands/sys/deta.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "deta", Description: "Runtime", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "login", Description: "Trigger the login process for the Deta CLI"}, {Name: "version", Description: "Print the Deta version"}, {Name: "upgrade", Description: "Upgrade Deta CLI version"}, @@ -41,7 +41,7 @@ func init() { {Name: "expression", Description: "The cron expression to be set"}, {Name: "remove", Description: "Remove a schedule from a Deta Micro"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help for login"}, {Name: "-v", Description: "Upgrade CLI to specific version"}, {Name: "-n", Description: "Create a micro with Node (node14.x) runtime"}, diff --git a/commands/sys/dirname.go b/commands/sys/dirname.go index 888af1b..b005c4c 100644 --- a/commands/sys/dirname.go +++ b/commands/sys/dirname.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dirname", Description: "Return directory portion of pathname", }) diff --git a/commands/sys/do_release_upgrade.go b/commands/sys/do_release_upgrade.go index 7a006b7..a0e0c96 100644 --- a/commands/sys/do_release_upgrade.go +++ b/commands/sys/do_release_upgrade.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "do-release-upgrade", Description: "Upgrade Ubuntu to latest release", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help message and exit"}, {Name: "-d", Description: "If using the latest supported release, upgrade to the development release"}, {Name: "-p", Description: "Try upgrading to the latest release using the upgrader from Ubuntu-proposed"}, diff --git a/commands/sys/dog.go b/commands/sys/dog.go index eb2b047..c471531 100644 --- a/commands/sys/dog.go +++ b/commands/sys/dog.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dog", Description: "Human-readable host names, nameservers, types, or classes", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "A", Description: "Query Domain A Record"}, {Name: "MX", Description: "Query Domain MX Record"}, {Name: "CNAME", Description: "Query Domain CNAME Record"}, @@ -18,7 +18,7 @@ func init() { {Name: "TTL", Description: "Query TTL Record"}, {Name: "ANY +noall +answer", Description: "Query ALL DNS Records"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-q", Description: "Host name or IP address to query"}, {Name: "-t", Description: "Type of the DNS record being queried (A, MX, NS...)"}, {Name: "-n", Description: "Address of the nameserver to send packets to"}, diff --git a/commands/sys/dotnet.go b/commands/sys/dotnet.go index bf904ab..b98e724 100644 --- a/commands/sys/dotnet.go +++ b/commands/sys/dotnet.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dotnet", Description: "The dotnet cli", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Prints out a list of the installed .NET SDKs"}, {Name: "-?", Description: "Prints out a list of available commands"}, {Name: "-d", Description: "Enables diagnostic output"}, diff --git a/commands/sys/dscacheutil.go b/commands/sys/dscacheutil.go index d85d0ca..b5ef7e6 100644 --- a/commands/sys/dscacheutil.go +++ b/commands/sys/dscacheutil.go @@ -1,17 +1,17 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dscacheutil", Description: "Utility for managing the Directory Service cache", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "category", Description: "Category to query"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "List the options for calling dscacheutil"}, {Name: "-q", Description: "Query the Directory Service cache"}, {Name: "-a", Description: "Attribute to query"}, diff --git a/commands/sys/dscl.go b/commands/sys/dscl.go index 621d8e3..23aff9c 100644 --- a/commands/sys/dscl.go +++ b/commands/sys/dscl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dscl", Description: "Prompt for password", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "read", Description: "Prints a directory"}, {Name: "readall", Description: "Prints all the records of a given type"}, {Name: "readpl", Description: "Prints the contents of plist_path"}, @@ -24,7 +24,7 @@ func init() { {Name: "passwd", Description: "Changes the password of a user"}, {Name: "new password", Description: "New password of the user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Prompt for password"}, {Name: "-u", Description: "Authenticate as user"}, {Name: "-P", Description: "Authenticate with password"}, diff --git a/commands/sys/dtm.go b/commands/sys/dtm.go index 3419f1b..b43fdf0 100644 --- a/commands/sys/dtm.go +++ b/commands/sys/dtm.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dtm", Description: "Plugin", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "apply", Description: "Create or update DevOps tools according to DevStream configuration file"}, {Name: "completion", Description: "Generate the autocompletion script for dtm for the specified shell"}, {Name: "bash", Description: "Generate autocompletion script for bash"}, @@ -30,7 +30,7 @@ func init() { {Name: "version", Description: "Print the version number of DevStream"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--config-file", Description: "Config file"}, {Name: "--plugin-dir", Description: "Plugins directory"}, {Name: "--yes", Description: "Apply directly without confirmation"}, diff --git a/commands/sys/echo.go b/commands/sys/echo.go index 4cc223d..cae642f 100644 --- a/commands/sys/echo.go +++ b/commands/sys/echo.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "echo", Description: "Environment Variable", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-n", Description: "Do not print the trailing newline character"}, {Name: "-e", Description: "Interpret escape sequences"}, {Name: "-E", Description: "Disable escape sequences"}, diff --git a/commands/sys/eleventy.go b/commands/sys/eleventy.go index 1c71a1a..c3f8356 100644 --- a/commands/sys/eleventy.go +++ b/commands/sys/eleventy.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "eleventy", Description: "Eleventy is a simpler static site generator", }) diff --git a/commands/sys/env.go b/commands/sys/env.go index 36f6a75..55f9cd0 100644 --- a/commands/sys/env.go +++ b/commands/sys/env.go @@ -4,11 +4,11 @@ import ( "os" "strings" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func envVarGenerator(tokens []string, _ string, _ string) []core.Suggestion { - var results []core.Suggestion +func envVarGenerator(tokens []string, _ string, _ string) []spec.Suggestion { + var results []spec.Suggestion for _, env := range os.Environ() { parts := strings.SplitN(env, "=", 2) name := parts[0] @@ -20,36 +20,36 @@ func envVarGenerator(tokens []string, _ string, _ string) []core.Suggestion { val = val[:57] + "..." } } - results = append(results, core.Suggestion{Cmd: name, Desc: val}) + results = append(results, spec.Suggestion{Cmd: name, Desc: val}) } return results } func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "export", Description: "set environment variable", Generator: envVarGenerator, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "env", Description: "print environment", Generator: envVarGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "start with empty env"}, {Name: "-u", Description: "unset variable"}, {Name: "-0", Description: "null delimited"}, }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "printenv", Description: "print environment variables", Generator: envVarGenerator, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "unset", Description: "unset variable", Generator: envVarGenerator, diff --git a/commands/sys/exec.go b/commands/sys/exec.go index 8c571c7..ab255ad 100644 --- a/commands/sys/exec.go +++ b/commands/sys/exec.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "exec", Description: "Replace the current shell with a program", }) diff --git a/commands/sys/fastlane.go b/commands/sys/fastlane.go index 935fc09..e7ec630 100644 --- a/commands/sys/fastlane.go +++ b/commands/sys/fastlane.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fastlane", Description: "Helps you with your initial fastlane setup", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Helps you with your initial fastlane setup"}, {Name: "swift", Description: "Fastlane configuration written in Swift (Beta). Swift setup is still in beta"}, {Name: "appleID", Description: "Your Apple ID"}, @@ -34,7 +34,7 @@ func init() { {Name: "update_fastlane", Description: "Update fastlane to the latest release"}, {Name: "update_plugins", Description: "Update all plugin dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-u", Description: "Only iOS projects Your Apple ID"}, {Name: "-f", Description: "Overwrite the existing README.md in the ./fastlane folder"}, {Name: "-c", Description: "Add custom command(s) for which tab auto complete should be enabled too"}, diff --git a/commands/sys/fdisk.go b/commands/sys/fdisk.go index 14a667a..abe4ee9 100644 --- a/commands/sys/fdisk.go +++ b/commands/sys/fdisk.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fdisk", Description: "Manipulate disk partition table", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for fdisk"}, {Name: "--version", Description: "Show version for lsblk"}, {Name: "--sector-size", Description: "Specify the sector size of the disk"}, diff --git a/commands/sys/ffmpeg.go b/commands/sys/ffmpeg.go index 36ba152..93586ef 100644 --- a/commands/sys/ffmpeg.go +++ b/commands/sys/ffmpeg.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ffmpeg", Description: "Play, record, convert, and stream audio and video", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Input file"}, {Name: "-L", Description: "Show license"}, {Name: "-h", Description: "Show help"}, diff --git a/commands/sys/firefox.go b/commands/sys/firefox.go index 38834f9..0e67e6b 100644 --- a/commands/sys/firefox.go +++ b/commands/sys/firefox.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "firefox", Description: "Free open-source web browser developer by Mozilla", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--display", Description: "Specify an X display to use"}, {Name: "--sync", Description: "Make X calls synchronous"}, {Name: "--g-fatal-warnings", Description: "Make all warnings fatal"}, diff --git a/commands/sys/fisher.go b/commands/sys/fisher.go index e71b210..3f9342f 100644 --- a/commands/sys/fisher.go +++ b/commands/sys/fisher.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fisher", Description: "[Prompt] - 🌊 The ultimate Fish prompt", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install plugin"}, {Name: "remove", Description: "Remove plugins"}, {Name: "installed plugins", Description: "The plugin you want to remove"}, @@ -16,7 +16,7 @@ func init() { {Name: "list", Description: "List plugins"}, {Name: "RegEx", Description: "Search in list with regular expression"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for fisher"}, {Name: "--version", Description: "Show fisher version"}, }, diff --git a/commands/sys/fmt.go b/commands/sys/fmt.go index 39af327..695d877 100644 --- a/commands/sys/fmt.go +++ b/commands/sys/fmt.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fmt", Description: "Simple text formatter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "File(s) to format"}, }, }) diff --git a/commands/sys/forc.go b/commands/sys/forc.go index c4a69af..9d091b9 100644 --- a/commands/sys/forc.go +++ b/commands/sys/forc.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "forc", Description: "Fuel Orchestrator", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "addr2line", Description: "Show location and context of an opcode address in its source file"}, {Name: "build", Description: "Compile the current or target project"}, {Name: "check", Description: "Check the current or target project and all of its dependencies for errors"}, @@ -40,7 +40,7 @@ func init() { {Name: "submit", Description: "A `forc` plugin for interacting with a Fuel node"}, {Name: "deploy", Description: "Build output file options"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-S", Description: "Where to search for the project root"}, {Name: "-g", Description: "Source file mapping in JSON format"}, {Name: "-c", Description: "How many lines of context to show"}, diff --git a/commands/sys/forge.go b/commands/sys/forge.go index c13b292..77c2102 100644 --- a/commands/sys/forge.go +++ b/commands/sys/forge.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "forge", Description: "A command line interface for managing Atlassian-hosted apps", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "autocomplete", Description: "Configures autocomplete for the Forge CLI"}, {Name: "create", Description: "Create an app"}, {Name: "deploy", Description: "Deploy your app to an environment"}, @@ -31,7 +31,7 @@ func init() { {Name: "webtrigger", Description: "Get a web trigger URL"}, {Name: "whoami", Description: "Display the account information of the logged in user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--verbose", Description: "Enable verbose mode"}, {Name: "-h", Description: "Display help for command"}, {Name: "-t", Description: "Specify the template to use"}, diff --git a/commands/sys/fzf.go b/commands/sys/fzf.go index 1d126f3..5c34983 100644 --- a/commands/sys/fzf.go +++ b/commands/sys/fzf.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fzf", Description: "A general-purpose command-line fuzzy finder", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-x", Description: "Enables extended-search mode"}, {Name: "-e", Description: "Enables Exact-match"}, {Name: "--algo", Description: "Fuzzy matching algorithm"}, diff --git a/commands/sys/fzf_tmux.go b/commands/sys/fzf_tmux.go index 5630de8..0d2b9d9 100644 --- a/commands/sys/fzf_tmux.go +++ b/commands/sys/fzf_tmux.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fzf-tmux", Description: "Opens a fuzzy finder in a tmux pane", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-x", Description: "Enables extended-search mode"}, {Name: "-e", Description: "Enables Exact-match"}, {Name: "--algo", Description: "Fuzzy matching algorithm"}, diff --git a/commands/sys/gltfjsx.go b/commands/sys/gltfjsx.go index 943874f..c6dcd75 100644 --- a/commands/sys/gltfjsx.go +++ b/commands/sys/gltfjsx.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gltfjsx", Description: "GLTF to JSX converter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-t", Description: "Add Typescript definitions"}, {Name: "-v", Description: "Verbose output w/ names and empty groups"}, {Name: "-m", Description: "Include metadata (as userData)"}, diff --git a/commands/sys/goto.go b/commands/sys/goto.go index b7c8682..0c7ea33 100644 --- a/commands/sys/goto.go +++ b/commands/sys/goto.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "goto", Description: "Goto", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for goto"}, {Name: "--register", Description: "Registers an alias"}, {Name: "--unregister", Description: "Unregister an alias"}, diff --git a/commands/sys/gum.go b/commands/sys/gum.go index ce2c2b4..66d1d9f 100644 --- a/commands/sys/gum.go +++ b/commands/sys/gum.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gum", Description: "Background Color", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "choose", Description: "Choose an option from a list of choices"}, {Name: "confirm", Description: "Ask a user to confirm an action"}, {Name: "prompt", Description: "Prompt to display"}, @@ -27,7 +27,7 @@ func init() { {Name: "pager", Description: "Scroll through a file"}, {Name: "content", Description: "Display content to scroll"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--background", Description: "Background Color"}, {Name: "--foreground", Description: "Foreground Color"}, {Name: "--border", Description: "Border Style"}, diff --git a/commands/sys/herd.go b/commands/sys/herd.go index 610efba..48bef6f 100644 --- a/commands/sys/herd.go +++ b/commands/sys/herd.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "herd", Description: "Display this application version", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "phpVersion", Description: "The PHP version you want to use; e.g 8.1"}, {Name: "nodeVersion", Description: "The Node version you want to use; e.g 21"}, {Name: "links", Description: "Display all of the registered Herd links"}, @@ -16,7 +16,7 @@ func init() { {Name: "namespace", Description: "The namespace name"}, {Name: "site", Description: "The site to get the PHP executable path for"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display this application version"}, {Name: "--quiet", Description: "Do not output any message"}, {Name: "--verbose", Description: "Force ANSI output"}, diff --git a/commands/sys/hop.go b/commands/sys/hop.go index 2be86b2..b404c20 100644 --- a/commands/sys/hop.go +++ b/commands/sys/hop.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hop", Description: "Interact with Hop in your terminal", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "auth", Description: "Authenticate with Hop"}, {Name: "help", Description: "Prints this message or the help of the given subcommand(s)"}, {Name: "login", Description: "Login to Hop"}, @@ -24,7 +24,7 @@ func init() { {Name: "switch", Description: "Switch to a different project"}, {Name: "whoami", Description: "Get information about the current user"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--type", Description: "Type of the container, defaults to `ephemeral`"}, {Name: "--containers", Description: "Number of containers to use, defaults to 1 if `scaling` is manual"}, {Name: "--cpu", Description: "The number of CPUs to use, defaults to 1"}, diff --git a/commands/sys/hostname.go b/commands/sys/hostname.go index e1c4571..a82cc8a 100644 --- a/commands/sys/hostname.go +++ b/commands/sys/hostname.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hostname", Description: "Set or print name of current host system", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Include domain information in the printed name"}, {Name: "-s", Description: "Trim off any domain information from the printed name"}, {Name: "-d", Description: "Only print domain information"}, diff --git a/commands/sys/htop.go b/commands/sys/htop.go index d79daa3..7027236 100644 --- a/commands/sys/htop.go +++ b/commands/sys/htop.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "htop", Description: "Improved top (interactive process viewer)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for htop"}, {Name: "--no-color", Description: "Use a monochrome color scheme"}, {Name: "--delay", Description: "Delay between updates, in tenths of sec"}, diff --git a/commands/sys/http.go b/commands/sys/http.go index 6fd31d1..4b2dc52 100644 --- a/commands/sys/http.go +++ b/commands/sys/http.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "http", Description: "HTTPie: command-line HTTP client for the API era", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--json", Description: "Disables all sorting while formatting output"}, {Name: "--sorted", Description: "Re-enables all sorting options while formatting output"}, {Name: "--format-options", Description: "Controls output formatting"}, diff --git a/commands/sys/hyper.go b/commands/sys/hyper.go index ed7b04b..37f106b 100644 --- a/commands/sys/hyper.go +++ b/commands/sys/hyper.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hyper", Description: "Hyper is an Electron-based terminal", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install a plugin"}, {Name: "docs", Description: "Open the npm page of a plugin"}, {Name: "help", Description: "Display help"}, diff --git a/commands/sys/hyperfine.go b/commands/sys/hyperfine.go index c60660d..1cbe1fd 100644 --- a/commands/sys/hyperfine.go +++ b/commands/sys/hyperfine.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "hyperfine", Description: "A command-line benchmarking tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--warmup", Description: "Perform warmupruns (number) before the actual benchmarking starts"}, {Name: "--min-runs", Description: "Perform at least NUM runs for each command"}, {Name: "--max-runs", Description: "Perform at most NUM runs for each command. Default: no limit"}, diff --git a/commands/sys/ibus.go b/commands/sys/ibus.go index 80cec71..3bd8246 100644 --- a/commands/sys/ibus.go +++ b/commands/sys/ibus.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ibus", Description: "Set or get engine", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "engine", Description: "Set or get engine"}, {Name: "exit", Description: "Exit ibus-daemon"}, {Name: "list-engine", Description: "Show available engines"}, diff --git a/commands/sys/id.go b/commands/sys/id.go index c5e78b7..d666657 100644 --- a/commands/sys/id.go +++ b/commands/sys/id.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "id", Description: "Display the full name of the user", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-A", Description: "Display the full name of the user"}, {Name: "-G", Description: "Display the MAC label of the current process"}, {Name: "-P", Description: "Display the id as a password file entry"}, diff --git a/commands/sys/ignite_cli.go b/commands/sys/ignite_cli.go index ff25293..b6e885d 100644 --- a/commands/sys/ignite_cli.go +++ b/commands/sys/ignite_cli.go @@ -1,20 +1,20 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ignite-cli", Description: "Output usage information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Create a new React Native app"}, {Name: "g", Description: "Generate components and other app features"}, {Name: "update", Description: "Update installed generators"}, {Name: "doctor", Description: "Check your environment & display versions of installed dependencies"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Output usage information"}, {Name: "-v", Description: "Output the version number"}, {Name: "--expo", Description: "Use Expo"}, diff --git a/commands/sys/install.go b/commands/sys/install.go index 6a28228..c929fb1 100644 --- a/commands/sys/install.go +++ b/commands/sys/install.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "install", Description: "Use suffix as the backup suffix if -b is given", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-B", Description: "Use suffix as the backup suffix if -b is given"}, {Name: "-b", Description: "Create directories. Missing parent directories are created as required"}, {Name: "-f", Description: "Specify a group. A numeric GID is allowed"}, diff --git a/commands/sys/join.go b/commands/sys/join.go index 1691d0e..d81e4ab 100644 --- a/commands/sys/join.go +++ b/commands/sys/join.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "join", Description: "The join utility performs an", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Replace empty output fields with string"}, {Name: "-o", Description: "Join on the field'th field of file1"}, {Name: "-2", Description: "Join on the field'th field of file2"}, diff --git a/commands/sys/julia.go b/commands/sys/julia.go index c74979f..d3f6ef0 100644 --- a/commands/sys/julia.go +++ b/commands/sys/julia.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "julia", Description: "The Julia Programming Language", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Display version information"}, {Name: "-h", Description: "Print help message for julia (--help-hidden for more)"}, {Name: "--help-hidden", Description: "Uncommon options not shown by `-h`"}, diff --git a/commands/sys/kafkactl.go b/commands/sys/kafkactl.go index de23ec1..1ddf56d 100644 --- a/commands/sys/kafkactl.go +++ b/commands/sys/kafkactl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kafkactl", Description: "Command-line interface for Apache Kafka", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "edit", Description: "Alter topics, partitions"}, {Name: "partition", Description: "Alter a partition"}, {Name: "topic", Description: "Alter a topic"}, @@ -37,7 +37,7 @@ func init() { {Name: "version", Description: "Print the version of kafkactl"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--replicas", Description: "Set replicas for a partition"}, {Name: "--validate-only", Description: "Validate only"}, {Name: "--config", Description: "Configs in format `key=value`"}, diff --git a/commands/sys/kamal.go b/commands/sys/kamal.go index 2eebd48..cfe5191 100644 --- a/commands/sys/kamal.go +++ b/commands/sys/kamal.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kamal", Description: "Skip image build and push", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "boot", Description: "Boot new accessory service on host (use NAME=all to boot all accessories)"}, {Name: "upload", Description: "Upload accessory files to host"}, {Name: "directories", Description: "Create accessory directories on host"}, @@ -21,7 +21,7 @@ func init() { {Name: "status", Description: "Show status of accessory on host"}, {Name: "remove", Description: "Remove accessory container, image and data directory from host"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-P", Description: "Skip image build and push"}, {Name: "--since", Description: "Number of lines to show from each server"}, {Name: "--grep", Description: "Show lines with grep match only (use this to fetch specific requests by id)"}, diff --git a/commands/sys/kitty.go b/commands/sys/kitty.go index ea91379..fb31387 100644 --- a/commands/sys/kitty.go +++ b/commands/sys/kitty.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kitty", Description: "A cat like utility to display images in the terminal", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "close-tab", Description: "Close the specified tab(s)"}, {Name: "close-window", Description: "Close the specified window(s)"}, {Name: "detach-tab", Description: "Detach the specified tab"}, @@ -21,7 +21,7 @@ func init() { {Name: "set-window-title", Description: "Set the title of the specified window(s)"}, {Name: "signal-child", Description: "Send one or more signals to the foreground process in the specified window(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--align", Description: "Horizontal alignment for the displayed image"}, {Name: "--place", Description: "Choose where on the screen to display the image"}, {Name: "--scale-up", Description: "Mirror the image about a horizontal or vertical axis or both"}, diff --git a/commands/sys/klist.go b/commands/sys/klist.go index f4dc372..07342f4 100644 --- a/commands/sys/klist.go +++ b/commands/sys/klist.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "klist", Description: "Credential cache to list", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Credential cache to list"}, {Name: "--cache", Description: "Credential cache to list"}, {Name: "-s", Description: "Display AFS tokens"}, diff --git a/commands/sys/kool.go b/commands/sys/kool.go index 11f3bf7..cc1481b 100644 --- a/commands/sys/kool.go +++ b/commands/sys/kool.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kool", Description: "Script", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "create", Description: "Create a new project using a preset"}, {Name: "preset", Description: "Preset that will be used to create the project"}, {Name: "folder", Description: "Folder where the project will be created"}, @@ -30,7 +30,7 @@ func init() { {Name: "status", Description: "Show the status of all service containers"}, {Name: "stop", Description: "Stop and destroy running service containers"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--verbose", Description: "Increases output verbosity"}, {Name: "--help", Description: "Help for create"}, {Name: "--container", Description: "Container target"}, diff --git a/commands/sys/launchctl.go b/commands/sys/launchctl.go index dda6023..c416f7e 100644 --- a/commands/sys/launchctl.go +++ b/commands/sys/launchctl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "launchctl", Description: "Service or domain target", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "bootstrap", Description: "Bootstraps a domain or a service into a domain"}, {Name: "bootout", Description: "Tears down a domain or removes a service from a domain"}, {Name: "enable", Description: "Enables an existing service"}, @@ -59,7 +59,7 @@ func init() { {Name: "version", Description: "Prints the launchd version"}, {Name: "help", Description: "Prints the usage for a given subcommand"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-w", Description: "Enable if disabled"}, {Name: "-F", Description: "Force load"}, {Name: "-S", Description: "Session"}, diff --git a/commands/sys/leaf.go b/commands/sys/leaf.go index b055bf9..2796bf9 100644 --- a/commands/sys/leaf.go +++ b/commands/sys/leaf.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "leaf", Description: "Create and interact with your leaf projects", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "completion", Description: "Dump the shell completion script"}, {Name: "create", Description: "[init] Create a new Leaf PHP project"}, {Name: "project name", Description: "Name of the project"}, @@ -27,7 +27,7 @@ func init() { {Name: "uninstall", Description: "Uninstall a package"}, {Name: "update", Description: "Update leaf cli to the latest version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Do not output any message"}, {Name: "-V", Description: "Display this application version"}, {Name: "--ansi", Description: "Force ANSI output"}, diff --git a/commands/sys/lima.go b/commands/sys/lima.go index add9722..e72fb64 100644 --- a/commands/sys/lima.go +++ b/commands/sys/lima.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lima", Description: "Lima is an alias for", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Help for lima"}, }, }) diff --git a/commands/sys/login.go b/commands/sys/login.go index d545a2b..cb3f141 100644 --- a/commands/sys/login.go +++ b/commands/sys/login.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "login", Description: "Begin session on the system", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Preserve environment"}, {Name: "-r", Description: "Perform autologin protocol for rlogin"}, {Name: "-h", Description: "Specify host"}, diff --git a/commands/sys/lsblk.go b/commands/sys/lsblk.go index e70e66f..d14a712 100644 --- a/commands/sys/lsblk.go +++ b/commands/sys/lsblk.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lsblk", Description: "List block devices", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for lsblk"}, {Name: "--version", Description: "Show version for lsblk"}, {Name: "--all", Description: "Also list empty devices and RAM disk devices"}, diff --git a/commands/sys/lsof.go b/commands/sys/lsof.go index 721e3df..fdf6c73 100644 --- a/commands/sys/lsof.go +++ b/commands/sys/lsof.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lsof", Description: "List open files", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-?", Description: "Help"}, {Name: "-a", Description: "Apply AND to the selections (defaults to OR)"}, {Name: "-b", Description: "Avoid kernel blocks"}, diff --git a/commands/sys/man.go b/commands/sys/man.go index f39e85b..b5218e8 100644 --- a/commands/sys/man.go +++ b/commands/sys/man.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "man", Description: "Format and display manual pages", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-C", Description: "Specify the configuration file to use"}, {Name: "-M", Description: "Specify the list of directories to search (colon separated)"}, {Name: "-P", Description: "Specify the pager program"}, diff --git a/commands/sys/meroxa.go b/commands/sys/meroxa.go index d0824d7..812327a 100644 --- a/commands/sys/meroxa.go +++ b/commands/sys/meroxa.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "meroxa", Description: "The Meroxa CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "accounts", Description: "Manage Meroxa Accounts"}, {Name: "ls", Description: "List Meroxa Accounts"}, {Name: "set", Description: "Set active account"}, @@ -42,7 +42,7 @@ func init() { {Name: "version", Description: "Display the Meroxa CLI version"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-headers", Description: "Display output without headers"}, {Name: "--docker-hub-access-token", Description: "DockerHub access token to use to build and deploy the app"}, {Name: "--docker-hub-username", Description: "DockerHub username to use to build and deploy the app"}, diff --git a/commands/sys/mkdocs.go b/commands/sys/mkdocs.go index 6af66cc..2abd618 100644 --- a/commands/sys/mkdocs.go +++ b/commands/sys/mkdocs.go @@ -1,20 +1,20 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mkdocs", Description: "Project documentation with Markdown", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build the MkDocs documentation"}, {Name: "gh-deploy", Description: "Deploy your documentation to GitHub Pages"}, {Name: "new", Description: "Create a new MkDocs project"}, {Name: "serve", Description: "Run the builtin development server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Provide a specific MkDocs config"}, {Name: "-s", Description: "Enable strict mode. This will cause MkDocs to abort the build on any warnings"}, {Name: "-t", Description: "The theme to use when building your documentation"}, diff --git a/commands/sys/mkfifo.go b/commands/sys/mkfifo.go index 3dacd92..ddf75f0 100644 --- a/commands/sys/mkfifo.go +++ b/commands/sys/mkfifo.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mkfifo", Description: "Make FIFOs (first-in, first-out)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-m", Description: "FIFO(s) to create"}, }, }) diff --git a/commands/sys/mkinitcpio.go b/commands/sys/mkinitcpio.go index c12ce21..89498b0 100644 --- a/commands/sys/mkinitcpio.go +++ b/commands/sys/mkinitcpio.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mkinitcpio", Description: "Create an initial ramdisk environment", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for mkinitcpio"}, {Name: "--version", Description: "Display version information"}, {Name: "--addhooks", Description: "Add additional hooks to the image"}, diff --git a/commands/sys/mknod.go b/commands/sys/mknod.go index 9579d43..800e4ea 100644 --- a/commands/sys/mknod.go +++ b/commands/sys/mknod.go @@ -1,18 +1,18 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mknod", Description: "Create device special file", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "c", Description: "Create (c)haracter device"}, {Name: "b", Description: "Create (b)lock device"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-F", Description: "Format"}, }, }) diff --git a/commands/sys/mosh.go b/commands/sys/mosh.go index e8a27d1..7974da4 100644 --- a/commands/sys/mosh.go +++ b/commands/sys/mosh.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mosh", Description: "Address of remote machine to log into", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for mosh"}, {Name: "--client", Description: "Local echo options"}, {Name: "-4", Description: "Use IPv4 only"}, diff --git a/commands/sys/mount.go b/commands/sys/mount.go index 762f24c..eeddce7 100644 --- a/commands/sys/mount.go +++ b/commands/sys/mount.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "mount", Description: "Mount disks and manage subtrees", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Help for abc"}, {Name: "-a", Description: "Mount all filesystems in fstab"}, {Name: "-c", Description: "Don't canonicalize paths"}, diff --git a/commands/sys/ncal.go b/commands/sys/ncal.go index 85064bc..3b45925 100644 --- a/commands/sys/ncal.go +++ b/commands/sys/ncal.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ncal", Description: "Displays a calendar and the date of Easter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Turns off highlighting of today"}, {Name: "-J", Description: "Display date of Easter (for western churches)"}, {Name: "-j", Description: "Display Julian days (days one-based, numbered from January 1)"}, diff --git a/commands/sys/neofetch.go b/commands/sys/neofetch.go index e374165..66619ba 100644 --- a/commands/sys/neofetch.go +++ b/commands/sys/neofetch.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "neofetch", Description: "The most complete system information CLI tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for neofetch"}, {Name: "--disable", Description: "Disable information line"}, {Name: "--title_fqdn", Description: "Hide/Show Fully Qualified Domain Name in title"}, diff --git a/commands/sys/network.go b/commands/sys/network.go index 35294b5..61e5ad9 100644 --- a/commands/sys/network.go +++ b/commands/sys/network.go @@ -1,15 +1,15 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "curl", Description: "transfer data via URL", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-X", Description: "request method (GET/POST/PUT/DELETE)"}, {Name: "-H", Description: "request header"}, {Name: "-d", Description: "request body data"}, @@ -35,11 +35,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wget", Description: "non-interactive downloader", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-O", Description: "output filename"}, {Name: "-q", Description: "quiet"}, {Name: "-v", Description: "verbose"}, @@ -56,10 +56,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nc", Description: "netcat - TCP/UDP tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "listen mode"}, {Name: "-p", Description: "local port"}, {Name: "-z", Description: "port scan mode"}, @@ -70,10 +70,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ping", Description: "test network connectivity", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "packet count"}, {Name: "-i", Description: "interval"}, {Name: "-t", Description: "TTL"}, @@ -82,10 +82,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dig", Description: "DNS lookup", - Options: []core.Option{ + Options: []spec.Option{ {Name: "+short", Description: "short output"}, {Name: "+noall", Description: "no output flags"}, {Name: "+answer", Description: "answer section only"}, @@ -94,30 +94,30 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nslookup", Description: "query DNS", }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ifconfig", Description: "configure network interface", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "all interfaces"}, }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ip", Description: "show/manage network", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "addr", Description: "address management"}, {Name: "link", Description: "network device management"}, {Name: "route", Description: "routing table management"}, {Name: "neigh", Description: "ARP table"}, {Name: "rule", Description: "routing policy"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-4", Description: "IPv4 only"}, {Name: "-6", Description: "IPv6 only"}, {Name: "-br", Description: "brief output"}, @@ -125,10 +125,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "netstat", Description: "network statistics", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-t", Description: "TCP connections"}, {Name: "-u", Description: "UDP connections"}, {Name: "-l", Description: "listening only"}, @@ -139,10 +139,10 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ss", Description: "socket statistics", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-t", Description: "TCP"}, {Name: "-u", Description: "UDP"}, {Name: "-l", Description: "listening"}, diff --git a/commands/sys/networkquality.go b/commands/sys/networkquality.go index 05d071d..4b1f7a1 100644 --- a/commands/sys/networkquality.go +++ b/commands/sys/networkquality.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "networkQuality", Description: "Measure the different aspects of network quality", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help for networkQuality"}, {Name: "-c", Description: "Produce computer readable output"}, {Name: "-s", Description: "Run tests sequentially instead of in parallel"}, diff --git a/commands/sys/networksetup.go b/commands/sys/networksetup.go index d2a1256..dd71b86 100644 --- a/commands/sys/networksetup.go +++ b/commands/sys/networksetup.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "networksetup", Description: "Configuration tool for network settings in macOS", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "computername", Description: "The new name for your computer on the network"}, {Name: "ip", Description: "The IP address to set for the network service"}, {Name: "subnet", Description: "The subnet mask to apply"}, @@ -49,7 +49,7 @@ func init() { {Name: "pppoeName", Description: "Optional name for the PPPoE service"}, {Name: "location", Description: "The name for the new location"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-listnetworkserviceorder", Description: "Displays a list of all the network services on the server's hardware ports"}, {Name: "-listallhardwareports", Description: "Displays ethernet (or Wi-Fi) address for hardwareport or device specified"}, {Name: "-getcomputername", Description: "Displays the computer name"}, diff --git a/commands/sys/nextflow.go b/commands/sys/nextflow.go index eebf57a..cf7716a 100644 --- a/commands/sys/nextflow.go +++ b/commands/sys/nextflow.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nextflow", Description: "Session ID", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "clean", Description: "Clean up project cache and work directories (Default: last run)"}, {Name: "clone", Description: "Clone a project into a folder"}, {Name: "config", Description: "Print a project configuration"}, @@ -27,7 +27,7 @@ func init() { {Name: "self-update", Description: "Update nextflow runtime to the latest available version"}, {Name: "view", Description: "View project script file(s)"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-after", Description: "Clean up runs executed after the specified one"}, {Name: "-before", Description: "Clean up runs executed before the specified one"}, {Name: "-but", Description: "Clean up all runs except the specified one"}, diff --git a/commands/sys/nhost.go b/commands/sys/nhost.go index f63b246..cc1e4f7 100644 --- a/commands/sys/nhost.go +++ b/commands/sys/nhost.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nhost", Description: "Nhost", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "deploy", Description: "Deploy local migrations and metadata changes to Nhost production"}, {Name: "dev", Description: "Start Nhost project for local development"}, {Name: "down", Description: "Stop and remove local Nhost backend started by `nhost dev`"}, @@ -20,7 +20,7 @@ func init() { {Name: "login", Description: "Login to your Nhost account"}, {Name: "logout", Description: "Logout from your Nhost account"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--email", Description: "Email address"}, }, }) diff --git a/commands/sys/nmap.go b/commands/sys/nmap.go index 1d7bd3c..9c93aa9 100644 --- a/commands/sys/nmap.go +++ b/commands/sys/nmap.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nmap", Description: "Network exploration tool and security / port scanner", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-iR", Description: "Choose random targets"}, {Name: "--exclude", Description: "Excluide hosts/networks"}, {Name: "--excludefile", Description: "Exclude list from file"}, diff --git a/commands/sys/nrm.go b/commands/sys/nrm.go index 128fdf8..55f3651 100644 --- a/commands/sys/nrm.go +++ b/commands/sys/nrm.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nrm", Description: "Use the right package manage - remove", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-g", Description: "Package will be removed from your `devDependencies`"}, {Name: "-P", Description: "Remove package from your `peerDependencies`"}, {Name: "-O", Description: "Remove package from your `optionalDependencies`"}, diff --git a/commands/sys/ns.go b/commands/sys/ns.go index 25f11ab..9da11a6 100644 --- a/commands/sys/ns.go +++ b/commands/sys/ns.go @@ -1,17 +1,17 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ns", Description: "Forces rebuilding the native application", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "next", Description: "The latest development release"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--clean", Description: "Forces rebuilding the native application"}, {Name: "--timeout", Description: "Specifies that you want to debug the app in an emulator"}, {Name: "--device", Description: "Specifies a connected device/emulator to start and run the app"}, diff --git a/commands/sys/nylas.go b/commands/sys/nylas.go index 0cece61..77521e4 100644 --- a/commands/sys/nylas.go +++ b/commands/sys/nylas.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nylas", Description: "A command line interface for Nylas", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "api", Description: "Access the Nylas API endpoints"}, {Name: "a", Description: "A API commands"}, {Name: "accounts", Description: "Accounts commands"}, @@ -60,7 +60,7 @@ func init() { {Name: "send-rsvp", Description: "Send-Rsvp API commands"}, {Name: "threads", Description: "Threads API commands"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--display_columns", Description: "Return All Accounts"}, {Name: "--body", Description: "Request body (or use < to redirect a JSON file)"}, {Name: "--limit", Description: "This is usage"}, diff --git a/commands/sys/oh_my_posh.go b/commands/sys/oh_my_posh.go index 3627278..55ebf47 100644 --- a/commands/sys/oh_my_posh.go +++ b/commands/sys/oh_my_posh.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "oh-my-posh", Description: "The config file to use", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Initialize oh-my-posh for your shell"}, {Name: "get", Description: "Get oh-my-posh values"}, {Name: "shell", Description: "Get the current shell, example usage: 'oh-my-posh get shell'"}, @@ -27,7 +27,7 @@ func init() { {Name: "NUM", Description: "The number of stacks"}, {Name: "version", Description: "Display the oh-my-posh version, example usage: 'oh-my-posh version'"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--config", Description: "The config file to use"}, {Name: "--format", Description: "The file format to use"}, {Name: "--print", Description: "Print the init script"}, diff --git a/commands/sys/okta.go b/commands/sys/okta.go index 0c21d0d..9e5c146 100644 --- a/commands/sys/okta.go +++ b/commands/sys/okta.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "okta", Description: "The Okta CLI is the easiest way to get started with Okta!", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "register", Description: "Sign up for a new Okta account"}, {Name: "login", Description: "Authorizes the Okta CLI tool"}, {Name: "apps", Description: "Manage Okta apps"}, @@ -21,7 +21,7 @@ func init() { {Name: "help", Description: "Displays help information about the specified command"}, {Name: "generate-completion", Description: "Generate bash/zsh completion script for Okta"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--company", Description: "Company/organization used when registering a new Okta account"}, {Name: "--email", Description: "Email used when registering a new Okta account"}, {Name: "--first-name", Description: "First name used when registering a new Okta account"}, diff --git a/commands/sys/ollama.go b/commands/sys/ollama.go index 5da8fe4..b25a488 100644 --- a/commands/sys/ollama.go +++ b/commands/sys/ollama.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ollama", Description: "A command-line tool for managing and deploying machine learning models", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "serve", Description: "Start ollama"}, {Name: "create", Description: "Create a model from a Modelfile"}, {Name: "show", Description: "Show information for a model"}, @@ -22,7 +22,7 @@ func init() { {Name: "rm", Description: "Remove a model"}, {Name: "help", Description: "Help about any command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Specify Modelfile"}, {Name: "--verbose", Description: "Enable verbose output"}, {Name: "--help", Description: "Show help for ollama"}, diff --git a/commands/sys/omz.go b/commands/sys/omz.go index 7be0cf1..39aa7e6 100644 --- a/commands/sys/omz.go +++ b/commands/sys/omz.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "omz", Description: "Oh My Zsh", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Print the help message"}, {Name: "changelog", Description: "Print the changelog"}, {Name: "plugin", Description: "Manage plugins"}, diff --git a/commands/sys/pac.go b/commands/sys/pac.go index b1c616c..a018fad 100644 --- a/commands/sys/pac.go +++ b/commands/sys/pac.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pac", Description: "7", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "admin", Description: "Work with your Power Platform Admin Account"}, {Name: "list", Description: "List all environments from your tenant"}, {Name: "create", Description: "Creates a Dataverse instance in your tenant"}, @@ -60,7 +60,7 @@ func init() { {Name: "update-settings", Description: "Update environment settings"}, {Name: "package", Description: "Commands for working with Dataverse package projects"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--environment", Description: "List all environments that contain given string in their name or ID"}, {Name: "--type", Description: "List all environments with the given type"}, {Name: "--name", Description: "List all environments that contain given string in their name"}, diff --git a/commands/sys/passwd.go b/commands/sys/passwd.go index 836c464..a4c8b03 100644 --- a/commands/sys/passwd.go +++ b/commands/sys/passwd.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "passwd", Description: "Modify a user", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Specify where the password update should be applied"}, {Name: "-l", Description: "The location of the chosen directory system"}, {Name: "-u", Description: "Specify the user name to use when authenticating to the directory node"}, diff --git a/commands/sys/pathchk.go b/commands/sys/pathchk.go index 1c2ff98..8ce38c9 100644 --- a/commands/sys/pathchk.go +++ b/commands/sys/pathchk.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pathchk", Description: "Check pathnames for POSIX portability", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Pathname(s) to check"}, }, }) diff --git a/commands/sys/pdfunite.go b/commands/sys/pdfunite.go index 08fe661..4b9c6a7 100644 --- a/commands/sys/pdfunite.go +++ b/commands/sys/pdfunite.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pdfunite", Description: "Combine multiple pdfs", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Print copyright and version info"}, {Name: "-h", Description: "Print usage information"}, }, diff --git a/commands/sys/pkg_config.go b/commands/sys/pkg_config.go index 5584a74..d72826a 100644 --- a/commands/sys/pkg_config.go +++ b/commands/sys/pkg_config.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pkg-config", Description: "Return metainformation about installed libraries", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--mod-version", Description: "Display the version information of the libraries specified on the command line"}, {Name: "--version", Description: "Display the version of pkg-config and terminates"}, {Name: "--atleast-pkgconfig-version", Description: "Require at least the given version of pkg-config"}, diff --git a/commands/sys/pmset.go b/commands/sys/pmset.go index 6ab26e3..948d02d 100644 --- a/commands/sys/pmset.go +++ b/commands/sys/pmset.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pmset", Description: "Display sleep timer (value in minutes, or 0 to disable)", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "live", Description: "Display the settings currently in use. (default if no argument given)"}, {Name: "custom", Description: "Display custom settings for all power sources"}, {Name: "cap", Description: "Display which power management features the machine supports"}, @@ -31,7 +31,7 @@ func init() { {Name: "schedule", Description: "For setting up one-time power events"}, {Name: "repeat", Description: "For setting up daily/weekly power on and power off events"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-g", Description: "GETTING"}, {Name: "-a", Description: "Settings for all"}, {Name: "-b", Description: "Settings for battery"}, diff --git a/commands/sys/pocketbase.go b/commands/sys/pocketbase.go index 562764b..9745b57 100644 --- a/commands/sys/pocketbase.go +++ b/commands/sys/pocketbase.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pocketbase", Description: "PocketBase CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Help about any command"}, {Name: "migrate", Description: "Executes DB migration scripts"}, {Name: "folder", Description: "Migrations folder"}, @@ -21,7 +21,7 @@ func init() { {Name: "string", Description: "API HTTP server address"}, {Name: "strings", Description: "CORS allowed domain origins list"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--http", Description: "API HTTP server address"}, {Name: "--https", Description: "API HTTPS server address (auto TLS via Let's Encrypt)"}, {Name: "--origins", Description: "CORS allowed domain origins list (default [*])"}, diff --git a/commands/sys/prisma.go b/commands/sys/prisma.go index 45107c6..892f3a2 100644 --- a/commands/sys/prisma.go +++ b/commands/sys/prisma.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "prisma", Description: "Display this help message", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Setup Prisma for your app"}, {Name: "generate", Description: "Generate artifacts (e.g. Prisma Client)"}, {Name: "studio", Description: "Open Prisma Studio"}, @@ -19,7 +19,7 @@ func init() { {Name: "db", Description: "Manage your database schema and lifecycle (Preview)"}, {Name: "version", Description: "Print current version of Prisma components"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display this help message"}, {Name: "--schema", Description: "Custom path to your Prisma schema"}, {Name: "--skip-seed", Description: "Skip triggering seed"}, diff --git a/commands/sys/pro.go b/commands/sys/pro.go index 7cae645..21e17cb 100644 --- a/commands/sys/pro.go +++ b/commands/sys/pro.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pro", Description: "Manage Ubuntu Pro services from Canonical", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "attach", Description: "Connect an Ubuntu Pro support contract to this machine"}, {Name: "collect-logs", Description: "Create a tarball with all relevant logs and debug data"}, {Name: "detach", Description: "Remove Ubuntu Pro from this machine"}, @@ -18,7 +18,7 @@ func init() { {Name: "refresh", Description: "Refresh contract and service details from Canonical"}, {Name: "status", Description: "Report current status of Ubuntu Pro services on system"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-auto-enable", Description: "Disable the automatic enablement of recommended entitlements"}, {Name: "--attach-config", Description: "Provide a file with configuration options"}, {Name: "-o", Description: "Path for tarball. Uses ua_logs.tar.gz in current directory if not specified"}, diff --git a/commands/sys/pry.go b/commands/sys/pry.go index c9ac21a..f2f4c32 100644 --- a/commands/sys/pry.go +++ b/commands/sys/pry.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pry", Description: "Interactive Ruby", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "A line of code to execute in context before the session starts"}, {Name: "--no-pager", Description: "Disable pager for long output"}, {Name: "--no-history", Description: "Disable history loading"}, diff --git a/commands/sys/ps.go b/commands/sys/ps.go index 88ef065..8764750 100644 --- a/commands/sys/ps.go +++ b/commands/sys/ps.go @@ -6,10 +6,10 @@ import ( "strings" "time" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) -func processGenerator(tokens []string, _ string, _ string) []core.Suggestion { +func processGenerator(tokens []string, _ string, _ string) []spec.Suggestion { ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() @@ -21,7 +21,7 @@ func processGenerator(tokens []string, _ string, _ string) []core.Suggestion { } seen := make(map[string]bool) - var results []core.Suggestion + var results []spec.Suggestion for line := range strings.SplitSeq(string(out), "\n") { line = strings.TrimSpace(line) if line == "" { @@ -40,17 +40,17 @@ func processGenerator(tokens []string, _ string, _ string) []core.Suggestion { // suggest both PID and process name if !seen[pid] { seen[pid] = true - results = append(results, core.Suggestion{Cmd: pid, Desc: name}) + results = append(results, spec.Suggestion{Cmd: pid, Desc: name}) } } return results } func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ps", Description: "report processes", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "all processes"}, {Name: "-f", Description: "full format"}, {Name: "-u", Description: "by user"}, @@ -61,11 +61,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "kill", Description: "send signal to process", Generator: processGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-9", Description: "SIGKILL (force)"}, {Name: "-15", Description: "SIGTERM (graceful)"}, {Name: "-2", Description: "SIGINT"}, @@ -74,11 +74,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "killall", Description: "kill by process name", Generator: processGenerator, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-9", Description: "SIGKILL"}, {Name: "-s", Description: "specify signal"}, {Name: "-u", Description: "only for user"}, @@ -86,20 +86,20 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pkill", Description: "kill by pattern", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-9", Description: "SIGKILL"}, {Name: "-f", Description: "match full command"}, {Name: "-u", Description: "match by user"}, }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pgrep", Description: "find process by pattern", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "list name and PID"}, {Name: "-f", Description: "match full command"}, {Name: "-u", Description: "match by user"}, diff --git a/commands/sys/publish.go b/commands/sys/publish.go index 7d1e4bc..9d87aa3 100644 --- a/commands/sys/publish.go +++ b/commands/sys/publish.go @@ -1,19 +1,19 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "publish", Description: "Set up a new website in the current folder", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "new", Description: "Set up a new website in the current folder"}, {Name: "deploy", Description: "Generate and deploy the website in the current folder"}, {Name: "generate", Description: "Generate the website in the current folder"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Customize the port"}, {Name: "--help", Description: "Show help for publish"}, }, diff --git a/commands/sys/pwd.go b/commands/sys/pwd.go index 57d412f..6903589 100644 --- a/commands/sys/pwd.go +++ b/commands/sys/pwd.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pwd", Description: "Return working directory name", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-L", Description: "Display the logical current working directory"}, {Name: "-P", Description: "Display the physical current working directory"}, }, diff --git a/commands/sys/rancher.go b/commands/sys/rancher.go index cb378d4..dbbd1cf 100644 --- a/commands/sys/rancher.go +++ b/commands/sys/rancher.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rancher", Description: "Output format:", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ls", Description: "List all apps in the current Rancher server"}, {Name: "delete", Description: "Delete an app"}, {Name: "APP_NAME/APP_ID", Description: "The name of the app to delete"}, @@ -56,7 +56,7 @@ func init() { {Name: "token", Description: "Authenticate and generate new kubeconfig token"}, {Name: "help", Description: "Shows a list of commands or help for one command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--format", Description: "Output format: 'json', 'yaml' or custom format"}, {Name: "--quiet", Description: "Only display IDs or suppress help text"}, {Name: "--help", Description: "Show help"}, diff --git a/commands/sys/repeat.go b/commands/sys/repeat.go index 52f2821..f287daf 100644 --- a/commands/sys/repeat.go +++ b/commands/sys/repeat.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "repeat", Description: "Interpret the result as a number and repeat the commands this many times", }) diff --git a/commands/sys/rscript.go b/commands/sys/rscript.go index 68d0a0e..41aa386 100644 --- a/commands/sys/rscript.go +++ b/commands/sys/rscript.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rscript", Description: "Scripting Front-End for R", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-e", Description: "R expression to run"}, {Name: "--help", Description: "Print usage and exit"}, {Name: "--version", Description: "Print version and exit"}, diff --git a/commands/sys/sam.go b/commands/sys/sam.go index f62bfcb..ffffec0 100644 --- a/commands/sys/sam.go +++ b/commands/sys/sam.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sam", Description: "Host of locally emulated Lambda container", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Init an AWS SAM application"}, {Name: "text", Description: "Template name"}, {Name: "validate", Description: "Validate an AWS SAM template"}, @@ -27,7 +27,7 @@ func init() { {Name: "pipeline", Description: "Manage the continuous delivery of the application"}, {Name: "bootstrap", Description: "Generates the required AWS resources to connect your CI/CD system"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--config-env", Description: "Host of locally emulated Lambda container"}, {Name: "--container-host-interface", Description: "Additional arguments to be passed to the debugger"}, {Name: "--debugger-path", Description: "Host path to a debugger to mount into the Lambda container"}, diff --git a/commands/sys/sanity.go b/commands/sys/sanity.go index 5bcca5a..3aef8e7 100644 --- a/commands/sys/sanity.go +++ b/commands/sys/sanity.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sanity", Description: "Displays help information about Sanity", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Displays help information about Sanity"}, {Name: "build", Description: "Builds the current Sanity configuration to a static bundle"}, {Name: "codemod", Description: "Runs a code modification script"}, @@ -48,7 +48,7 @@ func init() { {Name: "invite", Description: "Invite a new user to the project"}, {Name: "versions", Description: "Shows the installed versions of Sanity CLI and core components"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--source-maps", Description: "Enable source maps for built bundles (increases size of bundle)"}, {Name: "--no-minify", Description: "Skip minifying built JavaScript (speeds up build, increases size of bundle)"}, {Name: "-y", Description: "Use unattended mode, accepting defaults and using only flags for choices"}, diff --git a/commands/sys/screen.go b/commands/sys/screen.go index 624f551..43a58c2 100644 --- a/commands/sys/screen.go +++ b/commands/sys/screen.go @@ -1,17 +1,17 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "screen", Description: "Screen manager with VT100/ANSI terminal emulation", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "name", Description: "Name of the screen session"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Does not start screen, but detaches the elsewhere running screen session"}, {Name: "-r", Description: "Reattach a session and if necessary detach it first"}, {Name: "-R", Description: "Reattach a session and if necessary detach or even create it first"}, diff --git a/commands/sys/shell_config.go b/commands/sys/shell_config.go index dc16086..d92222b 100644 --- a/commands/sys/shell_config.go +++ b/commands/sys/shell_config.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "shell-config", Description: "Display help for command", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "install", Description: "Install MacOS setup with Multi-Selection"}, {Name: "shell", Description: "Setup a shell configuration with a robust set of tools and architecture"}, {Name: "update", Description: "Update the CLI to the latest version"}, @@ -20,7 +20,7 @@ func init() { {Name: "delete", Description: "Delete external shell"}, {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display help for command"}, {Name: "-t", Description: "Select update version"}, {Name: "-m", Description: "Daemon check for update notification. When specified is true"}, diff --git a/commands/sys/shortcuts.go b/commands/sys/shortcuts.go index 521cd93..83cf443 100644 --- a/commands/sys/shortcuts.go +++ b/commands/sys/shortcuts.go @@ -1,17 +1,17 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "shortcuts", Description: "Run a shortcut", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "help", Description: "Show help information"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "The input to provide to the shortcut"}, {Name: "-o", Description: "Where to write the shortcut output, if applicable"}, {Name: "--output-type", Description: "JavaScript Object Notation (JSON)"}, diff --git a/commands/sys/simctl.go b/commands/sys/simctl.go index f136737..05f75cf 100644 --- a/commands/sys/simctl.go +++ b/commands/sys/simctl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "simctl", Description: "Add photos, live photos, videos, or contacts to the library of a device", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "addmedia", Description: "Add photos, live photos, videos, or contacts to the library of a device"}, {Name: "boot", Description: "Boot a device or device pair"}, {Name: "clone", Description: "Clone an existing device"}, @@ -60,7 +60,7 @@ func init() { {Name: "terminate", Description: "Terminate an application by identifier on a device"}, {Name: "ui", Description: "Get or Set UI options"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--arch", Description: "Clone an existing device"}, {Name: "-b", Description: "Do NOT show the resulting archive in a Finder window upon completion"}, {Name: "-X", Description: "Specify a duration (in seconds) to wait for the log collection before timeout"}, diff --git a/commands/sys/source.go b/commands/sys/source.go index 449e67a..42041a4 100644 --- a/commands/sys/source.go +++ b/commands/sys/source.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "source", Description: "Source files in shell", }) diff --git a/commands/sys/speedtest_cli.go b/commands/sys/speedtest_cli.go index 5632967..0ae06c9 100644 --- a/commands/sys/speedtest_cli.go +++ b/commands/sys/speedtest_cli.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "speedtest-cli", Description: "Command line interface for testing internet bandwidth using speedtest.net", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show this help message and exit"}, {Name: "--no-download", Description: "Do not perform download test"}, {Name: "--no-upload", Description: "Do not perform upload test"}, diff --git a/commands/sys/spotify.go b/commands/sys/spotify.go index fb1cd0b..c80bdb8 100644 --- a/commands/sys/spotify.go +++ b/commands/sys/spotify.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "spotify", Description: "CLI to use Spotify from the terminal", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "play", Description: "Resume playback where Spotify last left off"}, {Name: "song name", Description: "The name of the song to start playing"}, {Name: "album", Description: "Find an album by name and play it"}, @@ -37,7 +37,7 @@ func init() { {Name: "shuffle", Description: "Toggle shuffle playback mode"}, {Name: "repeat", Description: "Toggle repeat playback mode"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for spotify"}, }, }) diff --git a/commands/sys/st2.go b/commands/sys/st2.go index 60688ed..90c2930 100644 --- a/commands/sys/st2.go +++ b/commands/sys/st2.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "st2", Description: "Show this help and exit", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "list", Description: "Get the list of actions"}, {Name: "get", Description: "Get individual action"}, {Name: "create", Description: "Create a new action"}, @@ -18,7 +18,7 @@ func init() { {Name: "disable", Description: "Disable an existing action"}, {Name: "execute", Description: "Invoke an action manually"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show this help and exit"}, {Name: "-t", Description: "Print output in JSON format"}, {Name: "-y", Description: "Print output in YAML format"}, diff --git a/commands/sys/stack.go b/commands/sys/stack.go index 56fe91d..9ebd2db 100644 --- a/commands/sys/stack.go +++ b/commands/sys/stack.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "stack", Description: "The Haskell Tool Stack", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build the package(s) in the current directory/configuration"}, {Name: "test", Description: "Shortcut for 'build --test'"}, {Name: "bench", Description: "Shortcut for 'build --bench'"}, @@ -25,7 +25,7 @@ func init() { {Name: "dot", Description: "Visualize your project's dependency graph using Graphviz dot"}, {Name: "repl", Description: "Load a REPL"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for stack"}, {Name: "--version", Description: "Show version for stack"}, {Name: "--numeric-version", Description: "Show only the numeric version for stack"}, diff --git a/commands/sys/starkli.go b/commands/sys/starkli.go index bd2583a..e59a43b 100644 --- a/commands/sys/starkli.go +++ b/commands/sys/starkli.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "starkli", Description: "Starkli, a ⚡ blazing ⚡ fast ⚡ CLI tool for Starknet powered by 🦀 starknet-rs 🦀", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "account", Description: "Account management commands"}, {Name: "fetch", Description: "Fetch account config from an already deployed account contract"}, {Name: "ADDRESS", Description: "Contract address"}, @@ -59,7 +59,7 @@ func init() { {Name: "transaction", Description: "Get Starknet transaction by hash"}, {Name: "transaction-receipt", Description: "Get transaction receipt by hash"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--rpc", Description: "Starknet JSON-RPC endpoint"}, {Name: "--network", Description: "Starknet network"}, {Name: "--force", Description: "Overwrite the file if it already exists"}, diff --git a/commands/sys/su.go b/commands/sys/su.go index b203866..bfb511d 100644 --- a/commands/sys/su.go +++ b/commands/sys/su.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "su", Description: "(no letter) The same as -l", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "(no letter) The same as -l"}, }, }) diff --git a/commands/sys/sudo.go b/commands/sys/sudo.go index 79e9d1e..389404f 100644 --- a/commands/sys/sudo.go +++ b/commands/sys/sudo.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sudo", Description: "Execute a command as the superuser or another user", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-g", Description: "Run command as the specified group name or ID"}, {Name: "-h", Description: "Display help message and exit"}, {Name: "-u", Description: "Run command as specified user name or ID"}, diff --git a/commands/sys/sysctl.go b/commands/sys/sysctl.go index df655c9..07d408a 100644 --- a/commands/sys/sysctl.go +++ b/commands/sys/sysctl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sysctl", Description: "Variable name", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-A", Description: "List all the currently available non-opaque values"}, {Name: "-b", Description: "Force the value of the variable(s) to be output in raw, binary format"}, {Name: "-d", Description: "Print the description of the variable instead of its value"}, diff --git a/commands/sys/systemctl.go b/commands/sys/systemctl.go index e89dcce..eb4a04c 100644 --- a/commands/sys/systemctl.go +++ b/commands/sys/systemctl.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "systemctl", Description: "Control the systemd system and service manager", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "list-units", Description: "List units currently in memory"}, {Name: "list-sockets", Description: "List socket units currently in memory ordered by address"}, {Name: "list-timers", Description: "List timer units currently in memory ordered by next elapse"}, @@ -60,7 +60,7 @@ func init() { {Name: "daemon-reload", Description: "Reload systemd manager configuration"}, {Name: "daemon-reexec", Description: "Reexecute systemd manager"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show this help"}, {Name: "--version", Description: "Show package version"}, {Name: "--system", Description: "Connect to system manager"}, diff --git a/commands/sys/tac.go b/commands/sys/tac.go index 5fe87aa..3cabd54 100644 --- a/commands/sys/tac.go +++ b/commands/sys/tac.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tac", Description: "Concatenate and print files in reverse", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display this help and exit"}, {Name: "--before", Description: "Attach the separator before instead of after"}, {Name: "--regex", Description: "Interpret the separator as a regular expression"}, diff --git a/commands/sys/tailcall.go b/commands/sys/tailcall.go index d78d954..b02b9e4 100644 --- a/commands/sys/tailcall.go +++ b/commands/sys/tailcall.go @@ -1,20 +1,20 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tailcall", Description: "TailCall CLI for managing and optimizing GraphQL configurations", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "check", Description: "Validate a composition spec"}, {Name: "start", Description: "Launch the GraphQL Server for the specific configuration"}, {Name: "init", Description: "Bootstrap a new TailCall project"}, {Name: "gen", Description: "Generate GraphQL configurations from various sources"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--n-plus-one-queries", Description: "Detect N+1 issues"}, {Name: "--schema", Description: "Display the schema of the composition spec"}, {Name: "--format", Description: "Change the format of the input file"}, diff --git a/commands/sys/tailwindcss.go b/commands/sys/tailwindcss.go index 56fb4fc..f1fcff7 100644 --- a/commands/sys/tailwindcss.go +++ b/commands/sys/tailwindcss.go @@ -1,18 +1,18 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tailwindcss", Description: "Display usage information", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "init", Description: "Creates Tailwind config file. Default: tailwind.config.js"}, {Name: "build", Description: "Build CSS file"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Display usage information"}, {Name: "-i", Description: "Specify input file"}, {Name: "-o", Description: "Specify output file"}, diff --git a/commands/sys/time.go b/commands/sys/time.go index ae33c7f..d0acf5e 100644 --- a/commands/sys/time.go +++ b/commands/sys/time.go @@ -1,11 +1,11 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "time", Description: "Time how long a command takes!", }) diff --git a/commands/sys/tldr.go b/commands/sys/tldr.go index e88ab01..155c299 100644 --- a/commands/sys/tldr.go +++ b/commands/sys/tldr.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tldr", Description: "Tldr page", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display help for command"}, {Name: "-s", Description: "Search all pages for the query"}, {Name: "--linux", Description: "Show command page for Linux"}, diff --git a/commands/sys/tmux.go b/commands/sys/tmux.go index 856a625..0204fed 100644 --- a/commands/sys/tmux.go +++ b/commands/sys/tmux.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tmux", Description: "Format output", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "a", Description: "Attach to last session"}, {Name: "working-directory", Description: "The session's working directory"}, {Name: "bind", Description: "Bind a key to a command"}, @@ -60,7 +60,7 @@ func init() { {Name: "lockc", Description: "Lock a client"}, {Name: "lock", Description: "Lock all clients attached to the server"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-F", Description: "Format output"}, {Name: "-f", Description: "Set client flags"}, {Name: "-d", Description: "Detach all others clients to the session"}, diff --git a/commands/sys/tmuxinator.go b/commands/sys/tmuxinator.go index 23d2f23..94ef754 100644 --- a/commands/sys/tmuxinator.go +++ b/commands/sys/tmuxinator.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tmuxinator", Description: "Project", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "commands", Description: "Lists commands available in tmuxinator"}, {Name: "completions", Description: "Used for shell completion"}, {Name: "copy", Description: "Copy an existing project to a new project and open it in your editor"}, @@ -33,7 +33,7 @@ func init() { {Name: "stop", Description: "Stop a tmux session using a project's tmuxinator config"}, {Name: "version", Description: "Display installed tmuxinator version"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Attach to tmux session after creation"}, {Name: "-n", Description: "Give the session a different name"}, {Name: "-p", Description: "Path to project config file"}, diff --git a/commands/sys/top.go b/commands/sys/top.go index 8495a1a..2bb42f4 100644 --- a/commands/sys/top.go +++ b/commands/sys/top.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "top", Description: "Display Linux tasks", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show library version and usage prompt"}, {Name: "-b", Description: "Starts top in Batch mode"}, {Name: "-c", Description: "Starts top with last remembered c state reversed"}, diff --git a/commands/sys/traceroute.go b/commands/sys/traceroute.go index 3803333..53e5f17 100644 --- a/commands/sys/traceroute.go +++ b/commands/sys/traceroute.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "traceroute", Description: "Print the route packets take to network host", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for traceroute"}, {Name: "-a", Description: "Turn on AS# lookups for each hop encountered"}, {Name: "-A", Description: "Turn on AS# lookups and use the given server instead of the default"}, diff --git a/commands/sys/trap.go b/commands/sys/trap.go index 3f33c41..4293a2b 100644 --- a/commands/sys/trap.go +++ b/commands/sys/trap.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "trap", Description: "Prints all defined signal handlers", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--print", Description: "Prints all defined signal handlers"}, {Name: "--help", Description: "Displays help about using this command"}, }, diff --git a/commands/sys/trex.go b/commands/sys/trex.go index d5f6921..7bfba04 100644 --- a/commands/sys/trex.go +++ b/commands/sys/trex.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "trex", Description: "trex script", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "i", Description: "Install a package"}, {Name: "delete", Description: "Delete a package"}, {Name: "upgrade", Description: "Upgrade trex"}, @@ -19,7 +19,7 @@ func init() { {Name: "exec", Description: "Execute a cli tool with out install then"}, {Name: "check", Description: "Check deno.land [std/x] dependencies updates"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Print version"}, {Name: "-m", Description: "Install package from deno.land"}, {Name: "-n", Description: "Install package from nest.land"}, diff --git a/commands/sys/tsh.go b/commands/sys/tsh.go index 43404d3..c020e18 100644 --- a/commands/sys/tsh.go +++ b/commands/sys/tsh.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tsh", Description: "Remote host login", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "version", Description: "Print the version"}, {Name: "ssh", Description: "Run shell or execute a command on a remote SSH node"}, {Name: "user@hostname", Description: "Address of remote machine to log into"}, @@ -36,7 +36,7 @@ func init() { {Name: "add", Description: "Add a new MFA device"}, {Name: "rm", Description: "Remove a MFA device"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "Remote host login"}, {Name: "--proxy", Description: "SSH proxy address"}, {Name: "--user", Description: "SSH proxy user"}, diff --git a/commands/sys/tuist.go b/commands/sys/tuist.go index d9d7ffb..a75ef6b 100644 --- a/commands/sys/tuist.go +++ b/commands/sys/tuist.go @@ -1,21 +1,21 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tuist", Description: "Build the project in the current directory", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build the project in the current directory"}, {Name: "warm", Description: "Warms the local and remote cache"}, {Name: "print-hashes", Description: "Print the hashes of the cacheable frameworks in the given project"}, {Name: "template", Description: "Name of template you want to use"}, {Name: "list", Description: "Lists available scaffold templates"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--build-output-path", Description: "Build the project to a specific device, example usage: 'tuist build --device \\"}, {Name: "--os", Description: "Build the project to a specific OS, example usage: 'tuist build --os 14.0':"}, {Name: "--path", Description: "The path to the directory that contains the project whose targets will be cached"}, diff --git a/commands/sys/twilio.go b/commands/sys/twilio.go index e268620..ece843f 100644 --- a/commands/sys/twilio.go +++ b/commands/sys/twilio.go @@ -1,18 +1,18 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "twilio", Description: "Level of logging messages", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "list", Description: "List Twilio CLI configurations"}, {Name: "set", Description: "Update Twilio CLI configurations"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-l", Description: "Level of logging messages"}, {Name: "-o", Description: "Format of command output"}, {Name: "--silent", Description: "Manage Twilio CLI configurations"}, diff --git a/commands/sys/uname.go b/commands/sys/uname.go index 168a379..bf9d1d0 100644 --- a/commands/sys/uname.go +++ b/commands/sys/uname.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "uname", Description: "Print operating system name", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Print all available system information"}, {Name: "-m", Description: "Print the machine hardware name"}, {Name: "-n", Description: "Print the system hostname"}, diff --git a/commands/sys/visudo.go b/commands/sys/visudo.go index 02fc0a7..deb74d8 100644 --- a/commands/sys/visudo.go +++ b/commands/sys/visudo.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "visudo", Description: "Checking existing sudoers file for syntax errors", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--check", Description: "Checking existing sudoers file for syntax errors"}, {Name: "--file", Description: "Set an alternative sudoers file location"}, {Name: "--help", Description: "Display a short help message"}, diff --git a/commands/sys/vultr_cli.go b/commands/sys/vultr_cli.go index e4df76b..9e47ee0 100644 --- a/commands/sys/vultr_cli.go +++ b/commands/sys/vultr_cli.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vultr-cli", Description: "Bare Metal ID", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "account", Description: "Retrieve information about your account"}, {Name: "apps", Description: "Display all available applications"}, {Name: "list", Description: "List applications"}, @@ -60,7 +60,7 @@ func init() { {Name: "script", Description: "Startup script commands"}, {Name: "snapshot", Description: "Snapshot commands"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--os", Description: "ID of the operating system that will be installed on the server"}, {Name: "--persistent_pxe", Description: "Enable persistent_pxe"}, {Name: "--plan", Description: "ID of the plan that the server will subscribe to"}, diff --git a/commands/sys/wezterm.go b/commands/sys/wezterm.go index 07572cb..3f3c3ed 100644 --- a/commands/sys/wezterm.go +++ b/commands/sys/wezterm.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wezterm", Description: "Wez", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "start", Description: "Start the GUI, optionally running an alternative program"}, {Name: "ssh", Description: "Establish an ssh session"}, {Name: "serial", Description: "Open a serial port"}, @@ -27,7 +27,7 @@ func init() { {Name: "replay", Description: "Replay an asciicast terminal session"}, {Name: "shell-completion", Description: "Generate shell completion information"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cwd", Description: "Specify the current working directory for the initially spawned program"}, {Name: "--class", Description: "Override the position for the initial window launched by this process"}, {Name: "--no-auto-connect", Description: "Print help information"}, diff --git a/commands/sys/where.go b/commands/sys/where.go index 440aa37..2a4d7fd 100644 --- a/commands/sys/where.go +++ b/commands/sys/where.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "where", Description: "For each name, indicate how it should be interpreted", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-w", Description: "For each name, print 'name: word', where 'word' is the kind of command"}, {Name: "-p", Description: "Do a path search for the name, even if it's an alias/function/builtin"}, {Name: "-m", Description: "The arguments are taken as patterns (pattern characters must be quoted)"}, diff --git a/commands/sys/whereis.go b/commands/sys/whereis.go index 07b9aa4..1eafc35 100644 --- a/commands/sys/whereis.go +++ b/commands/sys/whereis.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "whereis", Description: "Locate the binary, source, and manual page files for a command", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-b", Description: "Search only for binaries"}, {Name: "-m", Description: "Search only for manual sections"}, {Name: "-s", Description: "Search only for sources"}, diff --git a/commands/sys/which.go b/commands/sys/which.go index 703b967..9293327 100644 --- a/commands/sys/which.go +++ b/commands/sys/which.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "which", Description: "Executable file", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-s", Description: "No output, return 0 if all the executables are found, 1 if not"}, {Name: "-a", Description: "List all instances of executables found, instead of just the first"}, }, diff --git a/commands/sys/who.go b/commands/sys/who.go index ca14e7b..e9dfb7d 100644 --- a/commands/sys/who.go +++ b/commands/sys/who.go @@ -1,17 +1,17 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "who", Description: "Display who is logged in", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "am", Description: "Returns the invoker's real user name"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Same as -bdlprTtu"}, {Name: "-b", Description: "Time of last system boot"}, {Name: "-d", Description: "Print dead processes"}, diff --git a/commands/sys/wing.go b/commands/sys/wing.go index 121fa64..dea4641 100644 --- a/commands/sys/wing.go +++ b/commands/sys/wing.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wing", Description: "Runs a Wing executable in the Wing Console", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "run", Description: "Runs a Wing executable in the Wing Console"}, {Name: "executable", Description: "Executable .wx file"}, {Name: "compile", Description: "Compiles a Wing program"}, @@ -16,7 +16,7 @@ func init() { {Name: "upgrade", Description: "Upgrades the Wing toolchain to the latest version"}, {Name: "help", Description: "Display help for command"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Display help for command"}, {Name: "-o", Description: "Output directory"}, {Name: "-t", Description: "Target platform (options: 'tf-aws', 'sim')"}, diff --git a/commands/sys/wp.go b/commands/sys/wp.go index 84c4580..e672cd8 100644 --- a/commands/sys/wp.go +++ b/commands/sys/wp.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wp", Description: "Path to the WordPress files", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "cache", Description: "Adds, removes, fetches, and flushes the WP Object Cache object"}, {Name: "add", Description: "Adds a value to the object cache"}, {Name: "key", Description: "Cache key"}, @@ -60,7 +60,7 @@ func init() { {Name: "unapprove", Description: "Unapproves a comment"}, {Name: "unspam", Description: "Unmarks a comment as spam"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--path", Description: "Path to the WordPress files"}, {Name: "--url", Description: "Perform operation against a remote WordPress installation over HTTP"}, {Name: "--user", Description: "Set the WordPress user"}, diff --git a/commands/sys/wrk.go b/commands/sys/wrk.go index 742e856..7eed7ff 100644 --- a/commands/sys/wrk.go +++ b/commands/sys/wrk.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wrk", Description: "Wrk - a HTTP benchmarking tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Connections to keep open"}, {Name: "-d", Description: "Duration of test"}, {Name: "-t", Description: "Number of threads"}, diff --git a/commands/sys/wscat.go b/commands/sys/wscat.go index 05ef5ad..96ecc0b 100644 --- a/commands/sys/wscat.go +++ b/commands/sys/wscat.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wscat", Description: "Communicate over websocket", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Connect to a WebSocket server"}, {Name: "-V", Description: "Output the version number"}, {Name: "--auth", Description: "Add basic HTTP authentication header (--connect only)"}, diff --git a/commands/sys/yank.go b/commands/sys/yank.go index 83ba7dd..4c3f545 100644 --- a/commands/sys/yank.go +++ b/commands/sys/yank.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "yank", Description: "Yank terminal output to clipboard", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Ignore case differences between pattern and the input"}, {Name: "-l", Description: "Use the default delimiters except for space"}, {Name: "-x", Description: "Use alternate screen"}, diff --git a/commands/sys/ykman.go b/commands/sys/ykman.go index 5436bd6..2171820 100644 --- a/commands/sys/ykman.go +++ b/commands/sys/ykman.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "ykman", Description: "Configure your YubiKey via the command line", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "list", Description: "List connected YubiKeys"}, {Name: "config", Description: "Enable or disable applications"}, {Name: "mode", Description: "Manage connection modes (USB Interfaces)"}, @@ -60,7 +60,7 @@ func init() { {Name: "generate", Description: "Generate a self-signed X.509 certificate"}, {Name: "PUBLIC-KEY", Description: "File containing a public key. Use '-' to use stdin"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Check if YubiKey is in FIPS Approved mode (available on YubiKey 4 FIPS only)"}, {Name: "-h", Description: "Show info usage information"}, {Name: "-s", Description: "List available smart card readers"}, diff --git a/commands/sys/zapier.go b/commands/sys/zapier.go index cdbe3d2..b6ab889 100644 --- a/commands/sys/zapier.go +++ b/commands/sys/zapier.go @@ -1,14 +1,14 @@ package sys import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zapier", Description: "Change the way structured data is presented. If", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "build", Description: "Build a pushable zip from the current directory"}, {Name: "path", Description: "Relative to your current path - IE: `.` for current directory"}, {Name: "delete:integration", Description: "Delete your integration (including all versions)"}, @@ -50,7 +50,7 @@ func init() { {Name: "help", Description: "Display help for zapier"}, {Name: "command", Description: "Command to show help for"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Show extra debugging output"}, {Name: "-m", Description: "Build a pushable zip from the current directory"}, {Name: "-t", Description: "The template to start your integration with"}, diff --git a/commands/text/diff.go b/commands/text/diff.go index 70746b2..9ce52ac 100644 --- a/commands/text/diff.go +++ b/commands/text/diff.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "diff", Description: "Compare files line by line", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-i", Description: "Ignore case differences in file contents"}, {Name: "--ignore-file-name-case", Description: "Ignore case when comparing file names"}, {Name: "--no-ignore-file-name-case", Description: "Consider case when comparing file names"}, diff --git a/commands/text/dos2unix.go b/commands/text/dos2unix.go index b962834..94f1900 100644 --- a/commands/text/dos2unix.go +++ b/commands/text/dos2unix.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "dos2unix", Description: "DOS to Unix file format converter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help for dos2unix"}, {Name: "--allow-chown", Description: "Allow file ownership change in old file mode"}, {Name: "-ascii", Description: "Convert only line breaks. This is the default conversion mode"}, diff --git a/commands/text/find.go b/commands/text/find.go index 0971900..de73e54 100644 --- a/commands/text/find.go +++ b/commands/text/find.go @@ -1,15 +1,15 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "find", Description: "search for files", - Generator: core.FileGenerator("/"), - Options: []core.Option{ + Generator: spec.FileGenerator("/"), + Options: []spec.Option{ {Name: "-name", Description: "match by name"}, {Name: "-iname", Description: "match by name (case insensitive)"}, {Name: "-type", Description: "match by type (f=file, d=dir, l=link)"}, diff --git a/commands/text/grep.go b/commands/text/grep.go index 071eb27..1e33b23 100644 --- a/commands/text/grep.go +++ b/commands/text/grep.go @@ -1,15 +1,15 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "grep", Description: "search text in files", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-r", Description: "recursive"}, {Name: "-R", Description: "recursive + follow symlinks"}, {Name: "-i", Description: "ignore case"}, @@ -38,11 +38,11 @@ func init() { }) // egrep and fgrep aliases - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "egrep", Description: "grep with extended regex", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-r", Description: "recursive"}, {Name: "-i", Description: "ignore case"}, {Name: "-n", Description: "show line numbers"}, diff --git a/commands/text/iconv.go b/commands/text/iconv.go index dbed862..0b59be0 100644 --- a/commands/text/iconv.go +++ b/commands/text/iconv.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "iconv", Description: "Character set conversion", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for iconv"}, {Name: "--version", Description: "Output version information and exit"}, {Name: "-f", Description: "Specifies the encoding of the input"}, diff --git a/commands/text/jq.go b/commands/text/jq.go index 3a2b43c..f3b9abc 100644 --- a/commands/text/jq.go +++ b/commands/text/jq.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "jq", Description: "Output the jq version and exit with zero", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--version", Description: "Output the jq version and exit with zero"}, {Name: "--seq", Description: "Parse the input in streaming fashion, outputting arrays of path and leaf values"}, {Name: "--slurp", Description: "Use a tab for each indentation level instead of two spaces"}, diff --git a/commands/text/pandoc.go b/commands/text/pandoc.go index 46c7d6a..0a85084 100644 --- a/commands/text/pandoc.go +++ b/commands/text/pandoc.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "pandoc", Description: "A universal document converter", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-f", Description: "Specify input format"}, {Name: "-t", Description: "Specify output format"}, {Name: "-o", Description: "Write output to FILE instead of stdout"}, diff --git a/commands/text/rg.go b/commands/text/rg.go index 645a10d..44d49e1 100644 --- a/commands/text/rg.go +++ b/commands/text/rg.go @@ -1,15 +1,15 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rg", Description: "ripgrep (fast search)", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-i", Description: "case insensitive"}, {Name: "-s", Description: "case sensitive"}, {Name: "-n", Description: "show line numbers"}, @@ -52,11 +52,11 @@ func init() { }, }) - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "fd", Description: "fast find alternative", - Generator: core.FileGenerator("/"), - Options: []core.Option{ + Generator: spec.FileGenerator("/"), + Options: []spec.Option{ {Name: "-t", Description: "type (f/d/l/x/e/s)"}, {Name: "-e", Description: "file extension"}, {Name: "-H", Description: "include hidden"}, diff --git a/commands/text/seq.go b/commands/text/seq.go index d9fc63e..d9457ac 100644 --- a/commands/text/seq.go +++ b/commands/text/seq.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "seq", Description: "Print sequences of numbers. (Defaults to increments of 1)", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-w", Description: "Equalize the widths of all numbers by padding with zeros as necessary"}, {Name: "-s", Description: "String separator between numbers. Default is newline"}, {Name: "-f", Description: "Use a printf(3) style format to print each number"}, diff --git a/commands/text/sha1sum.go b/commands/text/sha1sum.go index b1d81ce..ab330c6 100644 --- a/commands/text/sha1sum.go +++ b/commands/text/sha1sum.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sha1sum", Description: "Print or check SHA1 (160-bit) checksums", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-b", Description: "Read in binary mode"}, {Name: "-c", Description: "Read SHA1 sums from the FILEs and check them"}, {Name: "--tag", Description: "Create a BSD-style checksum"}, diff --git a/commands/text/shasum.go b/commands/text/shasum.go index 08a55b0..2fdb375 100644 --- a/commands/text/shasum.go +++ b/commands/text/shasum.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "shasum", Description: "Print or Check SHA Checksums", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Select SHA algorithm"}, {Name: "-b", Description: "Read in binary mode"}, {Name: "-c", Description: "Read SHA sums from the FILEs and check them"}, diff --git a/commands/text/shred.go b/commands/text/shred.go index 76b9c5d..7cd135c 100644 --- a/commands/text/shred.go +++ b/commands/text/shred.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "shred", Description: "Overwrite a file to hide its contents, and optionally delete it", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--force", Description: "Change permissions to allow writing if necessary"}, {Name: "--iterations", Description: "Overwrite N times instead of the default (3)"}, {Name: "--random-source", Description: "Get random bytes from FILE"}, diff --git a/commands/text/split.go b/commands/text/split.go index fc7d63d..0aee68e 100644 --- a/commands/text/split.go +++ b/commands/text/split.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "split", Description: "Use suffix_length letters to form the suffix of the file name", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Use suffix_length letters to form the suffix of the file name"}, {Name: "-b", Description: "N[K|k|M|m|G|g]"}, {Name: "-d", Description: "Use a numeric suffix instead of a alphabetic suffix"}, diff --git a/commands/text/textproc.go b/commands/text/textproc.go index 8e288ce..2f2aad6 100644 --- a/commands/text/textproc.go +++ b/commands/text/textproc.go @@ -1,16 +1,16 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { // awk - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "awk", Description: "pattern-directed scanning", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-F", Description: "field separator"}, {Name: "-v", Description: "assign variable"}, {Name: "-f", Description: "read program from file"}, @@ -21,11 +21,11 @@ func init() { }) // gawk is also common - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "gawk", Description: "GNU awk", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-F", Description: "field separator"}, {Name: "-v", Description: "assign variable"}, {Name: "-f", Description: "read program from file"}, @@ -36,11 +36,11 @@ func init() { }) // sed - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sed", Description: "stream editor", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-e", Description: "add expression"}, {Name: "-f", Description: "read script from file"}, {Name: "-i", Description: "in-place edit"}, @@ -53,10 +53,10 @@ func init() { }) // xargs - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xargs", Description: "build and run commands from stdin", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-I", Description: "replace string (e.g. -I{})"}, {Name: "-n", Description: "max args per command"}, {Name: "-P", Description: "parallel jobs"}, @@ -70,10 +70,10 @@ func init() { }) // tr - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tr", Description: "translate or delete characters", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "delete characters"}, {Name: "-s", Description: "squeeze repeated chars"}, {Name: "-c", Description: "complement set"}, @@ -81,11 +81,11 @@ func init() { }) // sort - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "sort", Description: "sort lines of text", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-n", Description: "numeric sort"}, {Name: "-r", Description: "reverse sort"}, {Name: "-k", Description: "sort by key field"}, @@ -100,11 +100,11 @@ func init() { }) // uniq - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "uniq", Description: "filter adjacent duplicate lines", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-c", Description: "prefix count"}, {Name: "-d", Description: "only duplicates"}, {Name: "-u", Description: "only unique"}, @@ -115,11 +115,11 @@ func init() { }) // cut - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cut", Description: "extract columns from lines", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-d", Description: "delimiter"}, {Name: "-f", Description: "field numbers (e.g. 1,3 or 1-3)"}, {Name: "-c", Description: "character positions"}, @@ -128,11 +128,11 @@ func init() { }) // tee - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tee", Description: "read stdin, write to stdout and files", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-a", Description: "append to files"}, {Name: "-i", Description: "ignore interrupts"}, }, diff --git a/commands/text/truncate.go b/commands/text/truncate.go index 8aca7f1..f330900 100644 --- a/commands/text/truncate.go +++ b/commands/text/truncate.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "truncate", Description: "Shrink or extend the size of a file to the specified size", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--no-create", Description: "Do not create any files"}, {Name: "--io-blocks", Description: "Treat SIZE as number of IO blocks instead of bytes"}, {Name: "--reference", Description: "Base size on RFILE"}, diff --git a/commands/text/typos.go b/commands/text/typos.go index b2d143c..53e8c77 100644 --- a/commands/text/typos.go +++ b/commands/text/typos.go @@ -1,14 +1,14 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "typos", Description: "Source code spelling correction", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-c", Description: "Custom config file"}, {Name: "--isolated", Description: "Ignore implicit configuration files"}, {Name: "--diff", Description: "Print a diff of what would change"}, diff --git a/commands/text/unix2dos.go b/commands/text/unix2dos.go index 8df4872..1e2670c 100644 --- a/commands/text/unix2dos.go +++ b/commands/text/unix2dos.go @@ -1,11 +1,11 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "unix2dos", Description: "Unix to DOS text file format convertor", }) diff --git a/commands/text/vale.go b/commands/text/vale.go index c485279..b145df8 100644 --- a/commands/text/vale.go +++ b/commands/text/vale.go @@ -1,19 +1,19 @@ package text import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vale", Description: "A syntax-aware linter for prose built with speed and extensibility in mind", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "ls-config", Description: "Print the current configuration to stdout"}, {Name: "ls-metrics", Description: "Print the given file's internal metrics to stdout"}, {Name: "file", Description: "The path to a file you want to analyze"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--help", Description: "Show help for vale"}, {Name: "--version", Description: "Print the current version"}, {Name: "--ignore-syntax", Description: "Lint all files line-by-line"}, diff --git a/commands/view/bat.go b/commands/view/bat.go index e8c406e..8b73388 100644 --- a/commands/view/bat.go +++ b/commands/view/bat.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "bat", Description: "A cat(1) clone with syntax highlighting and Git integration", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-A", Description: "Show non-printable characters"}, {Name: "-p", Description: "Show plain style, no decorations"}, {Name: "-l", Description: "Explicitly set the language for syntax highlighting"}, diff --git a/commands/view/cat.go b/commands/view/cat.go index 90d57ac..e288039 100644 --- a/commands/view/cat.go +++ b/commands/view/cat.go @@ -1,15 +1,15 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cat", Description: "concatenate and print", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-n", Description: "number lines"}, {Name: "-b", Description: "number non-blank"}, }, diff --git a/commands/view/code.go b/commands/view/code.go index 6b84cb8..9392bef 100644 --- a/commands/view/code.go +++ b/commands/view/code.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "code", Description: "Read from stdin (e.g.", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Compare two files with each other"}, {Name: "-m", Description: "Add folder(s) to the last active window"}, {Name: "-g", Description: "Open a file at the path on the specified line and character position"}, diff --git a/commands/view/cot.go b/commands/view/cot.go index a77e206..d205a12 100644 --- a/commands/view/cot.go +++ b/commands/view/cot.go @@ -1,11 +1,11 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "cot", Description: "Command-line utility for CotEditor", }) diff --git a/commands/view/du.go b/commands/view/du.go index 5335a72..c479033 100644 --- a/commands/view/du.go +++ b/commands/view/du.go @@ -1,15 +1,15 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "du", Description: "estimate file space usage", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-h", Description: "human readable"}, {Name: "-s", Description: "summarize"}, {Name: "-a", Description: "all files"}, diff --git a/commands/view/emacs.go b/commands/view/emacs.go index 1f89b03..c356984 100644 --- a/commands/view/emacs.go +++ b/commands/view/emacs.go @@ -1,11 +1,11 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "emacs", Description: "An extensible, customizable, free/libre text editor - and more", }) diff --git a/commands/view/file.go b/commands/view/file.go index 0aafc88..f9606e0 100644 --- a/commands/view/file.go +++ b/commands/view/file.go @@ -1,13 +1,13 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "file", Description: "determine file type", - Generator: core.FileGenerator(), + Generator: spec.FileGenerator(), }) } diff --git a/commands/view/glow.go b/commands/view/glow.go index d8f8098..4c85820 100644 --- a/commands/view/glow.go +++ b/commands/view/glow.go @@ -1,19 +1,19 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "glow", Description: "Render markdown on the CLI, with pizzazz!", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "config", Description: "Edit the glow config file"}, {Name: "help", Description: "Help about any command"}, {Name: "stash", Description: "Manage your stash of markdown files"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-a", Description: "Show system files and directories (TUI-mode only)"}, {Name: "--config", Description: "Config file"}, {Name: "-h", Description: "Help for glow"}, diff --git a/commands/view/head.go b/commands/view/head.go index 7dadb32..5c6c9ff 100644 --- a/commands/view/head.go +++ b/commands/view/head.go @@ -1,15 +1,15 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "head", Description: "output first lines of file", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-n", Description: "number of lines"}, }, }) diff --git a/commands/view/idea.go b/commands/view/idea.go index e7911f7..6b6ce46 100644 --- a/commands/view/idea.go +++ b/commands/view/idea.go @@ -1,20 +1,20 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "idea", Description: "IntelliJ IDEA CLI", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "diff", Description: "Open the diff viewer to see the differences between two specified files"}, {Name: "merge", Description: "Open the Merge dialog to merge the specified files"}, {Name: "format", Description: "Apply code style formatting to the specified files"}, {Name: "inspect", Description: "Perform code inspection on the specified project"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help for format command"}, {Name: "-m", Description: "Process specified directories recursively"}, {Name: "-s", Description: "Specify the code style settings file to use for formatting"}, diff --git a/commands/view/less.go b/commands/view/less.go index 9a7ffb4..94b57d5 100644 --- a/commands/view/less.go +++ b/commands/view/less.go @@ -1,13 +1,13 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "less", Description: "view file contents (scrollable)", - Generator: core.FileGenerator(), + Generator: spec.FileGenerator(), }) } diff --git a/commands/view/lvim.go b/commands/view/lvim.go index 7ba64df..7872ecd 100644 --- a/commands/view/lvim.go +++ b/commands/view/lvim.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "lvim", Description: "Hyperextensible Vim-based text editor", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cmd", Description: "Execute <cmd> before any config"}, {Name: "-c", Description: "Execute <cmd> after config and first file"}, {Name: "-b", Description: "Binary mode"}, diff --git a/commands/view/micro.go b/commands/view/micro.go index 6589d59..fd9bd2e 100644 --- a/commands/view/micro.go +++ b/commands/view/micro.go @@ -1,21 +1,21 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "micro", Description: "True/false", - Subcommands: []core.Subcommand{ + Subcommands: []spec.Subcommand{ {Name: "remove", Description: "Remove plugin(s)"}, {Name: "update", Description: "Update plugin(s) (if no argument is given, updates all plugins)"}, {Name: "search", Description: "Search for a plugin"}, {Name: "list", Description: "List installed plugins"}, {Name: "available", Description: "List available plugins"}, }, - Options: []core.Option{ + Options: []spec.Option{ {Name: "--plugin", Description: "Manage plugins"}, {Name: "--clean", Description: "Cleans the configuration directory"}, {Name: "--config-dir", Description: "Specify a custom location for the configuration directory"}, diff --git a/commands/view/more.go b/commands/view/more.go index c6c46b1..96519e3 100644 --- a/commands/view/more.go +++ b/commands/view/more.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "more", Description: "Opposite of less", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-d", Description: "Do not pause after any line containing a ^L (form feed)"}, {Name: "-f", Description: "Count logical lines, rather than screen lines"}, {Name: "-p", Description: "Instead, clear the whole screen and then display the text"}, diff --git a/commands/view/nano.go b/commands/view/nano.go index 4fcaaba..c3ffe51 100644 --- a/commands/view/nano.go +++ b/commands/view/nano.go @@ -1,11 +1,11 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nano", Description: "Nano", }) diff --git a/commands/view/nvim.go b/commands/view/nvim.go index cc9df59..3f47496 100644 --- a/commands/view/nvim.go +++ b/commands/view/nvim.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "nvim", Description: "Hyperextensible Vim-based text editor", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--cmd", Description: "Execute <cmd> before any config"}, {Name: "-c", Description: "Execute <cmd> after config and first file"}, {Name: "-b", Description: "Binary mode"}, diff --git a/commands/view/rich.go b/commands/view/rich.go index 5100aa4..e580253 100644 --- a/commands/view/rich.go +++ b/commands/view/rich.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "rich", Description: "Defined by terminal, appearance may differ", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-p", Description: "Print console markup. See https://rich.readthedocs.io/en/latest/markup.html"}, {Name: "-u", Description: "Display a horizontal rule"}, {Name: "-j", Description: "Display as JSON"}, diff --git a/commands/view/stat.go b/commands/view/stat.go index 7de36e1..38e390a 100644 --- a/commands/view/stat.go +++ b/commands/view/stat.go @@ -1,13 +1,13 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "stat", Description: "display file status", - Generator: core.FileGenerator(), + Generator: spec.FileGenerator(), }) } diff --git a/commands/view/subl.go b/commands/view/subl.go index 3f961a2..4a6e5a8 100644 --- a/commands/view/subl.go +++ b/commands/view/subl.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "subl", Description: "Sublime Text", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--project", Description: "Load the given project"}, {Name: "--command", Description: "Run the given command"}, {Name: "-n", Description: "Open a new window"}, diff --git a/commands/view/tail.go b/commands/view/tail.go index 34a63f9..2a563ab 100644 --- a/commands/view/tail.go +++ b/commands/view/tail.go @@ -1,15 +1,15 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "tail", Description: "output last lines of file", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-n", Description: "number of lines"}, {Name: "-f", Description: "follow (live updates)"}, }, diff --git a/commands/view/vi.go b/commands/view/vi.go index 4fb9585..0083900 100644 --- a/commands/view/vi.go +++ b/commands/view/vi.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vi", Description: "Print help message for vi and exit", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Print help message for vi and exit"}, }, }) diff --git a/commands/view/vim.go b/commands/view/vim.go index 1e52b1f..c982241 100644 --- a/commands/view/vim.go +++ b/commands/view/vim.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vim", Description: "Vi IMproved, a programmer", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-v", Description: "Vi mode (like 'vi')"}, {Name: "-e", Description: "Ex mode (like 'ex')"}, {Name: "-E", Description: "Improved Ex mode"}, diff --git a/commands/view/vimr.go b/commands/view/vimr.go index 33eabe1..323a8a5 100644 --- a/commands/view/vimr.go +++ b/commands/view/vimr.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "vimr", Description: "VimR - Neovim GUI for macOS in Swift", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Show help"}, {Name: "--dry-run", Description: "Just print the 'open' command"}, {Name: "--cwd", Description: "Set the working directory"}, diff --git a/commands/view/wc.go b/commands/view/wc.go index c8ca2f9..db92adf 100644 --- a/commands/view/wc.go +++ b/commands/view/wc.go @@ -1,15 +1,15 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "wc", Description: "word, line, character count", - Generator: core.FileGenerator(), - Options: []core.Option{ + Generator: spec.FileGenerator(), + Options: []spec.Option{ {Name: "-l", Description: "count lines"}, {Name: "-w", Description: "count words"}, {Name: "-c", Description: "count bytes"}, diff --git a/commands/view/xed.go b/commands/view/xed.go index b3ae438..a619bd5 100644 --- a/commands/view/xed.go +++ b/commands/view/xed.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xed", Description: "Xcode text editor invocation tool", - Options: []core.Option{ + Options: []spec.Option{ {Name: "--launch", Description: "Launches Xcode, opening a new empty unsaved file"}, {Name: "--create", Description: "Selects the given line in the last file opened"}, {Name: "--background", Description: "Opens Xcode without activating it; the process that invoked xed remains in front"}, diff --git a/commands/view/xxd.go b/commands/view/xxd.go index 3208ef4..4d8842c 100644 --- a/commands/view/xxd.go +++ b/commands/view/xxd.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "xxd", Description: "Make a hexdump or do the reverse", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-help", Description: "Show help for xxd"}, {Name: "-autoskip", Description: "Toggle autoskip: A single '*' replaces nul-lines. Default off"}, {Name: "-bits", Description: "Switch to bits (binary digits) dump, rather than hexdump"}, diff --git a/commands/view/zed.go b/commands/view/zed.go index 5936cdc..c9f022b 100644 --- a/commands/view/zed.go +++ b/commands/view/zed.go @@ -1,14 +1,14 @@ package view import ( - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func init() { - core.Register(&core.Spec{ + spec.Register(&spec.Spec{ Name: "zed", Description: "A lightning-fast, collaborative code editor written in Rust", - Options: []core.Option{ + Options: []spec.Option{ {Name: "-h", Description: "Print help information"}, {Name: "-v", Description: "Print Zed's version and the app path"}, {Name: "-w", Description: "Wait for all of the given paths to be closed before exiting"}, diff --git a/integration/overlay.go b/integration/overlay.go index 8d31268..2725a24 100644 --- a/integration/overlay.go +++ b/integration/overlay.go @@ -9,7 +9,7 @@ import ( "unicode/utf8" "github.com/charmbracelet/lipgloss" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" "github.com/versenilvis/iris/config" "github.com/versenilvis/iris/logger" "golang.org/x/term" @@ -161,7 +161,7 @@ func SetTheme(t Theme) { type Overlay struct { mu sync.Mutex Visible bool - Items []core.Suggestion + Items []spec.Suggestion Cursor int StartIdx int LastGhostLen int @@ -183,7 +183,7 @@ func NewOverlay() *Overlay { return &Overlay{Visible: false, Cursor: 0, StartIdx: 0} } -func (o *Overlay) UpdateItems(items []core.Suggestion) { +func (o *Overlay) UpdateItems(items []spec.Suggestion) { o.mu.Lock() defer o.mu.Unlock() o.Items = items @@ -247,7 +247,7 @@ func (o *Overlay) ResetCursor() { o.Cursor = 0 } -func (o *Overlay) SetQueryAndItems(query string, items []core.Suggestion) { +func (o *Overlay) SetQueryAndItems(query string, items []spec.Suggestion) { o.mu.Lock() defer o.mu.Unlock() o.TypedQuery = query @@ -291,7 +291,7 @@ func (o *Overlay) MoveCursor(dir string) (moved bool, selectedCmd string) { return true, o.Items[o.Cursor].Cmd } -func (o *Overlay) SetHistoryList(items []core.Suggestion, startAtBottom bool) string { +func (o *Overlay) SetHistoryList(items []spec.Suggestion, startAtBottom bool) string { o.mu.Lock() defer o.mu.Unlock() o.TypedQuery = "" diff --git a/root/suggestions.go b/root/suggestions.go index 0b89594..e0ed899 100644 --- a/root/suggestions.go +++ b/root/suggestions.go @@ -3,33 +3,33 @@ package root import ( "strings" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" "github.com/versenilvis/iris/config" "github.com/versenilvis/iris/integration" "github.com/versenilvis/iris/logger" ) // MergeResults collects and dedupes suggestions for a query and mode -func MergeResults(query string, mode string) []core.Suggestion { +func MergeResults(query string, mode string) []spec.Suggestion { maxSugg := config.Get().UI.MaxSuggestions seen := make(map[string]bool) - deduped := []core.Suggestion{} + deduped := []spec.Suggestion{} // always call lookup to scan aliases and get spec suggestions logger.Debugf("Merge Calling Lookup for '%s'", query) - cmdResults := core.Lookup(query) + cmdResults := spec.Lookup(query) // search history if in history mode var histResults []integration.HistResult if mode == "history" { - aliases := core.GetAliasesCopy() + aliases := spec.GetAliasesCopy() histResults, _ = integration.SearchHistory(query, aliases) } normalizedQuery := strings.TrimSpace(query) // add suggestion helper to deduplicate - addSuggestion := func(s core.Suggestion) { + addSuggestion := func(s spec.Suggestion) { normalizedCmd := strings.TrimSpace(s.Cmd) if normalizedCmd == "" { return @@ -47,7 +47,7 @@ func MergeResults(query string, mode string) []core.Suggestion { if mode == "history" { // history mode: history first, then spec/alias for _, h := range histResults { - addSuggestion(core.Suggestion{ + addSuggestion(spec.Suggestion{ Cmd: h.Cmd, Desc: "history", Icon: "history", diff --git a/root/wrapper.go b/root/wrapper.go index f692ac0..51d3665 100644 --- a/root/wrapper.go +++ b/root/wrapper.go @@ -17,7 +17,7 @@ import ( "time" "github.com/creack/pty" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" "github.com/versenilvis/iris/config" "github.com/versenilvis/iris/integration" "github.com/versenilvis/iris/integration/shell" @@ -118,7 +118,7 @@ func runWrapper() { defer func() { _ = ptmx.Close() }() _ = pty.InheritSize(os.Stdin, ptmx) - core.ShellPID = c.Process.Pid + spec.ShellPID = c.Process.Pid logger.Infof("PTY child shell started: shell=%s, path=%s, pid=%d", shellName, adapter.GetShellPath(), c.Process.Pid) @@ -216,9 +216,9 @@ func runWrapper() { pendingUpdate = startBackgroundUpdateCheck() updatePrinted := false - shellPGID, err := unix.Getpgid(core.ShellPID) + shellPGID, err := unix.Getpgid(spec.ShellPID) if err != nil { - shellPGID = core.ShellPID + shellPGID = spec.ShellPID } var isCommandActive atomic.Bool isExecuting := func() bool { @@ -561,7 +561,7 @@ func runWrapper() { results := MergeResults("", currentMode) if len(results) > 0 { limit := min(len(results), 100) - var historyList []core.Suggestion + var historyList []spec.Suggestion if inputSlice[i+2] == 'A' { for j := limit - 1; j >= 0; j-- { @@ -888,7 +888,7 @@ func runWrapper() { var target string var ok bool if isSpaceAlias { - target, ok = core.GetAlias(naiveBuffer) + target, ok = spec.GetAlias(naiveBuffer) } bufferMu.Unlock() diff --git a/scripts/cmds_docs.go b/scripts/cmds_docs.go index f38dccd..9802e97 100644 --- a/scripts/cmds_docs.go +++ b/scripts/cmds_docs.go @@ -109,7 +109,7 @@ func main() { continue } - blocks := strings.Split(string(content), "core.Register(") + blocks := strings.Split(string(content), "spec.Register(") for i := 1; i < len(blocks); i++ { block := blocks[i] nameMatch := nameRe.FindStringSubmatch(block) @@ -171,8 +171,8 @@ func main() { var sb strings.Builder sb.WriteString("# Iris commands\n\n") - sb.WriteString("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.\n\n") - sb.WriteString("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.\n\n") + sb.WriteString("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.\n\n") + sb.WriteString("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.\n\n") sb.WriteString("## Overview\n\n") fmt.Fprintf(&sb, "Currently, Iris natively supports **%d** top-level CLI commands across **%d** categories:\n\n", totalCommands, len(sections)) diff --git a/commands/core/filegen.go b/spec/filegen.go similarity index 99% rename from commands/core/filegen.go rename to spec/filegen.go index e232eef..7805f0c 100644 --- a/commands/core/filegen.go +++ b/spec/filegen.go @@ -1,4 +1,4 @@ -package core +package spec import ( "fmt" diff --git a/commands/core/lookup.go b/spec/lookup.go similarity index 99% rename from commands/core/lookup.go rename to spec/lookup.go index 52d045b..1ca260f 100644 --- a/commands/core/lookup.go +++ b/spec/lookup.go @@ -1,4 +1,4 @@ -package core +package spec import ( "maps" diff --git a/commands/core/spec.go b/spec/spec.go similarity index 98% rename from commands/core/spec.go rename to spec/spec.go index c81fa8b..4f85db9 100644 --- a/commands/core/spec.go +++ b/spec/spec.go @@ -1,4 +1,4 @@ -package core +package spec type GeneratorFunc func(tokens []string, prefix string, partial string) []Suggestion diff --git a/commands/core/system.go b/spec/system.go similarity index 98% rename from commands/core/system.go rename to spec/system.go index b7e67de..785fc03 100644 --- a/commands/core/system.go +++ b/spec/system.go @@ -1,4 +1,4 @@ -package core +package spec import ( "os" diff --git a/commands/core/utils.go b/spec/utils.go similarity index 98% rename from commands/core/utils.go rename to spec/utils.go index 30556b9..03ee9bb 100644 --- a/commands/core/utils.go +++ b/spec/utils.go @@ -1,4 +1,4 @@ -package core +package spec import ( "strings" diff --git a/tests/dev/git_test.go b/tests/dev/git_test.go index c6f199d..f85fb87 100644 --- a/tests/dev/git_test.go +++ b/tests/dev/git_test.go @@ -9,7 +9,7 @@ import ( "testing" _ "github.com/versenilvis/iris/commands" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) // setupGitRepo creates a real git repo in a temp dir with: @@ -100,14 +100,14 @@ func TestGitSuggestions(t *testing.T) { defer cleanup() t.Run("git top-level", func(t *testing.T) { - res := core.Lookup("git ") + res := spec.Lookup("git ") if len(res) < 10 { t.Errorf("expected many git subcommands, got %d", len(res)) } }) t.Run("tag -d shows tags", func(t *testing.T) { - res := core.Lookup("git tag -d ") + res := spec.Lookup("git tag -d ") found := false for _, r := range res { if strings.Contains(r.Cmd, "v1.0") { @@ -120,7 +120,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("push HEAD options", func(t *testing.T) { - res := core.Lookup("git push origin HEAD --") + res := spec.Lookup("git push origin HEAD --") found := false for _, r := range res { if strings.Contains(r.Cmd, "--force") { @@ -133,7 +133,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("push -u origin suggests branches", func(t *testing.T) { - res := core.Lookup("git push -u origin ") + res := spec.Lookup("git push -u origin ") found := false for _, r := range res { if strings.Contains(r.Cmd, "dev") { @@ -152,7 +152,7 @@ func TestGitSuggestions(t *testing.T) { t.Skip("can't determine HEAD branch") } activeBranch := strings.TrimSpace(string(out)) - res := core.Lookup("git push origin ") + res := spec.Lookup("git push origin ") found := false for _, r := range res { parts := strings.Fields(r.Cmd) @@ -173,7 +173,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("push origin no duplicate branches", func(t *testing.T) { - res := core.Lookup("git push origin ") + res := spec.Lookup("git push origin ") seen := make(map[string]int) for _, r := range res { parts := strings.Fields(r.Cmd) @@ -189,7 +189,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("branch with slash is suggested correctly", func(t *testing.T) { - res := core.Lookup("git checkout ") + res := spec.Lookup("git checkout ") found := false for _, r := range res { if strings.Contains(r.Cmd, "feature/login") { @@ -202,7 +202,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("remote branches suggested for push", func(t *testing.T) { - res := core.Lookup("git push origin ") + res := spec.Lookup("git push origin ") var cmdStr strings.Builder for _, r := range res { cmdStr.WriteString(r.Cmd) @@ -223,7 +223,7 @@ func TestGitSuggestions(t *testing.T) { } activeBranch := strings.TrimSpace(string(out)) - res := core.Lookup("git checkout ") + res := spec.Lookup("git checkout ") for _, r := range res { // the suggestion should not contain the active branch as a standalone word parts := strings.FieldsSeq(r.Cmd) @@ -236,7 +236,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("checkout -b no suggest", func(t *testing.T) { - res := core.Lookup("git checkout -b ") + res := spec.Lookup("git checkout -b ") for _, r := range res { if strings.Contains(r.Cmd, "dev") { t.Error("git checkout -b should not suggest existing branches") @@ -245,7 +245,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("switch -c no suggest", func(t *testing.T) { - res := core.Lookup("git switch -c ") + res := spec.Lookup("git switch -c ") for _, r := range res { if strings.Contains(r.Cmd, "dev") { t.Error("git switch -c should not suggest existing branches") @@ -255,7 +255,7 @@ func TestGitSuggestions(t *testing.T) { t.Run("stash variants suggest entries", func(t *testing.T) { for _, cmd := range []string{"apply", "drop", "pop"} { - res := core.Lookup("git stash " + cmd + " ") + res := spec.Lookup("git stash " + cmd + " ") found := false for _, r := range res { if strings.Contains(r.Cmd, "stash@{0}") { @@ -270,7 +270,7 @@ func TestGitSuggestions(t *testing.T) { t.Run("remote subcommands suggest remotes", func(t *testing.T) { for _, cmd := range []string{"remove", "rename", "set-url"} { - res := core.Lookup("git remote " + cmd + " ") + res := spec.Lookup("git remote " + cmd + " ") found := false for _, r := range res { // origin is our fake remote @@ -288,12 +288,12 @@ func TestGitSuggestions(t *testing.T) { emptyDir := t.TempDir() _ = os.Chdir(emptyDir) defer func() { _ = os.Chdir(tmp) }() - _ = core.Lookup("git status ") + _ = spec.Lookup("git status ") }) t.Run("reset options", func(t *testing.T) { - _ = core.Lookup("git reset --soft origin/main ") - res := core.Lookup("git reset HEAD ") + _ = spec.Lookup("git reset --soft origin/main ") + res := spec.Lookup("git reset HEAD ") found := false for _, r := range res { if strings.Contains(r.Cmd, "file.go") { @@ -306,7 +306,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("show suggests tags and commits", func(t *testing.T) { - res := core.Lookup("git show ") + res := spec.Lookup("git show ") foundTag := false foundCommit := false for _, r := range res { @@ -331,7 +331,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("cherry-pick suggests commits", func(t *testing.T) { - res := core.Lookup("git cherry-pick ") + res := spec.Lookup("git cherry-pick ") if len(res) == 0 { t.Error("git cherry-pick should suggest commits") } @@ -349,7 +349,7 @@ func TestGitSuggestions(t *testing.T) { }) t.Run("revert suggests commits", func(t *testing.T) { - res := core.Lookup("git revert ") + res := spec.Lookup("git revert ") if len(res) == 0 { t.Error("git revert should suggest commits") } @@ -363,7 +363,7 @@ func TestGitSuggestions(t *testing.T) { } activeBranch := strings.TrimSpace(string(out)) - res := core.Lookup("git -c core.pager=cat checkout ") + res := spec.Lookup("git -c core.pager=cat checkout ") for _, r := range res { parts := strings.FieldsSeq(r.Cmd) for p := range parts { diff --git a/tests/dev/npm_ssh_test.go b/tests/dev/npm_ssh_test.go index b07979d..5d15e01 100644 --- a/tests/dev/npm_ssh_test.go +++ b/tests/dev/npm_ssh_test.go @@ -8,7 +8,7 @@ import ( "testing" _ "github.com/versenilvis/iris/commands" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" "github.com/versenilvis/iris/commands/js" ) @@ -33,7 +33,7 @@ func TestNpmScriptGenerator(t *testing.T) { defer os.Remove(filepath.Join(tmp, "package.json")) // ensure CWD is tmp - core.ShellPID = 0 + spec.ShellPID = 0 _ = os.Chdir(tmp) results := js.NpmScriptGenerator(nil, "", "") @@ -154,7 +154,7 @@ Host !forbidden wildcard-test } // sshHostGeneratorFromPath is a helper that reads a specific ssh config path -func sshHostGeneratorFromPath(configPath string) []core.Suggestion { +func sshHostGeneratorFromPath(configPath string) []spec.Suggestion { import_bufio := func() { // using bufio in the same style as ssh.go } @@ -167,7 +167,7 @@ func sshHostGeneratorFromPath(configPath string) []core.Suggestion { defer func() { _ = f.Close() }() seen := make(map[string]bool) - var results []core.Suggestion + var results []spec.Suggestion scanner := strings.NewReader("") _ = scanner @@ -187,7 +187,7 @@ func sshHostGeneratorFromPath(configPath string) []core.Suggestion { continue } seen[host] = true - results = append(results, core.Suggestion{Cmd: host, Desc: "ssh host"}) + results = append(results, spec.Suggestion{Cmd: host, Desc: "ssh host"}) } } return results diff --git a/tests/integration_test.go b/tests/integration_test.go index 10abeda..465c06b 100644 --- a/tests/integration_test.go +++ b/tests/integration_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" _ "github.com/versenilvis/iris/commands" ) @@ -35,7 +35,7 @@ func TestIntegration_ZoxideMultiWord(t *testing.T) { t.Run("z matches multi-word folder without quotes", func(t *testing.T) { // Simulating user typing "z My Awe" input := "z My Awe" - results := core.Lookup(input) + results := spec.Lookup(input) found := false for _, r := range results { diff --git a/tests/core/filegen_test.go b/tests/spec/filegen_test.go similarity index 91% rename from tests/core/filegen_test.go rename to tests/spec/filegen_test.go index 6ff2087..698a7d9 100644 --- a/tests/core/filegen_test.go +++ b/tests/spec/filegen_test.go @@ -6,7 +6,7 @@ import ( "strings" "testing" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func TestFileGenerator(t *testing.T) { @@ -24,7 +24,7 @@ func TestFileGenerator(t *testing.T) { t.Run("dirOnly shows only dirs", func(t *testing.T) { - gen := core.FileGenerator("/") + gen := spec.FileGenerator("/") results := gen([]string{"cd", ""}, "cd ", "") for _, r := range results { if !strings.HasSuffix(r.Cmd, "/") { @@ -35,7 +35,7 @@ func TestFileGenerator(t *testing.T) { t.Run("Filter extension", func(t *testing.T) { - gen := core.FileGenerator(".go") + gen := spec.FileGenerator(".go") results := gen([]string{"ls", ""}, "ls ", "") foundMain := false for _, r := range results { @@ -53,7 +53,7 @@ func TestFileGenerator(t *testing.T) { t.Run("Nested path", func(t *testing.T) { - gen := core.FileGenerator() + gen := spec.FileGenerator() results := gen([]string{"ls", "src/u"}, "ls src/u", "src/u") foundUtils := false for _, r := range results { @@ -68,7 +68,7 @@ func TestFileGenerator(t *testing.T) { t.Run("Deep scan 1 level", func(t *testing.T) { - gen := core.FileGenerator() + gen := spec.FileGenerator() results := gen([]string{"ls", "src/"}, "ls src/", "src/") foundUtils := false for _, r := range results { @@ -85,7 +85,7 @@ func TestFileGenerator(t *testing.T) { t.Run("Hidden files are skipped", func(t *testing.T) { - gen := core.FileGenerator() + gen := spec.FileGenerator() results := gen([]string{"ls", ""}, "ls ", "") for _, r := range results { if strings.HasPrefix(r.Cmd, ".") { diff --git a/tests/core/lookup_test.go b/tests/spec/lookup_test.go similarity index 70% rename from tests/core/lookup_test.go rename to tests/spec/lookup_test.go index 5506f7c..c1cf16e 100644 --- a/tests/core/lookup_test.go +++ b/tests/spec/lookup_test.go @@ -5,23 +5,23 @@ import ( "sync" "testing" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func TestLookup(t *testing.T) { // Setup Registry - core.Registry = make(map[string]*core.Spec) - core.Register(&core.Spec{ + spec.Registry = make(map[string]*spec.Spec) + spec.Register(&spec.Spec{ Name: "git", - Subcommands: []core.Subcommand{ - {Name: "commit", Options: []core.Option{{Name: "--message"}}, MaxArgs: 1}, - {Name: "remote", Subcommands: []core.Subcommand{{Name: "add"}}}, + Subcommands: []spec.Subcommand{ + {Name: "commit", Options: []spec.Option{{Name: "--message"}}, MaxArgs: 1}, + {Name: "remote", Subcommands: []spec.Subcommand{{Name: "add"}}}, }, - Options: []core.Option{{Name: "--verbose"}}, + Options: []spec.Option{{Name: "--verbose"}}, }) // Setup Aliases - core.ShellAliases = map[string]string{ + spec.ShellAliases = map[string]string{ "gca": "git commit -a", "ta": "tmux a -t", } @@ -44,7 +44,7 @@ func TestLookup(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - results := core.Lookup(tt.input) + results := spec.Lookup(tt.input) if len(results) < tt.minResults { t.Errorf("Lookup(%q) got %d results; want at least %d", tt.input, len(results), tt.minResults) } @@ -65,15 +65,15 @@ func TestLookup(t *testing.T) { } func TestLookupConcurrent(t *testing.T) { - core.Registry = make(map[string]*core.Spec) - core.Register(&core.Spec{ + spec.Registry = make(map[string]*spec.Spec) + spec.Register(&spec.Spec{ Name: "git", - Subcommands: []core.Subcommand{ - {Name: "commit", Options: []core.Option{{Name: "--message"}}, MaxArgs: 1}, + Subcommands: []spec.Subcommand{ + {Name: "commit", Options: []spec.Option{{Name: "--message"}}, MaxArgs: 1}, }, }) - core.ShellAliases = map[string]string{ + spec.ShellAliases = map[string]string{ "gca": "git commit -a", } @@ -86,8 +86,8 @@ func TestLookupConcurrent(t *testing.T) { go func() { defer wg.Done() for range iterations { - _ = core.Lookup("gca") - _ = core.Lookup("git ") + _ = spec.Lookup("gca") + _ = spec.Lookup("git ") } }() } diff --git a/tests/core/utils_test.go b/tests/spec/utils_test.go similarity index 90% rename from tests/core/utils_test.go rename to tests/spec/utils_test.go index 98e0def..9e25f3a 100644 --- a/tests/core/utils_test.go +++ b/tests/spec/utils_test.go @@ -4,7 +4,7 @@ import ( "reflect" "testing" - "github.com/versenilvis/iris/commands/core" + "github.com/versenilvis/iris/spec" ) func TestTokenize(t *testing.T) { @@ -24,7 +24,7 @@ func TestTokenize(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - got := core.Tokenize(tt.input) + got := spec.Tokenize(tt.input) if !reflect.DeepEqual(got, tt.expected) { t.Errorf("Tokenize(%q) = %v; want %v", tt.input, got, tt.expected) } @@ -47,7 +47,7 @@ func TestHasPrefix(t *testing.T) { for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - if got := core.HasPrefix(tt.s, tt.prefix); got != tt.want { + if got := spec.HasPrefix(tt.s, tt.prefix); got != tt.want { t.Errorf("HasPrefix(%q, %q) = %v; want %v", tt.s, tt.prefix, got, tt.want) } })