Skip to content

Commit f8759c2

Browse files
dines-rlross-rl
andauthored
feat: add benchmark job to cli [beta] (#88)
## Description <!-- Provide a brief description of your changes --> **Note:** PR titles should follow [Conventional Commits](https://www.conventionalcommits.org/) format (e.g., `feat(devbox): add support for custom env vars` or `fix(snapshot): resolve pagination issue`) as they are used for automatic release notes generation. ## Type of Change <!-- Mark the relevant option with an 'x' --> - [ ] Bug fix (non-breaking change which fixes an issue) - [ ] New feature (non-breaking change which adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test updates ## Related Issues <!-- Link to related issues using #issue-number --> Closes # ## Changes Made <!-- Describe the changes in detail --> ## Testing <!-- Describe how you tested your changes --> - [ ] I have tested locally - [ ] I have added/updated tests - [ ] All existing tests pass ## Checklist - [ ] My code follows the code style of this project - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have updated the documentation accordingly - [ ] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published ## Screenshots (if applicable) <!-- Add screenshots to help explain your changes --> ## Additional Notes <!-- Any additional information that reviewers should know --> --------- Co-authored-by: ross <151584650+ross-rl@users.noreply.github.com>
1 parent 8697e5c commit f8759c2

27 files changed

Lines changed: 5687 additions & 73 deletions

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
A **TUI + CLI** for the [Runloop.ai](https://runloop.ai) platform. Use it as an **interactive TUI** (Terminal User Interface) with rich UI components, or as a **traditional CLI** for scripting and automation.
88

9-
📖 **[Full Documentation](https://docs.runloop.ai/docs/tools/cli)**
9+
📖 **[Full Documentation](https://docs.runloop.ai/docs/tools/rl-cli)**
1010

1111
<p align="center">
1212
<img src="https://raw.githubusercontent.com/runloopai/rl-cli/main/misc/demo.gif" alt="Runloop CLI Demo" width="800">

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
},
6969
"dependencies": {
7070
"@modelcontextprotocol/sdk": "^1.19.1",
71-
"@runloop/api-client": "1.3.0",
71+
"@runloop/api-client": "1.3.1",
7272
"@types/express": "^5.0.3",
7373
"chalk": "^5.3.0",
7474
"commander": "^14.0.1",

pnpm-lock.yaml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/generate-command-docs.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const rootDir = join(__dirname, "..");
1111
const readmePath = join(rootDir, "README.md");
1212

1313
// Default docs path - can be overridden via DOCS_PATH env var or --docs-path argument
14-
const defaultDocsPath = join(rootDir, "..", "docs", "docs", "tools", "cli.mdx");
14+
const defaultDocsPath = join(rootDir, "..", "docs", "docs", "tools", "rl-cli.mdx");
1515

1616
/**
1717
* Generates markdown documentation for the command structure from Commander
@@ -120,7 +120,7 @@ function generateCommandStructure(program) {
120120
}
121121

122122
/**
123-
* Generates a detailed command reference for external docs (cli.mdx)
123+
* Generates a detailed command reference for external docs (rl-cli.mdx)
124124
* Uses Mintlify components for better presentation
125125
*/
126126
function generateDetailedCommandDocs(program) {
@@ -286,7 +286,7 @@ function updateReadme(newCommandStructure) {
286286
}
287287

288288
/**
289-
* Generates the full cli.mdx content
289+
* Generates the full rl-cli.mdx content
290290
*/
291291
function generateCliMdx(program) {
292292
const commandDocs = generateDetailedCommandDocs(program);
@@ -508,7 +508,7 @@ The Runloop CLI is open-source. We welcome contributions!
508508
}
509509

510510
/**
511-
* Updates the external docs cli.mdx file
511+
* Updates the external docs rl-cli.mdx file
512512
*/
513513
function updateDocsMdx(program, docsPath) {
514514
if (!existsSync(docsPath)) {
@@ -547,9 +547,9 @@ function parseArgs() {
547547
Usage: generate-command-docs.js [options]
548548
549549
Options:
550-
--docs-path <path> Path to cli.mdx file (default: ../docs/docs/tools/cli.mdx)
550+
--docs-path <path> Path to rl-cli.mdx file (default: ../docs/docs/tools/rl-cli.mdx)
551551
--skip-readme Skip updating README.md
552-
--skip-docs Skip updating cli.mdx
552+
--skip-docs Skip updating rl-cli.mdx
553553
--help, -h Show this help message
554554
555555
Environment Variables:

src/components/BenchmarkMenu.tsx

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,27 @@ interface BenchmarkMenuItem {
1818
}
1919

2020
const benchmarkMenuItems: BenchmarkMenuItem[] = [
21+
{
22+
key: "benchmarks",
23+
label: "Benchmarks",
24+
description: "View benchmark definitions",
25+
icon: "◉",
26+
color: colors.primary,
27+
},
2128
{
2229
key: "benchmark-runs",
2330
label: "Benchmark Runs",
2431
description: "View and manage benchmark executions",
2532
icon: "▶",
2633
color: colors.success,
2734
},
35+
{
36+
key: "benchmark-jobs",
37+
label: "Benchmark Jobs",
38+
description: "Run and manage benchmark jobs",
39+
icon: "▣",
40+
color: colors.warning,
41+
},
2842
{
2943
key: "scenario-runs",
3044
label: "Scenario Runs",
@@ -87,9 +101,13 @@ export const BenchmarkMenu = ({ onSelect, onBack }: BenchmarkMenuProps) => {
87101
onSelect(benchmarkMenuItems[selectedIndex].key);
88102
} else if (key.escape) {
89103
onBack();
90-
} else if (input === "b" || input === "1") {
104+
} else if (input === "1") {
105+
onSelect("benchmarks");
106+
} else if (input === "2") {
91107
onSelect("benchmark-runs");
92-
} else if (input === "s" || input === "2") {
108+
} else if (input === "3") {
109+
onSelect("benchmark-jobs");
110+
} else if (input === "4") {
93111
onSelect("scenario-runs");
94112
} else if (input === "q") {
95113
exit();
@@ -149,7 +167,7 @@ export const BenchmarkMenu = ({ onSelect, onBack }: BenchmarkMenuProps) => {
149167
showArrows
150168
paddingX={2}
151169
tips={[
152-
{ key: "1-2", label: "Quick select" },
170+
{ key: "1-4", label: "Quick select" },
153171
{ key: "Enter", label: "Select" },
154172
{ key: "Esc", label: "Back" },
155173
{ key: "q", label: "Quit" },

0 commit comments

Comments
 (0)