Skip to content

Commit

Permalink
Merge pull request #1339 from oclif/mdonnalley/customize-readme
Browse files Browse the repository at this point in the history
fix: pass in custom command for readme generation
  • Loading branch information
iowillhoit committed Mar 21, 2024
2 parents 8bdeb88 + a3c539a commit 282d629
Show file tree
Hide file tree
Showing 12 changed files with 147 additions and 128 deletions.
1 change: 1 addition & 0 deletions .github/workflows/create-github-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,4 @@ jobs:
# However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty
# This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.)
skip-on-empty: ${{ github.event_name == 'push' }}
readme-multi: true
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
- [🚀 Getting Started Tutorial](#-getting-started-tutorial)
- [📌 Requirements](#-requirements)
- [📌 Migrating from V1](#-migrating-from-v1)
- [Breaking Changes](#breaking-changes)
- [New Commands](#new-commands)
- [🏗 Usage](#-usage)
- [📚 Examples](#-examples)
- [🔨 Commands](#-commands)
Expand Down Expand Up @@ -100,12 +98,12 @@ hello world! (./src/commands/hello/world.ts)

# Command Topics

- [`oclif generate`](docs/generate.md) - generate a new CLI
- [`oclif generate`](docs/generate.md) - Generate a new CLI
- [`oclif help`](docs/help.md) - Display help for oclif.
- [`oclif manifest`](docs/manifest.md) - generates plugin manifest json
- [`oclif manifest`](docs/manifest.md) - Generates plugin manifest json (oclif.manifest.json).
- [`oclif pack`](docs/pack.md) - package an oclif CLI into installable artifacts
- [`oclif promote`](docs/promote.md) - promote CLI builds to a S3 release channel
- [`oclif readme`](docs/readme.md) - adds commands to README.md in current directory
- [`oclif promote`](docs/promote.md) - Promote CLI builds to a S3 release channel.
- [`oclif readme`](docs/readme.md) - Adds commands to README.md in current directory.
- [`oclif upload`](docs/upload.md) - upload installable CLI artifacts to AWS S3

<!-- commandsstop -->
Expand Down
76 changes: 57 additions & 19 deletions docs/generate.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,105 @@
# `oclif generate`

generate a new CLI
This will clone the template repo 'oclif/hello-world' and update package properties
Generate a new CLI

- [`oclif generate NAME`](#oclif-generate-name)
- [`oclif generate command NAME`](#oclif-generate-command-name)
- [`oclif generate hook NAME`](#oclif-generate-hook-name)

## `oclif generate NAME`

generate a new CLI
Generate a new CLI

```
USAGE
$ oclif generate NAME
$ oclif generate NAME [--author <value>] [--bin <value>] [--description <value>] [--license <value>]
[--module-type CommonJS|ESM] [--name <value>] [--owner <value>] [--package-manager npm|yarn] [--repository <value>]
[-d <value>] [-y]
ARGUMENTS
NAME directory name of new project
NAME Directory name of new project.
FLAGS
-d, --output-dir=<value> Directory to build the CLI in.
-y, --yes Use defaults for all prompts. Individual flags will override defaults.
--author=<value> Supply answer for prompt: Author
--bin=<value> Supply answer for prompt: Command bin name the CLI will export
--description=<value> Supply answer for prompt: Description
--license=<value> Supply answer for prompt: License
--module-type=<option> Supply answer for prompt: Select a module type
<options: CommonJS|ESM>
--name=<value> Supply answer for prompt: NPM package name
--owner=<value> Supply answer for prompt: Who is the GitHub owner of repository
(https://github.com/OWNER/repo)
--package-manager=<option> Supply answer for prompt: Select a package manager
<options: npm|yarn>
--repository=<value> Supply answer for prompt: What is the GitHub name of repository
(https://github.com/owner/REPO)
DESCRIPTION
generate a new CLI
This will clone the template repo 'oclif/hello-world' and update package properties
Generate a new CLI
This will clone the template repo and update package properties. For CommonJS, the 'oclif/hello-world' template will
be used and for ESM, the 'oclif/hello-world-esm' template will be used.
EXAMPLES
Generate a new CLI with prompts for all properties
$ oclif generate my-cli
Automatically accept default values for all prompts
$ oclif generate my-cli --yes
Supply answers for specific prompts
$ oclif generate my-cli --module-type CommonJS --author "John Doe"
Supply answers for specific prompts and accept default values for the rest
$ oclif generate my-cli --module-type CommonJS --author "John Doe" --yes
```

_See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/generate.ts)_
_See code: [src/commands/generate.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/generate.ts)_

## `oclif generate command NAME`

add a command to an existing CLI or plugin
Add a command to an existing CLI or plugin.

```
USAGE
$ oclif generate command NAME [--force]
$ oclif generate command NAME [--commands-dir <value>] [--force]
ARGUMENTS
NAME name of command
FLAGS
--force overwrite existing files
--commands-dir=<value> [default: src/commands] The directory to create the command in.
--force Overwrite existing files.
DESCRIPTION
add a command to an existing CLI or plugin
Add a command to an existing CLI or plugin.
```

_See code: [src/commands/generate/command.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/generate/command.ts)_
_See code: [src/commands/generate/command.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/generate/command.ts)_

## `oclif generate hook NAME`

add a hook to an existing CLI or plugin
Add a hook to an existing CLI or plugin.

```
USAGE
$ oclif generate hook NAME [--event <value>] [--force]
ARGUMENTS
NAME name of hook (snake_case)
NAME Name of hook (snake_case).
FLAGS
--event=<value> [default: init] event to run hook on
--force overwrite existing files
--event=<value> [default: init] Event to run hook on.
--force Overwrite existing files.
DESCRIPTION
add a hook to an existing CLI or plugin
Add a hook to an existing CLI or plugin.
```

_See code: [src/commands/generate/hook.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/generate/hook.ts)_
_See code: [src/commands/generate/hook.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/generate/hook.ts)_
10 changes: 5 additions & 5 deletions docs/help.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,18 @@

Display help for oclif.

- [`oclif help [COMMANDS]`](#oclif-help-commands)
- [`oclif help [COMMAND]`](#oclif-help-command)

## `oclif help [COMMANDS]`
## `oclif help [COMMAND]`

Display help for oclif.

```
USAGE
$ oclif help [COMMANDS] [-n]
$ oclif help [COMMAND...] [-n]
ARGUMENTS
COMMANDS Command to show help for.
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
Expand All @@ -22,4 +22,4 @@ DESCRIPTION
Display help for oclif.
```

_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.0.14/src/commands/help.ts)_
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/6.0.18/src/commands/help.ts)_
12 changes: 6 additions & 6 deletions docs/manifest.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
# `oclif manifest`

generates plugin manifest json
Generates plugin manifest json (oclif.manifest.json).

- [`oclif manifest [PATH]`](#oclif-manifest-path)

## `oclif manifest [PATH]`

generates plugin manifest json
Generates plugin manifest json (oclif.manifest.json).

```
USAGE
$ oclif manifest [PATH] [--jit]
ARGUMENTS
PATH [default: .] path to plugin
PATH [default: .] Path to plugin.
FLAGS
--[no-]jit append commands from JIT plugins in manifest
--[no-]jit Append commands from JIT plugins in manifest.
DESCRIPTION
generates plugin manifest json
Generates plugin manifest json (oclif.manifest.json).
```

_See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/manifest.ts)_
_See code: [src/commands/manifest.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/manifest.ts)_
52 changes: 26 additions & 26 deletions docs/pack.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,68 +30,68 @@ FLAG DESCRIPTIONS
For more details see the `-Zcompress-type` section at https://man7.org/linux/man-pages/man1/dpkg-deb.1.html
```

_See code: [src/commands/pack/deb.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/pack/deb.ts)_
_See code: [src/commands/pack/deb.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/pack/deb.ts)_

## `oclif pack macos`

pack CLI into macOS .pkg
Pack CLI into macOS .pkg

```
USAGE
$ oclif pack macos -r <value> [-t <value>] [--targets <value>]
FLAGS
-r, --root=<value> (required) [default: .] path to oclif CLI root
-t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
--targets=<value> comma-separated targets to pack (e.g.: darwin-x64,darwin-arm64)
-r, --root=<value> (required) [default: .] Path to oclif CLI root.
-t, --tarball=<value> Optionally specify a path to a tarball already generated by NPM.
--targets=<value> Comma-separated targets to pack (e.g.: darwin-x64,darwin-arm64).
DESCRIPTION
pack CLI into macOS .pkg
Pack CLI into macOS .pkg
```

_See code: [src/commands/pack/macos.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/pack/macos.ts)_
_See code: [src/commands/pack/macos.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/pack/macos.ts)_

## `oclif pack tarballs`

packages oclif CLI into tarballs
Package oclif CLI into tarballs.

```
USAGE
$ oclif pack tarballs -r <value> [--parallel] [-l <value>] [-t <value>] [--xz]
FLAGS
-l, --tarball=<value> optionally specify a path to a tarball already generated by NPM
-r, --root=<value> (required) [default: .] path to oclif CLI root
-t, --targets=<value> comma-separated targets to pack (e.g.: linux-arm,win32-x64)
--parallel build tarballs in parallel
--[no-]xz also build xz
-l, --tarball=<value> Optionally specify a path to a tarball already generated by NPM.
-r, --root=<value> (required) [default: .] Path to oclif CLI root.
-t, --targets=<value> Comma-separated targets to pack (e.g.: linux-arm,win32-x64).
--parallel Build tarballs in parallel.
--[no-]xz Also build xz.
DESCRIPTION
packages oclif CLI into tarballs
Package oclif CLI into tarballs.
This can be used to create oclif CLIs that use the system node or that come preloaded with a node binary.
```

_See code: [src/commands/pack/tarballs.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/pack/tarballs.ts)_
_See code: [src/commands/pack/tarballs.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/pack/tarballs.ts)_

## `oclif pack win`

create windows installer from oclif CLI
Create windows installer from oclif CLI

```
USAGE
$ oclif pack win -r <value> [--defender-exclusion checked|unchecked|hidden] [-t <value>] [--targets <value>]
FLAGS
-r, --root=<value> (required) [default: .] path to oclif CLI root
-t, --tarball=<value> optionally specify a path to a tarball already generated by NPM
--defender-exclusion=<option> [default: checked] set to "checked" or "unchecked" to set the default value for the
checkbox. Set to "hidden" to hide the option (will let defender do its thing)
-r, --root=<value> (required) [default: .] Path to oclif CLI root.
-t, --tarball=<value> Optionally specify a path to a tarball already generated by NPM.
--defender-exclusion=<option> [default: checked] Set to "checked" or "unchecked" to set the default value for the
checkbox. Set to "hidden" to hide the option (will let defender do its thing).
<options: checked|unchecked|hidden>
--targets=<value> comma-separated targets to pack (e.g.: win32-x64,win32-x86)
--targets=<value> Comma-separated targets to pack (e.g.: win32-x64,win32-x86).
DESCRIPTION
create windows installer from oclif CLI
Create windows installer from oclif CLI
This command will produce unsigned installers unless you supply WINDOWS_SIGNING_PASS (prefixed with the name of your
executable, e.g. OCLIF_WINDOWS_SIGNING_PASS) in the environment and have set the windows.name and windows.keypath
Expand All @@ -100,10 +100,10 @@ DESCRIPTION
FLAG DESCRIPTIONS
--defender-exclusion=checked|unchecked|hidden
set to "checked" or "unchecked" to set the default value for the checkbox. Set to "hidden" to hide the option (will
let defender do its thing)
Set to "checked" or "unchecked" to set the default value for the checkbox. Set to "hidden" to hide the option (will
let defender do its thing).
there is no way to set a hidden checkbox with "true" as a default...the user can always allow full security
There is no way to set a hidden checkbox with "true" as a default...the user can always allow full security
```

_See code: [src/commands/pack/win.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/pack/win.ts)_
_See code: [src/commands/pack/win.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/pack/win.ts)_
30 changes: 15 additions & 15 deletions docs/promote.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# `oclif promote`

promote CLI builds to a S3 release channel
Promote CLI builds to a S3 release channel.

- [`oclif promote`](#oclif-promote)

## `oclif promote`

promote CLI builds to a S3 release channel
Promote CLI builds to a S3 release channel.

```
USAGE
$ oclif promote --channel <value> -r <value> --sha <value> --version <value> [-d] [--indexes] [-m] [-a
<value>] [-t <value>] [-w] [--xz]
FLAGS
-a, --max-age=<value> [default: 86400] cache control max-age in seconds
-d, --deb promote debian artifacts
-m, --macos promote macOS pkg
-r, --root=<value> (required) [default: .] path to the oclif CLI project root
-t, --targets=<value> comma-separated targets to promote (e.g.: linux-arm,win32-x64)
-w, --win promote Windows exe
--channel=<value> (required) [default: stable] which channel to promote to
--indexes append the promoted urls into the index files
--sha=<value> (required) 7-digit short git commit SHA of the CLI to promote
--version=<value> (required) semantic version of the CLI to promote
--[no-]xz also upload xz
-a, --max-age=<value> [default: 86400] Cache control max-age in seconds.
-d, --deb Promote debian artifacts.
-m, --macos Promote macOS pkg.
-r, --root=<value> (required) [default: .] Path to the oclif CLI project root.
-t, --targets=<value> Comma-separated targets to promote (e.g.: linux-arm,win32-x64).
-w, --win Promote Windows exe.
--channel=<value> (required) [default: stable] Channel to promote to.
--indexes Append the promoted urls into the index files.
--sha=<value> (required) 7-digit short git commit SHA of the CLI to promote.
--version=<value> (required) Semantic version of the CLI to promote.
--[no-]xz Also upload xz.
DESCRIPTION
promote CLI builds to a S3 release channel
Promote CLI builds to a S3 release channel.
```

_See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/v4.5.2/src/commands/promote.ts)_
_See code: [src/commands/promote.ts](https://github.com/oclif/oclif/blob/4.6.1-dev.1/src/commands/promote.ts)_

0 comments on commit 282d629

Please sign in to comment.