onflow / onflow/flow-cli

Detect misuse in keys > decode command

Open
#1,236 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature Feedback
Dominant language
Go
Stars
209
Forks
87
Avg merge
1d 17h
Merged PRs (30d)
3

Description

Issue To Be Solved

Error messages output when using flow keys decode ... are unclear, leading to misuse of the command

context

image
image

(Optional): Suggest A Solution

@turbolent suggested we could detect if a given input doesn't start with what it should. For instance, in the case of a pem, if the input doesn't begin with -----BEGIN, it is malformed and the user can be informed that they are likely not using the correct input.

Personally, I think that detecting when an input looks like a file, but the --from-file flag wasn't given, the cli should ask if the user meant to include --from-file

(Optional): Context

Someone in the flow discord wasn't sure how to use this command, they were missing a flag

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the flow keys decode command and review how malformed inputs and missing --from-file usage currently produce errors. Done means users receive clear guidance when PEM-like input is malformed or when an input appears to be a file, with behavior covered by the command's existing tests if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.