Typed from your definitions
Flags and args resolve to exact types, such as 'fast' | 'safe' or URL[] | undefined. There are no interfaces to keep in sync.
Define flags, args and commands separately, compose them, and get fully typed input. Help, errors and exit codes are handled for you.
const deploy = command({
description: 'Deploy a site',
args: [arg.string({ name: 'site', description: 'Site' }).required()],
flags: {
env: flag.string({ description: 'Env', choices: ['dev', 'prod'] }),
force: flag.boolean({ alias: 'f', description: 'Skip checks' }),
},
run: ({ args: [site], flags: { env, force } }) => { },
});
const app = jinju({ commands: { ':site': { deploy } } });
await app.run();
// $ app my-site deploy --env prod -f