Private/Metadata.ps1

function Get-DevXToolkitGrammarVersion {
    <#
    .SYNOPSIS
    Returns the version of the DevXToolkit command grammar registry.

    .DESCRIPTION
    Bumped when the shape or contents of Get-DevXToolkitGrammar's records
    change in a way a consumer (Get-DevCommand, Show-DevGrammar, or an
    external binding such as eLan's) would need to react to.
    #>

    [CmdletBinding()]
    [OutputType([string])]
    param()

    '1.1.0'
}

function Get-DevXToolkitGrammar {
    <#
    .SYNOPSIS
    Returns the DevXToolkit command grammar registry.

    .DESCRIPTION
    One record per public command: its semantic ID (domain.object.verb),
    canonical function, human alias, verb/object/domain, parameters, output
    type, side effects, and status. This is the single source of truth
    behind Get-DevCommand and Show-DevGrammar. A command's entry is added
    here in the same change that adds its Public/*.ps1 file. Records are
    built as plain PSCustomObject literals rather than via New-* helper
    functions so PSScriptAnalyzer's ShouldProcess rule (which assumes any
    New- verb changes system state) doesn't false-positive on pure in-memory
    object construction.
    #>

    [CmdletBinding()]
    [OutputType([array])]
    param()

    @(
        [PSCustomObject]@{
            SemanticId  = 'filesystem.file.createAndOpen'
            Function    = 'mni'
            Alias       = $null
            Verb        = 'create'
            Object      = 'file'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'EditorCommand'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'NoOpen'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'filesystem.file.create'
            Function    = 'New-DevFile'
            Alias       = 'mf'
            Verb        = 'create'
            Object      = 'file'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $true }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'filesystem.directory.create'
            Function    = 'New-DevDirectory'
            Alias       = 'mkd'
            Verb        = 'create'
            Object      = 'directory'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.DirectoryInfo[]'
            SideEffects = @('filesystem-write', 'directory-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string[]'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'BasePath'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'filesystem.directory.createAndEnter'
            Function    = 'New-DevDirectoryAndEnter'
            Alias       = 'mkcd'
            Verb        = 'create'
            Object      = 'directory'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.DirectoryInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'working-directory-change')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'BasePath'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'filesystem.tree.create'
            Function    = 'New-DevTree'
            Alias       = $null
            Verb        = 'create'
            Object      = 'tree'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.DirectoryInfo[]'
            SideEffects = @('filesystem-write', 'directory-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Directories'; Type = 'string[]'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Root'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'filesystem.structure.create'
            Function    = 'New-DevStructure'
            Alias       = 'mkstruct'
            Verb        = 'create'
            Object      = 'structure'
            Domain      = 'filesystem'
            OutputType  = 'System.IO.FileSystemInfo[]'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Root'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Directories'; Type = 'string[]'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Files'; Type = 'string[]'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'introspection.command.list'
            Function    = 'Get-DevCommand'
            Alias       = $null
            Verb        = 'list'
            Object      = 'command'
            Domain      = 'introspection'
            OutputType  = 'PSCustomObject[]'
            SideEffects = @()
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Domain'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'introspection.grammar.show'
            Function    = 'Show-DevGrammar'
            Alias       = $null
            Verb        = 'show'
            Object      = 'grammar'
            Domain      = 'introspection'
            OutputType  = 'PSCustomObject'
            SideEffects = @()
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Json'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.project.create'
            Function    = 'Invoke-MkProj'
            Alias       = 'mkproj'
            Verb        = 'create'
            Object      = 'project'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.DirectoryInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Template'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.readme.create'
            Function    = 'Invoke-MkReadme'
            Alias       = 'mkreadme'
            Verb        = 'create'
            Object      = 'readme'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Title'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Description'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.config.create'
            Function    = 'Invoke-MkConfig'
            Alias       = 'mkconfig'
            Verb        = 'create'
            Object      = 'config'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Type'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.ci.create'
            Function    = 'Invoke-MkCi'
            Alias       = 'mkci'
            Verb        = 'create'
            Object      = 'ci'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Provider'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.docs.create'
            Function    = 'Invoke-MkDocs'
            Alias       = 'mkdocs'
            Verb        = 'create'
            Object      = 'docs'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.FileInfo[]'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.environment.create'
            Function    = 'Invoke-MkVenv'
            Alias       = 'mkvenv'
            Verb        = 'create'
            Object      = 'environment'
            Domain      = 'scaffolding'
            OutputType  = 'None'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Type'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'scaffolding.license.create'
            Function    = 'Invoke-MkLicense'
            Alias       = 'mklicense'
            Verb        = 'create'
            Object      = 'license'
            Domain      = 'scaffolding'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Type'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Owner'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Year'; Type = 'int'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'environment.project.create'
            Function    = 'New-DevProject'
            Alias       = $null
            Verb        = 'create'
            Object      = 'project'
            Domain      = 'environment'
            OutputType  = 'None'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'environment.config.create'
            Function    = 'New-DevConfig'
            Alias       = $null
            Verb        = 'create'
            Object      = 'config'
            Domain      = 'environment'
            OutputType  = 'None'
            SideEffects = @('filesystem-write', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'environment.bootstrap.create'
            Function    = 'New-DevBootstrap'
            Alias       = $null
            Verb        = 'create'
            Object      = 'bootstrap'
            Domain      = 'environment'
            OutputType  = 'None'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'environment.workspace.create'
            Function    = 'New-DevEnvironment'
            Alias       = $null
            Verb        = 'create'
            Object      = 'workspace'
            Domain      = 'environment'
            OutputType  = 'None'
            SideEffects = @('filesystem-write', 'directory-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $true }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'language.pythonModule.create'
            Function    = 'New-PyModule'
            Alias       = 'mkmod'
            Verb        = 'create'
            Object      = 'pythonModule'
            Domain      = 'language'
            OutputType  = 'System.IO.FileInfo'
            SideEffects = @('filesystem-write', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'language.pythonPackage.create'
            Function    = 'New-PyPackage'
            Alias       = 'mkpkg'
            Verb        = 'create'
            Object      = 'pythonPackage'
            Domain      = 'language'
            OutputType  = 'System.IO.DirectoryInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'language.pythonProject.create'
            Function    = 'New-PythonProject'
            Alias       = 'mkpyproj'
            Verb        = 'create'
            Object      = 'pythonProject'
            Domain      = 'language'
            OutputType  = 'System.IO.DirectoryInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'PackageName'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Description'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'language.powerShellProject.create'
            Function    = 'New-PowerShellProject'
            Alias       = 'mkpsproj'
            Verb        = 'create'
            Object      = 'powerShellProject'
            Domain      = 'language'
            OutputType  = 'System.IO.DirectoryInfo'
            SideEffects = @('filesystem-write', 'directory-create', 'file-create')
            Status      = 'stable'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Name'; Type = 'string'; Mandatory = $true }
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'ModuleName'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Description'; Type = 'string'; Mandatory = $false }
                [PSCustomObject]@{ Name = 'Force'; Type = 'switch'; Mandatory = $false }
            )
        }

        [PSCustomObject]@{
            SemanticId  = 'lifecycle.workspace.cleanup'
            Function    = 'Invoke-DevCleanup'
            Alias       = $null
            Verb        = 'cleanup'
            Object      = 'workspace'
            Domain      = 'lifecycle'
            OutputType  = 'None'
            SideEffects = @()
            Status      = 'deprecated'
            Parameters  = @(
                [PSCustomObject]@{ Name = 'Path'; Type = 'string'; Mandatory = $false }
            )
        }
    )
}