dify/cli/src/commands/config/get/index.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

21 lines
706 B
TypeScript

import { DifyCommand } from '@/commands/_shared/dify-command'
import { Args } from '@/framework/flags'
import { raw } from '@/framework/output'
import { getConfigurationStore } from '@/store/manager'
import { runConfigGet } from './run'
export default class ConfigGet extends DifyCommand {
static override description = "Print one config key's value"
static override examples = ['<%= config.bin %> config get defaults.format']
static override args = {
key: Args.string({ description: 'config key', required: true }),
}
async run(argv: string[]) {
const { args } = this.parse(ConfigGet, argv)
return raw(await runConfigGet({ store: getConfigurationStore(), key: args.key }))
}
}