Seed CLISeed CLI

create-seedcli

Scaffold a new Seed CLI project with bun create.

create-seedcli is a standalone scaffolding package that works with bun create for instant project setup.

Usage

bun create seedcli my-cli

This is equivalent to running seed new my-cli but doesn't require the @seedcli/cli package to be installed globally.

Interactive Mode

When run without a name, it prompts for one:

bun create seedcli

You'll be prompted for:

  1. Project name — Directory name and package name (kebab-cased)
  2. Template — Full (recommended), Minimal, or Plugin
  3. Description — Package description

Flags

FlagDescription
--yes, -ySkip all prompts, use defaults
--no-installSkip dependency installation
--no-gitSkip git initialization

Templates

The recommended template with example commands, extensions, and testing:

my-cli/
├── src/
│   ├── commands/
│   │   └── hello.ts          # Example command with args & flags
│   ├── extensions/
│   │   └── timer.ts          # Example extension
│   └── index.ts              # Entry point (auto-discovers commands/ & extensions/)
├── tests/
│   └── hello.test.ts
├── biome.json
├── bunfig.toml
├── package.json
├── seed.config.ts             # CLI configuration
└── tsconfig.json

A bare-bones single-file CLI:

my-cli/
├── src/
│   └── index.ts              # Entry point with inline command
├── tests/
│   └── index.test.ts
├── biome.json
├── bunfig.toml
├── package.json
└── tsconfig.json

A reusable plugin package for npm distribution:

my-plugin/
├── src/
│   ├── commands/
│   │   └── hello.ts          # Example command
│   ├── extensions/
│   │   └── example.ts        # Example extension
│   ├── types.d.ts            # Module augmentation for SeedExtensions
│   └── index.ts              # definePlugin() export
├── tests/
│   └── plugin.test.ts        # Uses createTestCli()
├── biome.json
├── bunfig.toml
├── package.json              # No bin field, has peerDependencies & publishConfig
├── tsconfig.json
└── tsconfig.build.json       # For publishing compiled dist/

Template Comparison

AspectFullMinimalPlugin
PurposeProduction CLIQuick scriptsReusable npm package
EntryAuto-discovers commands/ & extensions/Inline commanddefinePlugin() export
Example commandhello with args & flagshello (simple)hello
Extensionstimer exampleNoneexample extension
Configseed.config.tsNoneNone
bin fieldYesYesNo
TestsBun.spawn()Bun.spawn()createTestCli()
Buildseed buildseed buildtscdist/

Examples

# Quick start with defaults (Full template)
bun create seedcli my-cli --yes

# Minimal template, no prompts
bun create seedcli my-cli --yes  # then select Minimal

# Skip dependency installation
bun create seedcli my-cli --no-install

# Skip git initialization
bun create seedcli my-cli --no-git

After Scaffolding

For Full / Minimal templates:

cd my-cli
bun run dev                    # Start with watch mode
bun run src/index.ts --help    # Run directly
bun link                       # Use as global command

For Plugin template:

cd my-plugin
bun test                       # Run tests

# Use in a CLI:
# import plugin from "my-plugin"
# build("my-cli").plugin(plugin).create()

On this page