{"id":28752957,"url":"https://github.com/rumpelsepp/mnotify","last_synced_at":"2025-06-17T00:05:18.832Z","repository":{"id":39885915,"uuid":"492889391","full_name":"rumpelsepp/mnotify","owner":"rumpelsepp","description":"A matrix cli client","archived":false,"fork":false,"pushed_at":"2024-05-13T16:05:13.000Z","size":598,"stargazers_count":65,"open_issues_count":14,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-19T00:49:11.907Z","etag":null,"topics":["cli","e2ee","matrix","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rumpelsepp.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-16T15:15:30.000Z","updated_at":"2024-10-13T02:26:14.000Z","dependencies_parsed_at":"2024-02-02T10:28:37.105Z","dependency_job_id":"41affe49-ea60-4f22-92c6-35bedea68f15","html_url":"https://github.com/rumpelsepp/mnotify","commit_stats":{"total_commits":115,"total_committers":5,"mean_commits":23.0,"dds":0.09565217391304348,"last_synced_commit":"d43707c14e2c448b2ff94a43c7a67a8c71e2a261"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rumpelsepp/mnotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpelsepp%2Fmnotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpelsepp%2Fmnotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpelsepp%2Fmnotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpelsepp%2Fmnotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumpelsepp","download_url":"https://codeload.github.com/rumpelsepp/mnotify/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumpelsepp%2Fmnotify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260263608,"owners_count":22982742,"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":["cli","e2ee","matrix","rust"],"created_at":"2025-06-17T00:05:18.209Z","updated_at":"2025-06-17T00:05:18.819Z","avatar_url":"https://github.com/rumpelsepp.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mnotify\n\nATTENTION: Currently under development; expect breakage.\n\n`mnotify` is a simple cli for the [matrix](https://matrix.org) chat system.\nIt was developed for the use case of sending notifications from a headless server.\nThe binary is called `mn`.\nThe output is always JSON.\n\n## Build\n\n```\n$ cargo build [--release]\n```\n\n## Get Started\n\nObtain a fresh matrix user account on an arbitrary homeserver.\nIf you need help, checkout the matrix channel [#mnotify:hackbrettl.de](https://matrix.to/#/#mnotify:hackbrettl.de).\n\n### Login (Password)\n\nFirst, create a login.\n\nBe aware to **always** use the complete matrix id including the domain, e.g. `@user:example.org`.\nWithout the `-p` flag, `mn` reads the password from stdin or interactively from the terminal.\n\n```\n$ mn login @user:example.org\n```\n\nThe access token is stored in the system keyring.\nIf you are on a remote machine without a keyring daemon, use the env variable `MN_NO_KEYRING`;\nin this case the sync token will be stored in a file `$XDG_STATE_HOME/mnotify/session.json`.\n\n### SAS Verification\n\nLogin into element (https://app.element.io), setup your account and leave it open.\nPerform a login (as described above).\nYou should see the login in element.\nElement will complain that the new login needs to be verified; start the verification from element.\n\n```\n$ mn verify\n```\n\nCompare the emojis and confirm. Done.\n\n### Send a message\n\n```\n$ mn send -r \"$ROOM_ID\" \"Hello. :)\"\n```\n\nor\n\n```\n$ echo \"Hello. :)\" | mn send -r \"$ROOM_ID\"\n```\n\nor send a file\n\n```\n$ mn send -r \"$ROOM_ID\" --attachment \"cat.jpg\"\n```\n\n### Sync\n\n`--raw` prints the events as they come from the server.\nWithout `--raw` only messages are printed.\n\n```\n$ mn sync --raw\n{\"rooms\":{\"leave\":{},\"join\":{},\"invite\":{}},\"presence\":{},\"account_data\":[],\"to_device_events\":[],\"device_lists\":{},\"device_one_time_keys_count\":{\"signed_curve25519\":50},\"notifications\":{}}\n{\"rooms\":{\"leave\":{},\"join\":{},\"invite\":{}},\"presence\":{\"events\":[{\"type\":\"m.presence\",\"sender\":\"@rumpelsepp:hackbrettl.de\",\"content\":{\"presence\":\"online\",\"last_active_ago\":45984,\"currently_active\":true}},{\"type\":\"m.presence\",\"sender\":\"@develop:hackbrettl.de\",\"content\":{\"presence\":\"online\",\"last_active_ago\":83,\"currently_active\":true}}]},\"account_data\":[],\"to_device_events\":[],\"device_lists\":{},\"device_one_time_keys_count\":{\"signed_curve25519\":50},\"notifications\":{}}\n```\n\n### Technical Stuff\n\n#### Build\n\nSince matrix provides a lot of features, a debug build can be quite large (see [#18](https://github.com/rumpelsepp/mnotify/issues/18)).\nIn order to reduce the binary size, consider a `--release` build, or try [LTO](https://doc.rust-lang.org/cargo/reference/profiles.html#lto).\nYou can also try out the feature `native-tls` which let `mn` use the system TLS library.\n\n#### Environment Variables\n\n##### `HTTPS_PROXY`\n\nUse this proxy to proxy all matrix requests.\nOnly http proxies are supported.\n\n##### `MN_INSECURE`\n\nDisable TLS verification.\n\n##### `MN_NO_KEYRING`\n\n`mnotify` uses the system keyring using the [Secret Service API](https://specifications.freedesktop.org/secret-service/latest/).\nIf that is not desired, this variable can be set to disable the usage of the system keyring.\nInstead a file `session.json` will be used for storing secrets.\nI hope, you know what you're doing, be warned!\n\n##### `MN_META_FILE`\n\nOverwrite the path to `meta.json` (see below).\n\n#### Files\n\n`mnotify` conforms to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html).\n\n##### `$XDG_STATE_HOME/mnotify/meta.json`\n\nStoring required meta information for the current session, such as the user.\n\n##### `$XDG_STATE_HOME/mnotify/$USER_ID/session.json`\n\nUsed for storing secrets if `$MN_NO_KEYRING` is set.\n\n##### `$XDG_STATE_HOME/mnotify/$USER_ID/state.$EXT`\n\nThe state store, for e.g. E2EE keys or similar.\n`$EXT` is the used database system; currently `sled` is used.\nHowever, the matrix-sdk authors are switching to `sqlite`, so this might change.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumpelsepp%2Fmnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumpelsepp%2Fmnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumpelsepp%2Fmnotify/lists"}