MCPcopy Create free account
hub / github.com/21st-dev/21st-sdk / requireAgentSlug

Function requireAgentSlug

packages/cli/src/api.ts:16–28  ·  view source on GitHub ↗
(args: string[], usage: string)

Source from the content-addressed store, hash-verified

14}
15
16export function requireAgentSlug(args: string[], usage: string): string {
17 const slug = args[0]
18 if (!slug || slug.startsWith("-")) {
19 p.log.error(`Agent slug is required. Usage: npx @21st-sdk/cli ${usage}`)
20 process.exit(1)
21 }
22 const err = validateSlug(slug)
23 if (err) {
24 p.log.error(err)
25 process.exit(1)
26 }
27 return slug
28}
29
30export function buildApiUrl(
31 path: string,

Callers 8

rollbackFunction · 0.85
logsFunction · 0.85
agentsGetFunction · 0.85
agentsDeleteFunction · 0.85
deploymentsFunction · 0.85
envListFunction · 0.85
envSetFunction · 0.85
envRemoveFunction · 0.85

Calls 1

validateSlugFunction · 0.85

Tested by

no test coverage detected