-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeta.ts
More file actions
37 lines (35 loc) · 1.11 KB
/
Copy pathmeta.ts
File metadata and controls
37 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Meta commands (help / completion) — listed in ALL_COMMANDS for one SoT.
* Bin may still fast-path these before createRuntime (no network).
* Genetic tag: repo.tooling.user_cli.gen1
*/
import type { CommandSpec } from './types.js';
export const metaCommands: CommandSpec[] = [
{
name: 'help',
description: 'Detailed help — agentstack help <command>',
usage: '[<command> …]',
examples: [
'agentstack help',
'agentstack help hosting quick-start',
'agentstack help bots list',
],
async run(_rt, args) {
const { commandHelp } = await import('./help.js');
process.stdout.write(`${commandHelp(args)}\n`);
},
},
{
name: 'completion',
description: 'Shell completion script — bash | zsh | powershell',
usage: '<bash|zsh|powershell>',
examples: [
'eval "$(agentstack completion bash)"',
'agentstack completion powershell | Out-File -Append $PROFILE',
],
async run(_rt, args) {
const { completionScript } = await import('./completion.js');
process.stdout.write(completionScript(args[0] || 'bash'));
},
},
];