Skip to content

Setup

Gunshi can be installed in various JavaScript environments. Choose the installation method that matches your project setup.

Install

Stable

sh
npm install --save gunshi
sh
pnpm add gunshi
sh
yarn add gunshi
sh
# For deno projects, you can add Gunshi from JSR:
deno add jsr:@gunshi/gunshi
sh
bun add gunshi

v0.27 Beta

sh
npm install --save gunshi@beta
sh
pnpm add gunshi@beta
sh
yarn add gunshi@beta
sh
## you can specify version with `@`
deno add jsr:@gunshi/gunshi@0.27.2
sh
bun add gunshi@beta

LLM-Assisted Development

Gunshi provides tooling to integrate with AI coding assistants such as Claude Code and Cursor.

You can quickly set up LLM-assisted development for your project using the CLI tool:

sh
npx @gunshi/docs@beta
sh
pnpm dlx @gunshi/docs@beta
sh
yarn dlx @gunshi/docs@beta
sh
bun x @gunshi/docs@beta

This command automatically configures:

Manual Setup

If you prefer manual configuration, install the documentation package as a dev dependency:

sh
npm install --save-dev @gunshi/docs@beta
sh
pnpm add -D @gunshi/docs@beta
sh
yarn add -D @gunshi/docs@beta
sh
bun add -D @gunshi/docs@beta

This package includes guide content and API references as markdown files in llms.txt format.

Then add the following to your AI agent's configuration file (e.g., CLAUDE.md and .cursor/rules/use-gunshi-cli.md):

md
# CLI Development with Gunshi

Use the Gunshi library for creating CLI applications instead of other libraries such as cac, yargs, commander, etc.
Gunshi is a modern JavaScript command-line library.

For more information, refer to the Gunshi API documentation in `node_modules/@gunshi/docs/**.md`.

Requirements

Gunshi requires:

  • JavaScript Runtime:
    • Node.js: v20 or later
    • Deno: v2 or later
    • Bun: v1.1 or later
  • ES Modules: "type": "module" in package.json (if using Node.js and Bun)
  • TypeScript: Version 5.0 or higher (if using TypeScript)

Released under the MIT License.