npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

termivolt

v0.6.0

Published

A simple utility to interact with the Revolt API via the command line.

Downloads

13

Readme

Termivolt

A simple utility to interact with the Revolt API via the command line.

Installation

Termivolt requires Node v18 or later. You can install Termivolt via the following methods:

npm

npm i -g termivolt

Yarn

yarn global add termivolt

Yarn 2+ doesn't support global installs, but you can run Termivolt as a "one-time" command with yarn dlx:

yarn dlx termivolt <command, eg -help>

(Note that you'll have to append yarn dlx every time you want to use Termivolt with this method.)

pnpm

pnpm add termivolt --global

Development

Make sure you've got Node and Corepack set up.

Clone the repository, then open the project folder and run the following commands:

yarn install
yarn build
npm link

Usage

Required arguments are in <angle brackets>, while optional arguments are in [square brackets].

Global arguments

Aside from the help command, the following arguments are required for all commands:

  • --user/--bot determines whether the token is a bot or session token. These require different methods of authentication.
  • The token is provided as-is (i.e. as copied from Revolt). Bot tokens can be found in your bot settings page - to get session tokens, follow this guide.

In addition, you can optionally specify a custom API URL (e.g. https://api.myrevoltinstan.ce). This should be the last argument and in quotes. This is not required if you're using the official Revolt instance (https://revolt.chat).

Interactive usage (-interactive)

Termivolt can be used interactively, allowing you to quickly view and send messages. To do so, run termivolt -interactive. Here's the full list of arguments:

termivolt -interactive <(--user/--bot)> <token> [custom API URL]

Sending messages (-send)

To send messages with Termivolt, run termivolt -send. Here's the full list of arguments:

termivolt -send <(--user/--bot)> <token> <channel id (in quotes)> <message content (in quotes)> [custom API URL]

Arguments

In addition to the required arguments:

  • The channel ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the channel's entry on the channel list and selecting "Copy channel ID".
  • The message itself should be fully encased in double quotes - if you want to use double quotes in the message itself, escape them with a backslash. Note that message formatting may be messed up in some cases - I'm still investigating as to why, but it seems backticks and \newlines break.

Use Termivolt as a TUI (-interactive)

To use Termivolt as an interactive client, run termivolt -interactive. Here's the full list of arguments:

termivolt -interactive <(--user/--bot)> <token> [custom API URL]

Arguments

Aside from the required arguments, this command does not take any extra arguments since, as the name suggests, it's designed for interactive use.

Fetching messages (-fetch)

To fetch messages with Termivolt, run termivolt -fetch. Here's the full list of arguments:

termivolt -send <(--user/--bot)> <token> <channel id (in quotes)> [amount of messages to send] [custom API URL]

Arguments

In addition to the required arguments:

  • The channel ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the channel's entry on the channel list and selecting "Copy channel ID".
  • If specified, the amount should be provided as a standard number - the maximum amount of messages you can fetch is 100, and the default is 10.

Archiving messages (-archive)

To archive messages with Termivolt, run termivolt -archive. Here's the full list of arguments:

termivolt -archive <(--user/--bot)> <token> <channel id (in quotes)> [custom API URL]

Arguments

In addition to the required arguments:

  • The channel ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the channel's entry on the channel list and selecting "Copy channel ID".

Kicking users (-kick)

To kick members from servers with Termivolt, run termivolt -kick. Note that you'll need the Kick Members permission - if you get a 403 error, this might be why. Here's the full list of arguments:

termivolt -kick <(--user/--bot)> <token> <server id (in quotes)> <user id (in quotes)> [custom API URL]

Arguments

In addition to the required arguments:

  • The server ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the server's entry on the server list and selecting "Copy server ID".
  • The user ID should also be provided as a string.

Banning users (-ban)

To ban members from servers with Termivolt, run termivolt -ban. Note that you'll need the Ban Members permission - if you get a 403 error, this might be why. Here's the full list of arguments:

termivolt -ban <(--user/--bot)> <token> <server id (in quotes)> <user id (in quotes)> [custom API URL]

Arguments

In addition to the required arguments:

  • The server ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the server's entry on the server list and selecting "Copy server ID".
  • The user ID should also be provided as a string.

Removing users from a group DM (-rmfromgroup)

To remove users from a group DM with Termivolt, run termivolt -rmfromgroup. Note that you need to own the group - if you get a 403 error, this might be why. Here's the full list of arguments:

termivolt -rmfromgroup <(--user/--bot)> <token> <group id (in quotes)> <user id (in quotes)> [custom API URL]

Arguments

In addition to the required arguments:

  • The group ID should be provided as a string (i.e. in quotes). You can find it in the URL when using Revite (the official Revolt client) or by right-clicking the groups's entry on the DM list and selecting "Copy server ID".
  • The user ID should also be provided as a string.

Help (-help)

If you need help, or want to see a list of commands, run termivolt -help. This will also show you what version of Termivolt you're using, which is useful for bug reports and such.

Support

If you want to report a bug, suggest a feature or get help with using Termivolt, you can open an issue or join Termivolt's support server on Revolt.