Skip to content

edit

Changes one item.

Terminal window
sefy edit <REFERENCE> [OPTIONS]
Option Applies to Meaning
--title <TITLE> all New title.
-t, --text <TEXT> notes New body.
-e, --editor notes Open the current body in $EDITOR.
-l, --login <LOGIN> credentials New login.
--password credentials Prompt for a new account password.
--item-password-env <VAR> credentials Take the new account password from this variable.
-u, --url <URL> credentials New URL.
--totp <SECRET> credentials New TOTP secret.
--notes <TEXT> credentials New notes.
--tag <TAG> all Replace the item’s tags.
--clear-tags all Remove every tag.
Terminal window
$ sefy edit bank --title "bank card"
updated 1

An item’s kind is fixed for its lifetime: a note stays a note. To change kind, add a new item and remove the old one.

Flags meant for another kind are an error rather than a silent no-op:

Terminal window
$ sefy edit bank --login someone
error: this item is a note; --login, --password, --url, --totp and --notes apply to credentials

An edit that would change nothing is an error too, so a mistyped flag cannot look like a successful save:

Terminal window
$ sefy edit "bank card"
error: nothing to change; pass --title, --tag, or a field to edit

--tag sets the item’s tags to exactly what you list — it does not append. To add one tag to an item that has two, name all three.

A tag left on no items disappears from tags by itself; there is nothing to clean up by hand.

--editor opens the current body in $VISUAL, or $EDITOR if that is unset; a value carrying its own arguments (EDITOR="code --wait") works. With none set, sefy says so rather than opening something you did not ask for.

While the editor is open, the note sits in a temporary file in the clear. sefy overwrites and deletes that file as soon as the editor exits, but an editor’s own swap, undo and backup files are its business and outside sefy’s reach. If that matters for a particular note, use --text.

  • add — the fields each kind carries
  • rm — removing an item instead