Package APIs

@i18n-micro/cli

Exported API of @i18n-micro/cli, generated from the source.

Command-line tools for nuxt-i18n-micro: extract, sync, translate, lint and audit locale files.

import { … } from '@i18n-micro/cli'

Functions

runCli

Run the CLI. Failures set process.exitCode; nothing here throws.

function runCli(rawArgs: string[]): Promise<void>

Constants

COMMAND_GROUPS

const COMMAND_GROUPS: readonly ["Inspect", "Translation workflow", "Refactoring", "Exchange"]

See Translation

commands

const commands: Record<string, CommandSpec>

See CommandSpec

Types

ArgSpec

The command table: one source of truth for parsing, --help and the generated command reference.

This file imports nothing, and handlers load on demand, so --help stays instant and the docs generator can read the table without pulling in parsers or vendor drivers.

interface ArgSpec
type
'string' | 'boolean' | 'positional' required
description
string required
default
string | boolean
required
boolean
alias
string
values
readonly string[]
Accepted values: anything else is a usage error.
numeric
'int' | 'number'
Parsed to a number and checked to be positive.
defaultHint
string
Shown in the docs where a computed default has no literal value.

CommandGroup

type CommandGroup = (typeof COMMAND_GROUPS)[number]

See COMMAND_GROUPS

CommandSpec

interface CommandSpec
description
string required
group
CommandGroup required
args
Record<string, ArgSpec> required
examples
string[]
load
() => Promise<{ default: CommandHandler; }> required

Generated from the TypeScript sources and their JSDoc by pnpm run docs:generate. Back to all packages · Integration guides