Skip to content

Commit c9b1e9c

Browse files
docs(cli): add ASPM help examples (#738)
## What Adds `Examples:` help blocks to the seven ASPM CLI command files called out in #734: `scan`/`rescan`, `findings`, `ai-review`, `exceptions`, `campaigns`, `posture`, and `ingest`. ## Why Closes #734. The ASPM commands already expose useful flags, but their `--help` output did not show concrete usage examples. These examples make the command surface easier to discover without changing runtime behavior. ## Screenshots / Recording N/A — non-UI change. ## Testing ```sh pnpm validate pnpm test:unit pnpm test:int pnpm build ``` I also verified the rendered CLI help output for: ```sh pnpm --silent dev:cli aspm scan --help pnpm --silent dev:cli aspm rescan --help pnpm --silent dev:cli aspm findings --help pnpm --silent dev:cli aspm ai-review --help pnpm --silent dev:cli aspm exceptions --help pnpm --silent dev:cli aspm campaigns --help pnpm --silent dev:cli aspm posture --help pnpm --silent dev:cli aspm ingest --help ``` Each command now shows an `Examples:` block. ## Checklist - [x] `pnpm lint` passes - [x] `pnpm typecheck` passes - [x] `pnpm test:unit` and `pnpm test:int` pass - [x] `pnpm build` succeeds - [x] No `application/` or `presentation/` file imports anything from `infrastructure/` - [x] Commit messages follow Conventional Commits Co-authored-by: Shep Bot <shep-agent@users.noreply.github.com>
1 parent 358ae42 commit c9b1e9c

7 files changed

Lines changed: 55 additions & 4 deletions

File tree

src/presentation/cli/commands/aspm/aspm-ai-review-command.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,14 @@ interface AiReviewGraduateOpts {
4242
}
4343

4444
export function createAspmAiReviewCommand(): Command {
45-
const cmd = new Command('ai-review').description('Triage AI-change risk signals');
45+
const cmd = new Command('ai-review').description('Triage AI-change risk signals').addHelpText(
46+
'after',
47+
`
48+
Examples:
49+
$ shep aspm ai-review list --app api --state Open --limit 50 Review open AI-change signals
50+
$ shep aspm ai-review dismiss signal_123 --actor alice --justification "false positive" Dismiss a signal
51+
$ shep aspm ai-review graduate signal_123 --owner team-security --json Create a finding from a signal`
52+
);
4653

4754
cmd
4855
.command('list')

src/presentation/cli/commands/aspm/aspm-campaigns-command.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,15 @@ interface CampaignsProgressOpts {
5454
}
5555

5656
export function createAspmCampaignsCommand(): Command {
57-
const cmd = new Command('campaigns').description('Manage ASPM remediation campaigns');
57+
const cmd = new Command('campaigns').description('Manage ASPM remediation campaigns').addHelpText(
58+
'after',
59+
`
60+
Examples:
61+
$ shep aspm campaigns list --status Active --owner team-security List active campaigns by owner
62+
$ shep aspm campaigns create --name "Critical fixes" --description "Patch exposed secrets" --severity Critical,High --due 2026-07-01 --actor alice
63+
$ shep aspm campaigns close campaign_123 --status Completed --actor alice --note "all findings resolved"
64+
$ shep aspm campaigns progress campaign_123 --json Export progress metrics`
65+
);
5866

5967
cmd
6068
.command('list')

src/presentation/cli/commands/aspm/aspm-exceptions-command.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,13 @@ interface ListExpiringOpts {
2424
}
2525

2626
export function createAspmExceptionsCommand(): Command {
27-
const cmd = new Command('exceptions').description('Manage ASPM risk exceptions');
27+
const cmd = new Command('exceptions').description('Manage ASPM risk exceptions').addHelpText(
28+
'after',
29+
`
30+
Examples:
31+
$ shep aspm exceptions list-expiring --within 30 Review exceptions expiring this month
32+
$ shep aspm exceptions list-expiring --within 7 --json Export exceptions expiring this week`
33+
);
2834

2935
cmd
3036
.command('list-expiring')

src/presentation/cli/commands/aspm/aspm-findings-command.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,16 @@ interface FindingsShowOptions {
4242
}
4343

4444
export function createAspmFindingsCommand(): Command {
45-
const cmd = new Command('findings').description('List and inspect ASPM security findings');
45+
const cmd = new Command('findings')
46+
.description('List and inspect ASPM security findings')
47+
.addHelpText(
48+
'after',
49+
`
50+
Examples:
51+
$ shep aspm findings list --app api --severity Critical,High --limit 25 Review critical and high findings
52+
$ shep aspm findings list --state Open --kev --json Export open KEV findings
53+
$ shep aspm findings show finding_123 --json Inspect one finding`
54+
);
4655

4756
cmd
4857
.command('list')

src/presentation/cli/commands/aspm/aspm-ingest-command.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,13 @@ export function createAspmIngestCommand(): Command {
5353
.option('--sarif <file>', 'Path to a SARIF v2.1.0 document')
5454
.option('--sbom <file>', 'Path to a CycloneDX 1.5+ SBOM document')
5555
.option('--json', 'Emit a structured JSON summary on stdout')
56+
.addHelpText(
57+
'after',
58+
`
59+
Examples:
60+
$ shep aspm ingest --sarif reports/app.sarif --application api Ingest SARIF findings
61+
$ shep aspm ingest --sbom reports/bom.json --application api --json Ingest an SBOM and print JSON`
62+
)
5663
.action(async (options: IngestOptions) => {
5764
try {
5865
if (!options.sarif && !options.sbom) {

src/presentation/cli/commands/aspm/aspm-posture-command.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,13 @@ export function createAspmPostureCommand(): Command {
3333
.option('--app <slug>', 'Show per-application posture')
3434
.option('--top <n>', 'Number of top at-risk apps to include', '5')
3535
.option('--json', 'Emit JSON instead of a formatted view')
36+
.addHelpText(
37+
'after',
38+
`
39+
Examples:
40+
$ shep aspm posture --top 10 Show the ten highest-risk applications
41+
$ shep aspm posture --app api --json Export one application's posture`
42+
)
3643
.action(async (opts: PostureOptions) => {
3744
try {
3845
if (opts.app) {

src/presentation/cli/commands/aspm/aspm-scan-command.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ function buildCommand(
7171
'Comma-separated stages to run (sbom,sca,secrets,sast,container,iac)'
7272
)
7373
.option('--json', 'Emit a structured JSON summary on stdout')
74+
.addHelpText(
75+
'after',
76+
`
77+
Examples:
78+
$ shep aspm scan --app web --stages sbom,secrets --json Run selected stages and print JSON
79+
$ shep aspm rescan --app api --stages secrets Re-run only the secrets stage`
80+
)
7481
.action(async (options: ScanOptions) => {
7582
try {
7683
const resolved = await resolveApplication(options.app);

0 commit comments

Comments
 (0)