Skip to content

Add short option aliases for CLI commands#140

Merged
lex57ukr merged 2 commits intomainfrom
116-add-short-option-aliases
Feb 4, 2026
Merged

Add short option aliases for CLI commands#140
lex57ukr merged 2 commits intomainfrom
116-add-short-option-aliases

Conversation

@lex57ukr
Copy link
Contributor

@lex57ukr lex57ukr commented Feb 4, 2026

Summary

Improve CLI usability by adding short option aliases following Unix conventions. Users can now use -t, -p, and -g instead of the longer --template-name, --project-path, and --include-git-files options, reducing typing and aligning with user expectations.

Related Issues

Fixes #116

Changes

  • Add short aliases to new command options (-t, -p, -g)
  • Add short alias to project switch-template option (-p)
  • Update man page with short+long option forms in synopsis, options, and examples
  • Add convention test to enforce short aliases on all future options
  • Document convention testing approach in docs/how-to/how-to-convention-tests.md

lex57ukr and others added 2 commits February 4, 2026 06:32
Add -t (--template-name), -p (--project-path), and -g (--include-git-files)
short aliases following Unix conventions. Update man page documentation and
add convention test to ensure future options include short aliases.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Document the approach of using reflection-based unit tests to enforce
Cocona conventions. Move code examples from CLAUDE.md to the new how-to
guide and update cross-references.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@lex57ukr lex57ukr added documentation Improvements or additions to documentation enhancement New feature or request labels Feb 4, 2026
Copilot AI review requested due to automatic review settings February 4, 2026 13:37
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR enhances CLI usability by adding Unix-style short option aliases (-t, -p, -g) to command options, making commands more concise while maintaining backward compatibility with long-form options.

Changes:

  • Added short aliases to new command options and project switch-template option
  • Updated man page documentation to reflect both short and long option forms
  • Introduced convention test to enforce short aliases on all future options

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/Keystone.Cli/Presentation/NewCommandController.cs Added short aliases -t, -p, -g to new command options
src/Keystone.Cli/Presentation/Project/SwitchTemplateSubCommand.cs Added short alias -p to switch-template command option
tests/Keystone.Cli.UnitTests/Presentation/Cocona/CoconaCommandMethodConventionsTests.cs Added convention test enforcing short aliases on all option parameters
docs/man/man1/keystone-cli.1 Updated man page synopsis, options, and examples to show short+long forms
docs/how-to/how-to-convention-tests.md Added documentation explaining convention testing approach
CLAUDE.md Updated project documentation to reference new convention test guide

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lex57ukr lex57ukr merged commit 8406d19 into main Feb 4, 2026
5 checks passed
@lex57ukr lex57ukr deleted the 116-add-short-option-aliases branch February 4, 2026 13:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add short option aliases for CLI commands

1 participant