Code Monkey home page Code Monkey logo

matrix-cli's Introduction

Maintainability Build Status

Matrix-cli

Console util to work with Matrix

Install

$ npm i -g matrix-mobitel-cli
$ matrix-cli

or just run once with npx:

$ npx matrix-mobitel-cli

How it works

Enter your domain in matrix, user name and password. Then choose expected action.

Get room info

If you select this case, you will see info with amount about:

  • all rooms
  • rooms with only you with many messages
  • rooms with only you with no messages
  • rooms with more than one member with many messages
  • rooms with more than one member with no messages

Get room id by alias

Input room alias part. For example in #room_part:matrix.your-domain you should print room_part. If room exists in your domain, you will see room id. And if not found info about it.

Leave by no activity

Select period with no activity. From all rooms you get select which you're gonna leave, there is an "all" as parameter. Then confirm or leave this action. Next you can see how you leave it.

Leave empty

If you have rooms where you don't ever have at least one message and only one user inside is you, then it helps you to leave all of them at once. You can choose save all of them to a file after leaving, if you choose this after finish.

Leave all rooms with some user (for example - bot)

Choose person you don't want to be with. Next - select rooms where he has been joined too and leave them. You can choose save all of them to a file after leaving, if you choose this after finish.

Invite

Select rooms you need to invite in. Select user from your freinds you want to invite. Then confirm or leave this action. Next you can see how you invite user in.

Send

Select rooms you need to send message to. Input message you want to send. Then confirm or leave this action. Next you can see how you send message.

Stop

Helps to leave from menu. The same as ctrl+c

Use as script to send message with options

git clone [email protected]:grigori-gru/matrix-cli.git
npm i
npm run start -d <your domain> -u <your username> -p <your password> -r <matrix-room name (only occurrence enough)>  -m <message>

or use options in .env:

DOMAIN="example.com"
USERNAME="test_user"
PASSWORD="password"

and this next:

npm run start -r <matrix-room name>  -m <message>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.