Skip to content

Add arg support #9

@rstagi

Description

@rstagi

Add arg support to let the confts read and handle things like node index.ts --port 3000.

Simple addition:

const config = schema({
  port: field({
    arg: "port",
    default: 8080,
    type: z.number().nonempty(),
  }),
})

Might also support multiple arguments:

const config = schema({
  port: field({
    arg: ["port", "p"],
    default: 8080,
    type: z.number().nonempty(),
  }),
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions