feedbackbasket-cli 0.3.0 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/cli.js +18 -5
- package/dist/src/help.d.ts +1 -0
- package/dist/src/help.js +72 -0
- package/dist/src/version.d.ts +2 -2
- package/dist/src/version.js +1 -1
- package/package.json +1 -1
package/dist/src/cli.js
CHANGED
|
@@ -11,6 +11,7 @@ import { createDoctorCommand } from './commands/doctor.js';
|
|
|
11
11
|
import { createSetupCommand } from './commands/setup.js';
|
|
12
12
|
import { createWidgetCommand } from './commands/widget.js';
|
|
13
13
|
import { createTeamCommand } from './commands/team.js';
|
|
14
|
+
import { renderRootHelp } from './help.js';
|
|
14
15
|
let writer;
|
|
15
16
|
function resolveFormat(opts) {
|
|
16
17
|
if (opts.agent || opts.quiet)
|
|
@@ -28,11 +29,13 @@ export function run() {
|
|
|
28
29
|
const program = new Command('feedbackbasket')
|
|
29
30
|
.version(VERSION, '-v, --version')
|
|
30
31
|
.description('Command-line interface for FeedbackBasket')
|
|
31
|
-
.option('--json', 'Output as JSON envelope')
|
|
32
|
-
.option('--quiet', 'Output raw data only (no envelope)')
|
|
32
|
+
.option('-j, --json', 'Output as JSON envelope')
|
|
33
|
+
.option('-q, --quiet', 'Output raw data only (no envelope)')
|
|
33
34
|
.option('--agent', 'Agent mode (alias for --quiet)')
|
|
34
|
-
.option('--md', 'Output as Markdown')
|
|
35
|
+
.option('-m, --md', 'Output as Markdown')
|
|
35
36
|
.option('--base-url <url>', 'API base URL override')
|
|
37
|
+
.addHelpText('beforeAll', '')
|
|
38
|
+
.helpOption('--help', 'Show help for command')
|
|
36
39
|
.hook('preAction', (thisCommand) => {
|
|
37
40
|
const opts = thisCommand.opts();
|
|
38
41
|
const format = resolveFormat(opts);
|
|
@@ -41,10 +44,20 @@ export function run() {
|
|
|
41
44
|
setBaseUrlOverride(opts.baseUrl);
|
|
42
45
|
}
|
|
43
46
|
});
|
|
47
|
+
// Custom help for root command
|
|
48
|
+
program.configureHelp({
|
|
49
|
+
formatHelp: (cmd, helper) => {
|
|
50
|
+
if (cmd.name() === 'feedbackbasket') {
|
|
51
|
+
return renderRootHelp();
|
|
52
|
+
}
|
|
53
|
+
// Subcommands use default Commander help
|
|
54
|
+
return helper.formatHelp(cmd, helper);
|
|
55
|
+
},
|
|
56
|
+
});
|
|
44
57
|
// Register commands
|
|
45
58
|
program.addCommand(createAuthCommand(getWriter));
|
|
46
|
-
program.addCommand(createLoginCommand(getWriter));
|
|
47
|
-
program.addCommand(createLogoutCommand(getWriter));
|
|
59
|
+
program.addCommand(createLoginCommand(getWriter));
|
|
60
|
+
program.addCommand(createLogoutCommand(getWriter));
|
|
48
61
|
program.addCommand(createProjectsCommand(getWriter));
|
|
49
62
|
program.addCommand(createFeedbackCommand(getWriter));
|
|
50
63
|
program.addCommand(createBugsCommand(getWriter));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function renderRootHelp(): string;
|
package/dist/src/help.js
ADDED
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
import { brand, logo } from './output/theme.js';
|
|
3
|
+
import { VERSION } from './version.js';
|
|
4
|
+
const INDENT = ' ';
|
|
5
|
+
function section(title) {
|
|
6
|
+
return chalk.bold(title.toUpperCase());
|
|
7
|
+
}
|
|
8
|
+
function cmd(name, desc, nameWidth = 16) {
|
|
9
|
+
return `${INDENT}${brand.command(name.padEnd(nameWidth))} ${desc}`;
|
|
10
|
+
}
|
|
11
|
+
function flag(name, desc, nameWidth = 18) {
|
|
12
|
+
return `${INDENT}${name.padEnd(nameWidth)} ${desc}`;
|
|
13
|
+
}
|
|
14
|
+
export function renderRootHelp() {
|
|
15
|
+
const lines = [];
|
|
16
|
+
lines.push('');
|
|
17
|
+
lines.push(` ${logo()} CLI ${brand.muted(`v${VERSION}`)}`);
|
|
18
|
+
lines.push('');
|
|
19
|
+
lines.push(` ${brand.muted('The command-line interface for FeedbackBasket.')}`);
|
|
20
|
+
lines.push(` ${brand.muted('Manage projects, feedback, widgets, and team from your terminal.')}`);
|
|
21
|
+
lines.push('');
|
|
22
|
+
// Core Commands
|
|
23
|
+
lines.push(section(' CORE COMMANDS'));
|
|
24
|
+
lines.push(cmd('projects', 'Manage projects (create, show, update, delete)'));
|
|
25
|
+
lines.push(cmd('feedback', 'View and manage feedback'));
|
|
26
|
+
lines.push(cmd('bugs', 'View bug reports with severity'));
|
|
27
|
+
lines.push(cmd('widget', 'Manage feedback widget & get embed code'));
|
|
28
|
+
lines.push(cmd('team', 'Manage organization members'));
|
|
29
|
+
lines.push('');
|
|
30
|
+
// Shortcuts
|
|
31
|
+
lines.push(section(' SHORTCUTS'));
|
|
32
|
+
lines.push(cmd('login', 'Authenticate with FeedbackBasket'));
|
|
33
|
+
lines.push(cmd('logout', 'Clear stored credentials'));
|
|
34
|
+
lines.push('');
|
|
35
|
+
// Search & Export
|
|
36
|
+
lines.push(section(' SEARCH & EXPORT'));
|
|
37
|
+
lines.push(cmd('feedback search', 'Search feedback across projects'));
|
|
38
|
+
lines.push(cmd('feedback export', 'Export feedback to CSV, Markdown, or JSON'));
|
|
39
|
+
lines.push(cmd('bugs stats', 'Bug statistics summary'));
|
|
40
|
+
lines.push('');
|
|
41
|
+
// Auth & Config
|
|
42
|
+
lines.push(section(' AUTH & CONFIG'));
|
|
43
|
+
lines.push(cmd('auth', 'Manage authentication (login, logout, status, token)'));
|
|
44
|
+
lines.push(cmd('doctor', 'Run diagnostics to check CLI health'));
|
|
45
|
+
lines.push(cmd('setup', 'Set up agent integrations (Claude Code)'));
|
|
46
|
+
lines.push('');
|
|
47
|
+
// Flags
|
|
48
|
+
lines.push(section(' FLAGS'));
|
|
49
|
+
lines.push(flag('-j, --json', 'Output as JSON envelope'));
|
|
50
|
+
lines.push(flag('-q, --quiet', 'Quiet output (data only, no envelope)'));
|
|
51
|
+
lines.push(flag('--agent', 'Agent mode (alias for --quiet)'));
|
|
52
|
+
lines.push(flag('-m, --md', 'Output as Markdown'));
|
|
53
|
+
lines.push(flag('--base-url <url>', 'API base URL override'));
|
|
54
|
+
lines.push(flag('--help', 'Show help for command'));
|
|
55
|
+
lines.push(flag('--version', 'Show version'));
|
|
56
|
+
lines.push('');
|
|
57
|
+
// Examples
|
|
58
|
+
lines.push(section(' EXAMPLES'));
|
|
59
|
+
lines.push(`${INDENT}${brand.muted('$')} feedbackbasket projects list`);
|
|
60
|
+
lines.push(`${INDENT}${brand.muted('$')} feedbackbasket feedback list --category BUG --status OPEN`);
|
|
61
|
+
lines.push(`${INDENT}${brand.muted('$')} feedbackbasket bugs list --severity high`);
|
|
62
|
+
lines.push(`${INDENT}${brand.muted('$')} feedbackbasket widget script myapp`);
|
|
63
|
+
lines.push(`${INDENT}${brand.muted('$')} feedbackbasket projects create "My App" --url https://myapp.com`);
|
|
64
|
+
lines.push('');
|
|
65
|
+
// Learn More
|
|
66
|
+
lines.push(section(' LEARN MORE'));
|
|
67
|
+
lines.push(`${INDENT}${brand.command('feedbackbasket <command> --help')} Help for any command`);
|
|
68
|
+
lines.push(`${INDENT}${brand.command('feedbackbasket doctor')} Check CLI health`);
|
|
69
|
+
lines.push(`${INDENT}${brand.muted('Docs:')} https://feedbackbasket.com/docs/cli`);
|
|
70
|
+
lines.push('');
|
|
71
|
+
return lines.join('\n');
|
|
72
|
+
}
|
package/dist/src/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.3.
|
|
2
|
-
export declare const USER_AGENT = "FeedbackBasket-CLI/0.3.
|
|
1
|
+
export declare const VERSION = "0.3.2";
|
|
2
|
+
export declare const USER_AGENT = "FeedbackBasket-CLI/0.3.2";
|
package/dist/src/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.3.
|
|
1
|
+
export const VERSION = '0.3.2';
|
|
2
2
|
export const USER_AGENT = `FeedbackBasket-CLI/${VERSION}`;
|