Archive memos and folders
Archive is a separate lifecycle state, represented by archivedAt. Null or a
missing field means active. Tags remain independent. Archiving keeps content,
shares and project filings; deleting a memo has different
consequences. These commands require CLI 0.97.0+ and a compatible server.
These commands send only {archived: true} or {archived: false} in a metadata
PATCH, with no body revision required. An ID resolves the owner; --namespace
then asserts it. A slug/title lookup includes archived memos and follows catalog
pages; prefer full IDs in scripts because titles can repeat. The server requires permission to
rename the memo, not merely to read its body. Archiving can return 409 if the live
body cannot be safely saved; a failed request does not claim archival succeeded.
--json prints the server's updated memo metadata, including archivedAt.
memos list, memos search, memos grep, and memos list --shared omit archived
memos by default. Pass --include-archived to include both active and archived
memos. Direct reads remain available and do not change archival state.
Folders and saved edits
Folder commands use node IDs and the server's folder write permission. Archiving
a folder hides its subtree from ordinary tree listings without deleting or
individually archiving its children. The listing returns all immediate contents,
including memos and files, with server pagination. --include-archived reveals
archived paths; it does not include deleted records. An explicit recursive
dl download includes retained files beneath archived paths so a full
folder export is not silently incomplete.
A successful saved edit to an archived memo or folder restores it and its archived ancestor folders. Editing a file inside an archived folder restores its folder path as well. Explicit unarchive restores the path too. Independently archived siblings remain archived. Reading, viewing presence, no-op edits and failed saves leave the archive state unchanged. The server owns these rules; clients must not emulate them by recursively clearing unrelated folders.
TypeScript
NoteRow.archivedAt and NodeRow.archivedAt are string | null | undefined to
support older servers. Archive operations remain separate from delete and
from editing methods. Server permission, validation and save failures propagate
as API errors; the SDK does not retry an archive write or convert it into delete.
See the shared API contract for
HTTP and other client interfaces.
Retained inventory compatibility
Starting in 0.97.1, TypeScript nodes.contents(id) and CLI asset listings send
includeArchived: false explicitly for active discovery. TypeScript
nodes.descendants(id) also uses active discovery. For a complete retained
inventory or export, pass {includeArchived: true}; recursive CLI downloads
already do this.
The underlying HTTP /nodes/:id/contents and /nodes/:id/descendants routes
preserve their historical complete-inventory behavior when the flag is omitted,
so older installed download clients do not silently lose archived files. New
browsers should send includeArchived=false; exporters should send
includeArchived=true. Both modes still exclude deleted records.