Level up your business security with free, on-demand training and certification. Explore 1Password Academy today →
Forum Discussion
mjktfw
7 months agoNew Contributor
How to get/set url/webiste autofill behaviour through CLI
Hello,
I'd like to kindly ask if 1password CLI allows to get or set "autofill behaviour" attribute assigned to a specific website/url.
I didn't find such information in documentation, only a brief entry concerning attributes of fields other than website: https://developer.1password.com/docs/cli/secret-reference-syntax/#field-and-file-metadata-attributes
I've tried `op read` and `op item get` with no success:
$ op read op://my-vault/my-entry/website?attribute=behaviour
[ERROR] 2025/10/22 14:23:23 could not read secret 'op://my-vault/my-entry/website?attribute=behaviour': unknown query parameter value 'behaviour' for key 'attribute'. Supported values for this key are: value, type, title, id, designation, otp$ op item get my-entry --format json | jq .urls
[ { "label": "website", "primary": true, "href": "https://www.example.com/" } ]
2 Replies
- br8dyNew Contributor
+1 It would be helpful to be able to create or edit items with an autofill policy defined. I often create login items at different subdomains (example: foo.lndo.site, bar.lndo.site) using an https://developer.1password.com/docs/cli/reference/management-commands/item#item-template. Having the ability to present the autofill behavior to 'only fill on this exact host,' would reduce the clutter when autofilling in the browser UI. I could imagine the create command working like the following, with ['exact', 'host', 'never'] as possible options.
op item create --category=login --title='My Example Item' --vault='Test' \ --url https://www.acme.com/login \ --autofill 'exact'{ "title": "Example Login", "category": "LOGIN", "urls": [ { "label": "Lando", "href": "https://foo.lndo.site/", "autofill": "exact" } ] }- markusedenNew Contributor
I would really love to see such an cli addition, since our users constantly create accounts on our saas without exact filling and we see every day new entries for wrong subdomains. This would enable us to have a cronjob to get and update wrong entries every other hour.