How to create a login item with 2 urls
Hello,
after recent updates, the --autofill-urls flag stopped working:
[ERROR] 2024/05/08 22:00:18 unknown flag: --autofill-urls,
how can I create 2 urls when creating a new item?
So far I've done it this way in bash
function create_new_item()
{
op item create \
--category "Login" \
--title "$url_project_name [DEV] WP" \
--vault Development \
--generate-password='letters,digits,symbols,30' \
'username=mf-admin' \
--tags "[DEV] WP" \
--autofill-urls "local-env=$PROJECT_URL,development-env=$DEV_URL"
}
1Password Version: 8.10.32
Extension Version: 2.23.3
OS Version: Sonoma 14.4.1
Browser: Chrome
Comments
-
Hey @Maciejf85 , I'm sorry to hear you've run into some troubles setting multiple URLs using the
--autofill-urls
command for the CLI. Thanks for bringing this to our attention!I've taken a look into this and I can also replicate your error. Looking into this further I can see that this flag was added to our beta stream of the 1Password CLI, however it looks like it was never pushed to the stable version of it. With this being said our developers have recently, within the last couple weeks, began to re-look into this flag and are working on including it, or it's functionality, into the stable CLI release at some point in the future.
I've included your request within our internal document regarding pushing this to stable to add a little bit more weight onto it. Keep an eye out on our CLI product updates page as this will be where the
--autofill-urls
flag being added to stable will be mentioned once it is available.Does switching back to the previous version of the 1Password CLI that you were using, when it did previously work for you, restore its functionality?
0 -
I have the same need. I imported a lot of items from Bitwarden. Now, the URLs were created in 1P with all of them munged together comma separated, e.g.
https://mysite1.foo,http://10.20.30.40,https://myotherurl.foo
So the URL matching is not working. This is for 100s of sites, cleaning it up is a nightmare. I can extract the URLs using the CLI and parse it out using
jq
and get a correct array of URLs, but I lack the command to edit the item to correctly replace the current mangled URL with the independent entries.Please help... I am using CLI v2.28.0
0 -
FYI, I was able to solve this using some Bash scripting +
jq
. It took me a few hours but man this is going to save me 1000s of clicks!0 -
@luckman212 I'm having exactly the same issue with a Bitwarden import (the out-of-the-box feature for this didn't work at all). However Bash scripting is not my skillset! Is there any chance you might be able to share the key parts (or all) of your script please?
0 -
@alexangas sure I am happy to share my solution. I'm away until tomorrow but I will try to post it to GitHub when I get back.
0 -
If you can, that would be great. The main thing I am struggling with is the format for multiple URLs and which CLI command to use to fix them. Thanks @luckman212
0 -
Hi @alexangas
I just finished making some adjustments to the script to make it portable. I published it to GitHub: https://github.com/luckman212/1password-csv-fix
Please give it a try and let me know if it works for you! (or any feedback...)
0