Signing back into the Community for the first time? You'll need to reset your password to access your account.  Find out more.

Forum Discussion

Former Member's avatar
Former Member
4 years ago

[56] Flag to overwrite `op inject` output to file without prompt

Small request: I'm starting to inject database secrets using the 1password CLI for some of my tools and it would be great if we could overwrite to an existing output file without a user prompt (I'm trying to make most of my scripts non-interactive).

Current behavior:

❯ op inject -i hello -o hola
File hola already exists, overwrite it? [Y/n] Y
/Users/manojkarthick/code/sandbox/hola

Expected behavior

❯ op inject -i hello --force -o hola
/Users/manojkarthick/code/sandbox/hola


1Password Version: 2.0.0-beta.9
Extension Version: Not Provided
OS Version: macOS 12.0.1 21A559 arm64

  • Former Member's avatar
    Former Member

    Hey @smanojkarthick, and thank you for trying out our beta!
    This is indeed a very nice idea, I'm going to open up an issue about adding a --force flag to the inject command.
    Have you noticed any other such things that you'd like to see in the CLI?
    Thank you once again for using our product, and keep the good ideas coming!

    Horia

  • Former Member's avatar
    Former Member

    Hey @smanojkarthick, good news! This feature has just made its way into our latest release. Check it out here or update your CLI to the latest version using op update. Let us know your thoughts!

    Horia

  • Former Member's avatar
    Former Member

    Thanks for implementing this!