Errors

vakna: unknown command, unknown flag or missing argument

Note
This page is generated from a mock CLI, and its numbers are placeholders.

Verified against vakna 0.0.0-mock on · generated from the CLI's own definitions

Run vakna <command> --help and fix the command line it points to.

What does a usage error mean?

The command line didn't parse: an unknown command or flag, a missing argument, or a value out of range. Nothing ran. The exit code is 2.

What it looks like

sh
vakna forkk api
prints vakna: unknown command "forkk" hint: vakna fork --help # did you mean fork?

Exit code 2.

sh
vakna fork api --countt 5 -- go test ./...
prints vakna: unknown flag --countt hint: vakna fork --help # did you mean --count?

Exit code 2.

sh
vakna fork api --count lots -- go test ./...
prints vakna: --count lots is not a whole number of boxes hint: vakna fork --help

Exit code 2.

sh
vakna run api-2
prints vakna: the mock can't open an interactive shell; give a command after -- hint: vakna run --help

Exit code 2.

sh
vakna list --format yaml
prints vakna: unknown --format yaml hint: vakna --help # text or json

Exit code 2.

sh
vakna create Api_1
prints vakna: "Api_1" is not a box name: 1 to 63 lowercase letters, digits and hyphens, starting with a letter and not ending with a hyphen hint: vakna create --help

Exit code 2.

As JSON

With --format json the error is one JSON line. Branch on its code, not on the message or the exit code.

Output
{"v":1,"event":"error","code":"usage","message":"unknown command \"forkk\"","hint":"vakna fork --help # did you mean fork?","docs":"https://vakna.com/docs/errors/usage","mocked":true}

Commands that print it

View as Markdown