feat: rename --from/--to flags to --input/--output (#42)

## Description

The `convert` and `reduce` commands used `--from` and `--to` flags to specify input/output representations.
These names are ambiguous and don't clearly describe what they control.
This PR renames them to `--input`/`--output` and adds `-i`/`-o` short aliases for convenience.

- Rename `--from` to `--input` (`-i`) in `convert` and `reduce` commands.
- Rename `--to` to `--output` (`-o`) in the `convert` command.
- Switch from `StringVar` to `StringVarP` to support the new short flags.

## Benefits

- Flag names now clearly indicate they refer to representations, not file paths.
- Short aliases `-i` and `-o` make CLI usage more concise.

## Checklist

- [x] Code follows conventional commit format.
- [x] Branch follows naming convention (`<type>/<description>`). Always use underscores.
- [x] Tests pass (if applicable).
- [ ] Documentation updated (if applicable).

Reviewed-on: #42
Co-authored-by: M.V. Hutz <git@maximhutz.me>
Co-committed-by: M.V. Hutz <git@maximhutz.me>
This commit was merged in pull request #42.
This commit is contained in:
2026-02-07 04:31:57 +00:00
committed by Maxim Hutz
parent a3ee34732e
commit 58d0823069
2 changed files with 3 additions and 3 deletions

View File

@@ -87,8 +87,8 @@ func LambdaConvert() *cobra.Command {
}, },
} }
cmd.Flags().StringVar(&inputReprFlag, "from", "", "Input representation (inferred from extension if unset)") cmd.Flags().StringVarP(&inputReprFlag, "input", "i", "", "Input representation (inferred from extension if unset)")
cmd.Flags().StringVar(&outputReprFlag, "to", "", "Output representation (inferred from extension if unset)") cmd.Flags().StringVarP(&outputReprFlag, "output", "o", "", "Output representation (inferred from extension if unset)")
return cmd return cmd
} }

View File

@@ -102,7 +102,7 @@ func LambdaReduce() *cobra.Command {
}, },
} }
cmd.Flags().StringVar(&inputReprFlag, "from", "", "Input representation (inferred from extension if unset)") cmd.Flags().StringVarP(&inputReprFlag, "input", "i", "", "Input representation (inferred from extension if unset)")
cmd.Flags().StringVarP(&engineFlag, "engine", "e", "", "Reduction engine (inferred from '--input' if unset)") cmd.Flags().StringVarP(&engineFlag, "engine", "e", "", "Reduction engine (inferred from '--input' if unset)")
return cmd return cmd