ebsarr / packet

packet, a CLI tool to manage packet.net services
Other
40 stars 14 forks source link

add '--project ABCDEF' command line flag #37

Open sygibson opened 6 years ago

sygibson commented 6 years ago

I'm trying to use the packet tool in a stand-alone environment where I do not want to write a profile out prior to use of the tool. It appears this is required to be able to set the DEFAULT_PROJECT_ID in the profile.

There currently exists the --key KEY option to the arguments, but there is no matching --project flag to set the Project ID. This requires setting the Profile which requires writing out a config file - which is not a desirable trait in my use case.

sygibson commented 6 years ago

well - I take it back ... :)

the --project-id flag does exist, but I had to go through the code to find it .... I would amend this Issue to be more of:

"please add documentation to command output that includes --project-id"

Thank you !

ebsarr commented 6 years ago

You are right. I don't even remember why I didn't make project-id a global flag. I'll look into this and update the documentation accordingly.

ebsarr commented 6 years ago

@sygibson . I have checked:

Usage: packet network list-ip-reservations [flags]

Flags: -h, --help help for list-ip-reservations --project-id string Project ID

Global Flags: -k, --key string API key -p, --profile string Profile name (default "default")



Maybe this option is not listed in the help of the command you wanted use? Can you let me know the command for which you had to look in the source code ?