()
| 951 | } |
| 952 | |
| 953 | function renderUsageText(): string { |
| 954 | const header = `agent-device <command> [args] [--json] |
| 955 | |
| 956 | CLI to automate supported app, device, desktop, and web targets for AI agents. |
| 957 | `; |
| 958 | |
| 959 | const commands = listCliCommandNames().map((name) => { |
| 960 | const schema = getCliCommandSchema(name); |
| 961 | return { |
| 962 | name, |
| 963 | schema, |
| 964 | usage: buildCommandListUsage(name, schema), |
| 965 | }; |
| 966 | }); |
| 967 | const commandLines = renderCommandSection(commands); |
| 968 | |
| 969 | const helpFlags = listHelpFlags(GLOBAL_FLAG_KEYS); |
| 970 | const flagsSection = renderFlagSection('Global Flags:', helpFlags); |
| 971 | const startSection = renderTextSection('Agent Starting Point:', AGENT_START_LINES); |
| 972 | const quickstartSection = renderTextSection('Agent Quickstart:', AGENT_QUICKSTART_LINES); |
| 973 | const workflowsSection = renderAlignedSection('Agent Workflows:', AGENT_WORKFLOWS); |
| 974 | const configSection = renderTextSection('Configuration:', CONFIGURATION_LINES); |
| 975 | const environmentSection = renderAlignedSection('Environment:', ENVIRONMENT_LINES); |
| 976 | const examplesSection = renderTextSection('Examples:', EXAMPLE_LINES); |
| 977 | |
| 978 | return `${header} |
| 979 | ${startSection} |
| 980 | |
| 981 | ${workflowsSection} |
| 982 | |
| 983 | ${commandLines} |
| 984 | |
| 985 | ${flagsSection} |
| 986 | |
| 987 | ${quickstartSection} |
| 988 | |
| 989 | ${configSection} |
| 990 | |
| 991 | ${environmentSection} |
| 992 | |
| 993 | ${examplesSection} |
| 994 | `; |
| 995 | } |
| 996 | |
| 997 | export function buildUsageText(): string { |
| 998 | return renderUsageText(); |
no test coverage detected