Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a default datastore path when not provided #74

Closed
bradlarsen opened this issue Aug 23, 2023 · 0 comments
Closed

Use a default datastore path when not provided #74

bradlarsen opened this issue Aug 23, 2023 · 0 comments
Labels
enhancement New feature or request ux Related to the user experience, invocation, or CLI
Milestone

Comments

@bradlarsen
Copy link
Collaborator

Currently you have to explicitly specify the datastore to most Nosey Parker commands. For example, to scan something, you have to say noseyparker scan -d DATASTORE SOME_INPUT, and to report findings, you have to say noseyparker report -d DATASTORE.

It can be a hassle to keep specifying the datastore over and over. Additionally, the -d/--datastore argument must be given after the subcommand name, which complicates command-line editing. For example, to scan and then report, you first run scan, then go to your previous command in shell history to change the subcommand to report, but you have to edit within the line, rather than being able to move the cursor to scan, deleting until end of line, and typing report.

You can kind of work around this hassle at present by setting the NP_DATASTORE=DATASTORE environment variable, which lets you get away with saying just noseyparker scan SOME_INPUT and noseyparker report.

It would be nicer if Nosey Parker would choose a default datastore name if it is not explicitly specified. The proposal is this:

  • Use a default value of datastore.np for the datastore
  • To avoid a UX hazard of accidentally polluting an existing datastore, modify the scan command so that if no datastore is explicitly given via -d/--datastore or the NP_DATASTORE environment variable — i.e., the default datastore path is used — and the datastore already exists, exit with an error
@bradlarsen bradlarsen added enhancement New feature or request ux Related to the user experience, invocation, or CLI labels Aug 23, 2023
@bradlarsen bradlarsen added this to the v0.15.0 milestone Aug 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux Related to the user experience, invocation, or CLI
Projects
None yet
Development

No branches or pull requests

1 participant