Skip to content

Add tx alias for transactions subcommand #2086

Description

@chasefleming

Summary

The transactions subcommand currently does not have a shorter alias. Adding a tx alias would improve developer experience by reducing typing and aligning with common CLI patterns.

Current Behavior

Users must type the full transactions command:

flow transactions send tx.cdc
flow transactions get 07a8...b433
flow transactions build ./transaction.cdc

Proposed Behavior

Users should be able to use tx as a shorthand:

flow tx send tx.cdc
flow tx get 07a8...b433
flow tx build ./transaction.cdc

Implementation

Add an Aliases field to the command definition in internal/transactions/transactions.go:

var Cmd = &cobra.Command{
	Use:              "transactions",
	Aliases:          []string{"tx"},
	Short:            "Build, sign, send and retrieve transactions",
	TraverseChildren: true,
	GroupID:          "interactions",
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementTechnical work without new features, refactoring, improving testsgood first issue

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions