any-edit - Edit Anytype document in external editor
any-edit exports an Anytype document (page, note, task, or other object type) to a markdown file, opens the file in an editor, then, after the editor quits, the updated document is imported into Anytype. Using a Raycast extension (script included), a hotkey triggers "edit this page in external editor".
Platform compatibility
Tested only on macos.
The Raycast extension and hotkey to query the desktop app for the current page only work on macos. The other operations: exporting anytype object to markdown, and updating an object from a markdown file, should work on other platforms. However, if you just need a general export/import tool for anytype objects, check out anyr.
Quick setup
Install
Authenticate
Ensure anytype desktop app is running on the current machine.
# check authentication status
Commands
# View commands and options
# Export a page (or other object type) with markdown
# Import markdown file with changes. The file header containing space_id and markdown_id must be present.
# If the document name or markdown body changed, the changes are sent to Anytype.
# Export a document, open it in editor, wait for editor to close, then import changes
# Ask Anytype desktop for the current document id, export, open in editor, and import changes
# Get "Deep-link" url to current document
Accessibility Permissions
any-edit needs permission to send keystrokes to the Anytype desktop application. You may see a system prompt that "PROGRAM would like to control this computer using accessibility features". Depending on how it is invoked, "PROGRAM" may be any-edit, Raycast, or your terminal program (such as WezTerm or Terminal). Permissions can be enabled in System Settings -> Privacy and Security -> Accessibility.
Raycast setup and troubleshooting
See scripts/README.md for Raycast setup, editor configuration, and diagnostics.