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
3 years agoSetting default section title
With CLI 2 it seems like you cannot set the section title of the default ID less section, but you can change it in the 1password app (and it was possible in cli v1)
During create if you add a sect...
andi_t_1P
1Password Team
3 years agoHi @mkrogh , I have given this a look and it seems you cannot currently do this with the edit functionality of the cli. However, we have a related solution in the works: enabling piping of json input into the op item edit
command. I will take care that this use case is possible in there as well, but I cannot say when this will be out in prod exactly.
For the creation workflow, you could use a json template and specify the label
of the section with a desired title.
op item create --template 'file.json'
file.json:
{
"title": "Real Login",
"tags": ["random", "test"],
"category": "LOGIN",
"sections": [
{
"id": "bt3fx6eqjfpb2yak5f7qrxui7e",
"label": "MYNAME" <-------------------------------------------------------------- field of interest
}
],
"fields": [
{
"id": "username",
"type": "STRING",
"purpose": "USERNAME",
"label": "username",
"value": "username"
},
{
"id": "password",
"type": "CONCEALED",
"purpose": "PASSWORD",
"label": "password",
"value": "password",
"password_details": {
"strength": "TERRIBLE"
}
},
{
"id": "notesPlain",
"type": "STRING",
"purpose": "NOTES",
"label": "notesPlain",
"value": "this is a test login"
},
{
"id": "go3zgbulw5peqqdszei6yyxfd4",
"section": {
"id": "bt3fx6eqjfpb2yak5f7qrxui7e",
"label": "section-1"
},
"type": "STRING",
"label": "url",
"value": "https://1password.com"
},
{
"id": "abxnmtlo2thz5wjatuza4nwo6a",
"section": {
"id": "bt3fx6eqjfpb2yak5f7qrxui7e",
"label": "MYNAME"
},
"type": "EMAIL",
"label": "email",
"value": "wendy.appleseed@1password.com"
},
],
}
Hope this helps,
Andi