GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - andreas-timm/cli-ts: Helpers for building Bun and TypeScript CLIs on top of cac

BranchesTags
Open more actions menu

Latest commit

 

History

9 Commits
9 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
scripts
scripts
 
 
skills/bun-cli
skills/bun-cli
 
 
src
src
 
 
test
test
 
 
.editorconfig
.editorconfig
 
 
.gitignore
.gitignore
 
 
.releaserc.json
.releaserc.json
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
biome.jsonc
biome.jsonc
 
 
eslint.config.mjs
eslint.config.mjs
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
pnpm-workspace.yaml
pnpm-workspace.yaml
 
 
prettier.config.mjs
prettier.config.mjs
 
 
tsconfig.build.json
tsconfig.build.json
 
 
tsconfig.json
tsconfig.json
 
 

Repository files navigation

@andreas-timm/cli

Helpers for building Bun and TypeScript CLIs on top of cac.

Features

  • Register commands and aliases with a small typed wrapper around cac.
  • Normalize multi-word commands, help, -h, and --help flows.
  • Add declarative options with defaults, required flags, choices, and validation.
  • Generate zsh completion, including option value choices and path inference.
  • Install app CLIs into ~/.local/bin with a reusable command helper.

Install

npm install @andreas-timm/cli

Usage

import { cac } from "cac";
import {
    installDefaultCommandHelp,
    installSubcommandHelp,
    registerCommands,
    run,
} from "@andreas-timm/cli";

const cli = cac("example");

registerCommands(cli, ["build", "b"], "Build the project", (command) => {
    command.option("--watch", "Watch files");
    command.action(async (options) => {
        console.log("build", options);
    });
});

installDefaultCommandHelp(cli);
installSubcommandHelp(cli);

await run(cli);

For the full CLI patterns, option rules, completion behavior, and install-command guidance, see skills/bun-cli/SKILL.md.

Releases are automated with semantic-release; see the Releasing section in CONTRIBUTING.md.

Agent skill bun-cli

The package ships a Cursor/Agent skill named bun-cli so assistants can follow consistent patterns for cac, command registration, help, completion, and related CLI work.

  • In this repo: skills/bun-cli/SKILL.md
  • After installation: node_modules/@andreas-timm/cli/skills/bun-cli/ (same SKILL.md and assets)

To expose the installed skill under a project-local skills directory (paths vary with monorepo layout; point the symlink at node_modules/@andreas-timm/cli/skills/bun-cli):

mkdir -p .agents/skills
ln -s ../../node_modules/@andreas-timm/cli/skills/bun-cli .agents/skills/bun-cli

About

Helpers for building Bun and TypeScript CLIs on top of cac

Topics

buncacclicompletiontypescriptzsh

Resources

Readme
BSD-3-Clause license

Contributing

Contributing
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.