{"id":13587319,"url":"https://github.com/xwmx/notes-app-cli","last_synced_at":"2025-05-08T18:49:02.305Z","repository":{"id":42560835,"uuid":"257071092","full_name":"xwmx/notes-app-cli","owner":"xwmx","description":"A command line interface for Notes.app on macOS.","archived":false,"fork":false,"pushed_at":"2020-10-07T06:20:03.000Z","size":90,"stargazers_count":51,"open_issues_count":3,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T00:56:12.804Z","etag":null,"topics":["apple","applescript","bash","cli","command-line","macos","note-taking","notes","notes-app"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xwmx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-04-19T18:18:25.000Z","updated_at":"2024-01-31T15:44:24.000Z","dependencies_parsed_at":"2022-08-25T18:40:19.214Z","dependency_job_id":null,"html_url":"https://github.com/xwmx/notes-app-cli","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnotes-app-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnotes-app-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnotes-app-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xwmx%2Fnotes-app-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xwmx","download_url":"https://codeload.github.com/xwmx/notes-app-cli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253133119,"owners_count":21859108,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["apple","applescript","bash","cli","command-line","macos","note-taking","notes","notes-app"],"created_at":"2024-08-01T15:06:09.288Z","updated_at":"2025-05-08T18:49:02.286Z","avatar_url":"https://github.com/xwmx.png","language":"Shell","readme":"# `notes-app` - A Notes.app CLI\n\nA command line interface for Notes.app on macOS.\n**Notes.app access is apparently [broken in 10.15 Calatina](https://github.com/xwmx/notes-app-cli/issues/1)**\nand other versions of macOS, but appears to be working again as of macOS 14 Sonoma.\n\nAdd and edit notes in a text editor with command line support like Vim, Emacs,\nVS Code, Sublime Text, etc. Create, list, view, update, and delete notes using\nsimple terminal commands. Export your notes to text files.\n\n## Quirks and Limitations\n\n- Requires macOS 10.14 Mojave and earlier ([broken in 10.15 Calatina](https://github.com/xwmx/notes-app-cli/issues/1)),\n  or macOS 14 Sonoma and higher.\n- Notes.app must be open. `notes-app` will open it in background if it's\n    not already open.\n- Attachments are not supported. Apple doesn't provide easy access to\n    attachments syned with iCloud. Editing a note that contains\n    an attachment results in the attachment being removed. In order to\n    avoid data loss, `notes-app` does not allow editing or updating notes\n    that have attachments.\n- The formatting of the first line in a note is not preserved. Notes.app treats\n    the first line of a note as the \"name\" of the note and does not allow\n    formatting of this line through AppleScript, while the \"body\" of the note\n    is formatted with HTML. When the note has a blank \"name\" line, the first\n    line of the \"body\" is treated as the name, making any formatting on that\n    line inaccessible to `notes-app`.\n- If a new note is created without a \"name\" specified, Notes.app sets the\n    first line to \"New Note\".\n\nOverall warning: Notes.app data is not fully accessible and some things get\nlost in translation. `notes-app` makes an effort to provide access to the raw\ndata from Notes.app and has a few checks to avoid data issues, but Notes.app\nstill does processing on its end (e.g., adding HTML tags), so expect some\nweirdness when updating and editing existing notes that have a lot of\nformatting.\n\n## Installation\n\n### Homebrew\n\nInstall with [Homebrew](http://brew.sh/):\n\n```bash\nbrew tap xwmx/taps\nbrew install notes-app\n\n```\n\n### Manual\n\nTo install manually, simply download the `notes-app` script:\n\n```bash\n# download with curl\ncurl -LO https://raw.github.com/xwmx/notes-app-cli/master/notes-app \u0026\u0026 chmod +x notes-app\n\n# download with wget\nwget https://raw.github.com/xwmx/notes-app-cli/master/notes-app \u0026\u0026 chmod +x notes-app\n```\n\nThen run `notes-app` with:\n\n```bash\n./notes-app\n```\n\n## Usage\n\n### Help\n\n```text\nNotes.app CLI\n\nA command line interface for Notes.app on macOS.\n\nUsage:\n  notes-app accounts [show \u003caccount\u003e] [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n  notes-app add [\u003cname\u003e] [--account \u003caccount\u003e] [--body \u003cbody\u003e] [--folder \u003cfolder\u003e]\n  notes-app attachments \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                        [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n  notes-app commands\n  notes-app count [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n  notes-app delete \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n  notes-app edit \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n  notes-app export \u003cpath\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                   [--note \u003cnote\u003e]\n\n  notes-app folders [show \u003cfolder\u003e] [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                    [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n  notes-app list [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                 [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n  notes-app show \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e] [--open]\n                 [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n  notes-app update \u003cnote\u003e (--body \u003cbody\u003e | --name \u003cname\u003e) [--account \u003caccount\u003e]\n                   [--folder \u003cfolder\u003e]\n  notes-app -h | --help | help [\u003csubcommand\u003e] [-l | --long]\n  notes-app --version | version\n\nHelp:\n  notes-app help [\u003csubcommand\u003e]\n\nMore Information:\n  https://github.com/xwmx/notes-app-cli\n```\n\n### Subcommands\n\n#### `accounts`\n\n```text\nUsage:\n  notes-app accounts [show \u003caccount\u003e] [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n\nOptions:\n  --properties \u003cprop1\u003e,\u003cprop2\u003e  A comma-separated list of property names to\n                                include in the output. Set to 'all' to include\n                                all properties.\n\nIdentifiers:\n  \u003caccount\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nAvailable Properties:\n  all\n  id\n  name\n\nSubcommands:\n  (default)  List all accounts.\n  show       Show properties of \u003caccount\u003e.\n\nDescription:\n  List accounts or show an account.\n\nExamples:\n  # list accounts by name\n  notes-app accounts\n\n  # list accounts with ids and names\n  notes-app accounts --properties id,name\n\n  # print the id and name of the iCloud account\n  notes-app accounts show \"iCloud\"\n```\n\n#### `add`\n\n```text\nUsage:\n  notes-app add [\u003cname\u003e] [--account \u003caccount\u003e] [--body \u003cbody\u003e] [--folder \u003cfolder\u003e]\n\nOptions:\n  --account \u003caccount\u003e  The account containing the new note.\n  --body    \u003cbody\u003e     Plain text or HTML body content.\n  --folder  \u003cfolder\u003e   The folder containing the new note.\n\nIdentifiers:\n  \u003caccount\u003e and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nDescription:\n  Add a new note. When no arguments are specified, a new blank note file is\n  opened in the terminal editor, as set in the `$EDITOR` environment\n  variable.\n\n  When \u003cname\u003e is specified, the editor is not opened and a new note is created\n  containing the specified \u003cname\u003e as the first line of the note.\n\nNote Format:\n  The format of each note provided by Notes.app consists of:\n    Line  1:     An unformatted string representing the \"Name\" property.\n    Lines 2-end: An HTML formatted body.\n  Within Notes.app the first line can be formatted, but this formatting is not\n  preserved when the note is retrieved or set via AppleScript, so any\n  formatting in this line will likely be lost or inconsistent with what's\n  displayed in Notes.app.\n\n\nExamples:\n  # Open a new note in the editor.\n  notes-app add\n\n  # Create a new note named \"Example name.\" without opening editor.\n  notes-app add \"Example name.\"\n\n # Create a new note with a name and body without opening editor.\n  notes-app add \"Example name.\" --body \"Example body.\"\n```\n\n#### `attachments`\n\n```text\nUsage:\n  notes-app attachments \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                        [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n\nOptions:\n  --account    \u003caccount\u003e        The account containing the note.\n  --folder     \u003cfolder\u003e         The folder containing the note.\n  --properties \u003cprop1\u003e,\u003cprop2\u003e  A comma-separated list of property names to\n                                include in the output. Set to 'all' to include\n                                all properties.\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nAvailable Properties:\n  all\n  id\n  name\n  container\n  contentIdentifier\n\nDescription:\n  List attachments of \u003cnote\u003e idenitied by \u003cid\u003e, \u003cname\u003e, or \u003cnumber\u003e.\n\nExamples:\n  # List attachments of note number 1.\n  notes-app attachments 1\n\n  # List attachment ids of note number 1.\n  notes-app attachments 1 --properties id\n```\n\n#### `count`\n\n```text\nUsage:\n  notes-app count [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n\nDescription:\n  Print the number of notes in \u003cfolder\u003e.\n```\n\n#### `delete`\n\n```text\nUsage:\n  notes-app delete \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n\nOptions:\n  --account \u003caccount\u003e  The account containing the note.\n  --folder  \u003cfolder\u003e   The folder containing the note.\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nDescription:\n  Delete \u003cnote\u003e.\n```\n\n#### `edit`\n\n```text\nUsage:\n  notes-app edit \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n\nOptions:\n  --account    \u003caccount\u003e  The account containing the note.\n  --folder     \u003cfolder\u003e   The folder containing the note.\n\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nDescription:\n  Edit a note idenitied by \u003cid\u003e, \u003cname\u003e, or \u003cnumber\u003e in your terminal editor,\n  as set in the `$EDITOR` environment variable.\n\nNote Format:\n  The format of each note provided by Notes.app consists of:\n    Line  1:     An unformatted string representing the \"Name\" property.\n    Lines 2-end: An HTML formatted body.\n  Within Notes.app the first line can be formatted, but this formatting is not\n  preserved when the note is retrieved or set via AppleScript, so any\n  formatting in this line will likely be lost or inconsistent with what's\n  displayed in Notes.app.\n\nExamples:\n  # Open note number 1 in the editor.\n  notes-app edit 1\n\n  # Open note named \"Todos\" in the editor.\n  notes-app edit Todos\n```\n\n#### `export`\n\n```text\nUsage:\n  notes-app export \u003cpath\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                   [--note \u003cnote\u003e]\n\nOptions:\n  --account    \u003caccount\u003e  The account containing the note.\n  --folder     \u003cfolder\u003e   The folder containing the note.\n  --note       \u003cnote\u003e     A note to export.\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nDescription:\n  Export notes and save in directory at \u003cpath\u003e. By default, all notes in the\n  default account (iCloud) are exported. Use --account,\n  --folder, and --note flags to reduce the scope.\n\n  Attachments are not included in exports. Apple does not provide easy access\n  to attachments synced with iCloud.\n\nNote Format:\n  The format of each note provided by Notes.app consists of:\n    Line  1:     An unformatted string representing the \"Name\" property.\n    Lines 2-end: An HTML formatted body.\n  Within Notes.app the first line can be formatted, but this formatting is not\n  preserved when the note is retrieved or set via AppleScript, so any\n  formatting in this line will likely be lost or inconsistent with what's\n  displayed in Notes.app.\n\nExamples:\n  # Export all notes in the defualt account.\n  notes-app export ~/Documents/Example\n\n  # Export all notes in the folder named \"Example Folder\"\n  notes-app export ~/Documents/Example --folder \"Example Folder\"\n```\n\n#### `folders`\n\n```text\nUsage:\n  notes-app folders [show \u003cfolder\u003e] [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                    [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n\nOptions:\n  --account    \u003caccount\u003e        The account containing the folder.\n  --folder     \u003cfolder\u003e         The parent folder, if any.\n  --properties \u003cprop1\u003e,\u003cprop2\u003e  A comma-separated list of property names to\n                                include in the output. Set to 'all' to include\n                                all properties.\n\nIdentifiers:\n  \u003caccount\u003e and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nAvailable Properties:\n  all\n  id\n  container\n  name\n\nSubcommands:\n  (default)  List folders in the current account or folder.\n  show       Show properties of \u003cfolder\u003e.\n\nDescription:\n  List folders in an account.\n\nExamples:\n  # List all folders in the current account.\n  notes-app folders\n\n  # List all ids of folders in the \"Example\" account.\n  notes-app folders --account Example --properties id\n\n  # Show folder number 1.\n  notes-app folders show 1\n```\n\n#### `list`\n\n```text\nUsage:\n  notes-app list [--account \u003caccount\u003e] [--folder \u003cfolder\u003e]\n                 [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n\nOptions:\n  --account \u003caccount\u003e           The account containing the note.\n  --folder  \u003cfolder\u003e            The folder containing the note.\n  --properties \u003cprop1\u003e,\u003cprop2\u003e  A comma-separated list of property names to\n                                include in the output. Set to 'all' to include\n                                all properties.\n\nIdentifiers:\n  \u003caccount\u003e and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nAvailable Properties:\n  all\n  counter\n  id\n  container\n  passwordProtected\n  creationDate\n  modificationDate\n  name\n  body\n\nDescription:\n  List notes\n\nExamples:\n  # List all notes in the default account.\n  notes-app list\n\n  # List all notes in the account named \"Example\"\n  notes-app list --account Example\n\n  # List all ids of notes in the folder named \"Sample\"\n  notes-app list --folder Sample --properties id\n```\n\n#### `show`\n\n```text\nUsage:\n  notes-app show \u003cnote\u003e [--account \u003caccount\u003e] [--folder \u003cfolder\u003e] [--open]\n                 [--properties \u003cprop1\u003e,\u003cprop2\u003e]\n\nOptions:\n  --account    \u003caccount\u003e        The account containing the note.\n  --folder     \u003cfolder\u003e         The folder containing the note.\n  --open                        Open the note in Notes.app.\n  --properties \u003cprop1\u003e,\u003cprop2\u003e  A comma-separated list of property names to\n                                include in the output. Set to 'all' to include\n                                all properties.\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nAvailable Properties:\n  all\n  id\n  container\n  passwordProtected\n  creationDate\n  modificationDate\n  name\n  body\n\nDescription:\n  Show a note idenitied by \u003cid\u003e, \u003cname\u003e, or \u003cnumber\u003e.\n\nExamples:\n  # Print all properties for the note named \"Shopping List\"\n  notes-app show \"Shopping List\"\n\n  # Print the creationDate of note number 1.\n  notes-app show 1 --properties creationDate\n```\n\n#### `update`\n\n```text\nUsage:\n  notes-app update \u003cnote\u003e (--body \u003cbody\u003e | --name \u003cname\u003e) [--account \u003caccount\u003e]\n                   [--folder \u003cfolder\u003e]\n\nOptions:\n  --account \u003caccount\u003e  The account containing the note.\n  --body    \u003cbody\u003e     The new value for the note body.\n  --folder  \u003cfolder\u003e   The folder containing the note.\n  --name    \u003cname\u003e     The new value for the note name.\n\nIdentifiers:\n  \u003cnote\u003e, \u003caccount\u003e, and \u003cfolder\u003e can be identified with one of the following:\n    id      The Notes.app core data id (starts with 'x-coredata://').\n    name    The name property.\n    number  The current sequence number.\n\nDescription:\n  Update a note.\n\nExamples:\n  # Set the name of note number 1 to \"Example Name\".\n  notes-app update 1 --name \"Example Name\"\n```\n\n## Tests\n\nTo run the [test suite](test), install\n[Bats](https://github.com/bats-core/bats-core) and run `bats test` in the project\nroot.\n\n---\n\u003cp align=\"center\"\u003e\n  Copyright (c) 2020 William Melody • See LICENSE for details.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/xwmx/notes-app-cli\"\u003egithub.com/xwmx/notes-app-cli\u003c/a\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fnotes-app-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxwmx%2Fnotes-app-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxwmx%2Fnotes-app-cli/lists"}