Skip to content

Standardized CLI and Automated Release Flow for Nova PowerShell Module #6

@stiwicourage

Description

@stiwicourage

Story

As a developer,
I want a consistent CLI interface and automated versioning/release flow
so that I can build, test, version, and publish the Nova PowerShell module in a reliable and standardized way.


Description

The Nova PowerShell module should follow PowerShell best practices for cmdlet naming (Verb-Noun) while exposing a modern CLI experience through a single entry command (nova).

The CLI should provide an intuitive developer experience similar to tools like git, dotnet, and npm, while the underlying cmdlets act as a stable and scriptable API.

Versioning must follow a semantic-release-inspired approach, where the next version is automatically calculated based on changes. The release process should ensure that only valid, tested builds are versioned and published.


Command Model

Cmdlet CLI Responsibility
Get-NovaProjectInfo nova info Show full project metadata (name, author, version, etc.)
Get-NovaProjectInfo -Version nova version Show only the current version
Invoke-NovaBuild nova build Build the PowerShell module
Test-NovaBuild nova test Run tests against the built module
New-NovaModule nova init Initializes a new project from a template
Publish-NovaModule nova publish Build, test, and publish locally or to a configured repository
Update-NovaModuleVersion nova bump Calculate and update the next semantic version
orchestration nova release Execute full release flow (build, test, version, publish)

CLI Behavior

  • nova info returns complete project metadata
  • nova version returns only the current version
  • nova build produces the compiled .psm1 module
  • nova test validates the built module
  • nova init scaffolds a new module project
  • nova publish:
    • -Local builds, tests, and installs the module locally
    • -Repository PSGallery builds, tests, and publishes to PowerShell Gallery
    • -Repository <Name> builds, tests, and publishes to any registered repository (e.g., Nexus)
  • nova bump:
    • Calculates next version using semantic-release principles:
      • fix → patch
      • feat → minor
      • BREAKING CHANGE → major
    • Updates the version in project.json
  • nova release:
    • Executes the full release pipeline

Release Flow

The nova release command must execute the following steps in order:

  1. Build
  2. Test
  3. Bump version
  4. Rebuild with updated version
  5. Publish

Rationale

  • Build must occur before test because tests run against the generated .psm1
  • Version bump must only happen after successful build and test
  • A second build ensures the final artifact contains the updated version
  • Only validated and correctly versioned artifacts are published

Acceptance Criteria

  • All public functions follow PowerShell Verb-Noun naming conventions
  • A single CLI entry point nova is implemented
  • CLI commands correctly map to underlying cmdlets
  • nova version only displays version and does not modify state
  • nova bump calculates version automatically (no manual input required)
  • Version is stored and updated in project.json
  • nova publish supports both local and remote repositories
  • nova release executes the full validated release pipeline
  • Version bump does not occur if build or test fails
  • The published module always reflects the correct version

Non-Goals

  • No alias-based interface (aliases are not part of the public API)
  • No manual version-setting cmdlet (manual edits can be done directly in project.json)

Outcome

  • Clear separation between:
    • PowerShell API (cmdlets)
    • CLI experience (nova)
  • Consistent and discoverable command structure
  • Automated and reliable semantic versioning
  • Safe and repeatable release process
  • A CLI aligned with modern development practices

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

Status

Done

Relationships

None yet

Development

No branches or pull requests

Issue actions