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

tela-cli

v1.0.2

Published

Command line interface for the Tela Framework

Downloads

21

Readme

TELA CLI

Tela CLI is eases interaction with a Tela Server from the command line.

Installation

NPM

Tela CLI is a Node application and can be installed directly from npm:

npm install -g tela-cli

Then, you should be able to execute:

tela-cli --help

Manual Installation

Assuming that we are inside the folder of the application, we just have to install the project with npm:

npm install

Then, we are ready to use the CLI tool:

node /bin/cli --help

Connection to a Tela Server

Connection

In order to create a connection with our Tela Server, execute:

tela-cli connect <host> [<port>]

For example, using the public server:

tela-cli connect tela.herokuapp.com

This command will create a session in the server, and write it into a .tela file, which stores the details of the connection.

Disconnection

Disconnection from the Tela Server can be achieve by executing:

tela-cli disconnect

This will delete the session from the server, as well as all its associated tokens.

Executing Actions

Actions can be executed with the execute command:

tela-cli execute <module> <action> [<param1>=<value1> [<param2>=<value2> ...]]

The result is printed into the system output, encoded as JSON. This allows to use the Tela CLI along with console commands. For example, save the results into a file:

tela-cli execute <module> <action> > result.txt

Or format the JSON output:

tela-cli execute <module> <action> | jq

Scheduling

Schedule an Action

In order to schedule an action, execute the schedule command, followed by the delay of execution (in seconds) and the same arguments than the execute command:

tela-cli schedule <delay> <module> <action> [<param1>=<value1> [<param2>=<value2> ...]]

The information of the scheduled task, as well as the result of its execution, will be outputted to the console.

Get the Scheduled Actions

It is possible to retrieve all the actions that the authorized user has scheduled, by running:

tela-cli scheduled

Cancel Scheduled Action(s)

It is possible to stop the scheduled execution of an action using the cancel command:

tela-cli cancel (<scheduled_action_id> | all)

If an ID is provided, only that action will be cancelled. In case all is supplied, all the actions scheduled by the authorized user will be cancelled.

Help

To obtain all the available modules and actions configured in the Tela Server we are connected to, execute:

tela-cli help

Or, just for a certain module:

tela-cli help <module>

Note: the help command returns all the modules and actions configured within the Tela Server. Some of them might not be supported in this CLI tool.

Modules

Configuring Modules

Modules might have specific properties which can be configured, by executing:

tela-cli configure <module> <property> <value>

Linking & Unlinking Modules

Linking a module is the process of obtaining an access token for it, and storing it in our Tela session. This process is only needed if the module requires a token.

tela-cli link <module>

On the other hand, the unlink command deletes the module token from the session:

tela-cli unlink <module>

Supported Modules

Instagram

The Instagram module requires the configuration properties clientId and clientSecret, which can be obtained creating an Instagram Application, with the redirect URI http://127.0.0.1:8082.

Setting Up
tela-cli connect <host> <port>
tela-cli configure instagram clientId <client_id>
tela-cli configure instagram clientSecret <client_secret>
tela-cli link instagram
Executing Actions

Once the Instagram module has been set up, you can execute actions with:

tela-cli execute instagram <action> [<param1>=<value1> [<param2>=<value2> ...]]

For example:

# Obtain info about the logged user
tela-cli execute instagram self

# Search a user
tela-cli execute instagram user username=themedizine

Twitter

The Instagram module requires the configuration properties apiKey and apiSecret, which can be obtained creating a Twitter Application, with the redirect URI http://127.0.0.1:8082.

Setting Up
tela-cli connect <host> <port>
tela-cli configure twitter apiKey <api_key>
tela-cli configure twitter apiSecret <api_secret>
tela-cli link twitter
Executing Actions

Once the Twitter module has been set up, you can execute actions with:

tela-cli execute twitter <action> [<param1>=<value1> [<param2>=<value2> ...]]

For example:

# Obtain info about the logged user
tela-cli execute twitter self