Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

@gunshi/plugin-global

Latest version: v1.0.0-rc.13

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: kazupon
479 Stars
28 Forks
15 Versions
19.3K Downloads
TypeScript Repo language

Scan summary

@gunshi/plugin-global was last scanned on 23 Nov 2026 at version 1.0.0-rc.13. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 15 versions; the latest 3 were published within 7 days (17–23 Nov 2026).
  • Findings: No rules fired in version 1.0.0-rc.13.
  • Downloads: 19,262 downloads.

Versions

15 versions published
Versions and the rules that fired in each
VersionPublishedStatus
1.0.0-rc.13 LATEST 23 Nov 2026 No rules fired
1.0.0-rc.11 19 Nov 2026 No rules fired
1.0.0-rc.10 17 Nov 2026 No rules fired
1.0.0-rc.8 15 Nov 2026 Not shown
1.0.0-rc.7 13 Nov 2026 Not shown

No rules fired in 1.0.0-rc.13

Findings

Findings for v1.0.0-rc.13. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 1.0.0-rc.13; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

@gunshi/plugin-global

Version

global options plugin for gunshi.

This plugin provides standard global options (--help and --version) for all commands in your CLI application. It's installed by default in gunshi, ensuring consistent behavior across all CLI applications.

💿 Installation

# npm
npm install --save @gunshi/plugin-global

# pnpm
pnpm add @gunshi/plugin-global

# yarn
yarn add @gunshi/plugin-global

# deno
deno add jsr:@gunshi/plugin-global

# bun
bun add @gunshi/plugin-global

🚀 Usage

import global from '@gunshi/plugin-global'
import { cli } from 'gunshi'

const command = {
  name: 'my-command',
  args: {
    target: {
      type: 'string',
      description: 'Target to process'
    }
  },
  run: ctx => {
    console.log(`Processing ${ctx.values.target}`)
  }
}

await cli(process.argv.slice(2), command, {
  name: 'my-cli',
  version: '1.0.0',
  plugins: [
    global() // Adds --help and --version options
  ]
})

[!TIP] This plugin is installed in gunshi by default. You don't need to explicitly add it unless you've disabled default plugins.

✨ Features

Global Options

This plugin automatically adds the following options to all commands:

  • --help, -h: Display the command usage and available options
  • --version, -v: Display the application version
Automatic Behavior

When these options are used:

  • With --help: The command execution is bypassed, and the usage information is displayed instead
  • With --version: The command execution is bypassed, and only the version number is printed

🧩 Context Extensions

When using the global options plugin, your command context is extended via ctx.extensions['g:global'].

[!IMPORTANT] This plugin extension is namespaced in CommandContext.extensions using this plugin ID g:global by the gunshi plugin system.

Available extensions:

[!NOTE] The Awaitable<T> type used in the method signatures below is equivalent to T | Promise<T>, meaning the methods can return either a value directly or a Promise that resolves to that value.

  • showVersion(): string: Display the application version. Returns 'unknown' if no version is specified in the CLI configuration.

  • showHeader(): Awaitable<string | undefined>: Display the application header. Returns undefined if no renderHeader function is provided in the CLI configuration.

  • showUsage(): Awaitable<string | undefined>: Display the command usage information. This is automatically called when --help is used. Returns undefined if no renderUsage function is provided.

  • showValidationErrors(error: AggregateError): Awaitable<string | undefined>: Display validation errors when argument validation fails. Returns undefined if renderValidationErrors is null.

Usage Example
import global, { pluginId as globalId } from '@gunshi/plugin-global'
import { cli } from 'gunshi'

const command = {
  name: 'deploy',
  run: async ctx => {
    // Access global extensions
    const { showVersion, showHeader } = ctx.extensions[globalId]

    // Manually show version if needed
    console.log(`Deploying with CLI version: ${showVersion()}`)

    // Show custom header
    const header = await showHeader()
    if (header) {
      console.log(header)
    }

    // Your command logic here...
  }
}

await cli(process.argv.slice(2), command, {
  name: 'deploy-cli',
  version: '2.1.0',
  plugins: [global()],

  // Optional: Custom header renderer
  renderHeader: async () => {
    return `
╔══════════════════════╗
║   Deploy CLI v2.1.0  ║
╚══════════════════════╝
`
  }
})

📚 API References

See the API References

©️ License

MIT

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm @gunshi/plugin-global

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Copy of Template Design OX Blog (2)
Research

NGINX2Root: Five Critical NGINX Flaws Expose Web Servers to Remote Code Execution

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Vulnerability Insights

The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?

Frame 2085668439 (1)
Group 1261154229