All Projects → RocketChat → Rocket.chat.apps Cli

RocketChat / Rocket.chat.apps Cli

Licence: mit
The CLI for interacting with Rocket.Chat Apps

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Rocket.chat.apps Cli

Jenkinsfile Runner
A command line tool to run Jenkinsfile as a function
Stars: ✭ 727 (+1864.86%)
Mutual labels:  cli, hacktoberfest
Clifx
Declarative framework for building command line interfaces
Stars: ✭ 900 (+2332.43%)
Mutual labels:  cli, hacktoberfest
Glow
Render markdown on the CLI, with pizzazz! 💅🏻
Stars: ✭ 7,596 (+20429.73%)
Mutual labels:  cli, hacktoberfest
Open Source Mac Os Apps
🚀 Awesome list of open source applications for macOS. https://t.me/s/opensourcemacosapps
Stars: ✭ 28,908 (+78029.73%)
Mutual labels:  apps, hacktoberfest
Swiftinfo
📊 Extract and analyze the evolution of an iOS app's code.
Stars: ✭ 880 (+2278.38%)
Mutual labels:  cli, hacktoberfest
Bat
A cat(1) clone with wings.
Stars: ✭ 30,833 (+83232.43%)
Mutual labels:  cli, hacktoberfest
Schemathesis
A modern API testing tool for web applications built with Open API and GraphQL specifications.
Stars: ✭ 768 (+1975.68%)
Mutual labels:  cli, hacktoberfest
Faas Cli
Official CLI for OpenFaaS
Stars: ✭ 633 (+1610.81%)
Mutual labels:  cli, hacktoberfest
Executor
Watch for file changes and then execute command. Very nice for test driven development.
Stars: ✭ 14 (-62.16%)
Mutual labels:  cli, hacktoberfest
Laminas Cli
Console command runner, exposing commands written in Laminas MVC and Mezzio components and applications
Stars: ✭ 25 (-32.43%)
Mutual labels:  cli, hacktoberfest
Mevn Cli
Light speed setup for MEVN(Mongo Express Vue Node) Apps
Stars: ✭ 696 (+1781.08%)
Mutual labels:  cli, hacktoberfest
Fastlane
🚀 The easiest way to automate building and releasing your iOS and Android apps
Stars: ✭ 33,382 (+90121.62%)
Mutual labels:  apps, hacktoberfest
Backslide
💦 CLI tool for making HTML presentations with Remark.js using Markdown
Stars: ✭ 679 (+1735.14%)
Mutual labels:  cli, hacktoberfest
Terjira
Terjira is a very interactive and easy to use CLI tool for Jira.
Stars: ✭ 713 (+1827.03%)
Mutual labels:  cli, hacktoberfest
Wbot
A simple Web based BOT for WhatsApp™ in NodeJS 😜. Working as of 📅 Feb 14th, 2020
Stars: ✭ 638 (+1624.32%)
Mutual labels:  cli, hacktoberfest
Archisteamfarm
C# application with primary purpose of idling Steam cards from multiple accounts simultaneously.
Stars: ✭ 7,219 (+19410.81%)
Mutual labels:  cli, hacktoberfest
Rustfix
Automatically apply the suggestions made by rustc
Stars: ✭ 586 (+1483.78%)
Mutual labels:  cli, hacktoberfest
Mycroft Skills
A repository for sharing and collaboration for third-party Mycroft skills development.
Stars: ✭ 626 (+1591.89%)
Mutual labels:  apps, hacktoberfest
Mrm
Codemods for your project config files
Stars: ✭ 900 (+2332.43%)
Mutual labels:  cli, hacktoberfest
Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+2362.16%)
Mutual labels:  cli, hacktoberfest

Rocket.Chat Apps CLI

The Rocket.Chat Apps CLI for interacting with Apps.

Getting Started

Extremely simple.

npm install -g @rocket.chat/apps-cli

Rocket.Chat App Development

Logging Inside an App

Due to limitations of NodeJS's vm package we have had to implement a custom logger class. To make usage of this you can use this.getLogger() and then do the normal console style logging.

rc-apps create

The development tools provide a command to quickly scaffold a new Rocket.Chat App, simply run rc-apps create and a new folder will be created inside the current working directory with a basic App which does nothing but will compile and be packaged in the dist folder.

App description

The app description file, named app.json, contains basic information about the app. You can check the app-schema.json file for all the detailed information and fields allowed in the app description file, the basic structure is similar to this:

{
    "id": "5cb9a329-0613-4d39-b20f-cc2cc9175df5",
    "name": "App Name",
    "nameSlug": "app-name",
    "version": "0.0.1",
    "requiredApiVersion": "^1.4.0",
    "description": "App which provides something very useful for Rocket.Chat users.",
    "author": {
        "name": "Author Name <[email protected]>",
        "support": "Support Url or Email"
    },
    "classFile": "main.ts",
    "iconFile": "beautiful-app-icon.jpg"
}

Extending the App class

The basic creation of an App is based on extending the App class from the Rocket.Chat Apps definition library. Your class also has to implement the constructor and optionally the initialize function, for more details on those check the App definition documentation.

import {
    IAppAccessors,
    IConfigurationExtend,
    IEnvironmentRead,
    ILogger,
} from '@rocket.chat/apps-engine/definition/accessors';
import { App } from '@rocket.chat/apps-engine/definition/App';
import { IAppInfo } from '@rocket.chat/apps-engine/definition/metadata';

export class TodoListApp extends App {
    constructor(info: IAppInfo, logger: ILogger, accessors: IAppAccessors) {
        super(info, logger, accessors);
    }

    public async initialize(configurationExtend: IConfigurationExtend, environmentRead: IEnvironmentRead): Promise<void> {
        await this.extendConfiguration(configurationExtend, environmentRead);
        this.getLogger().log('Hello world from my app');
    }
}

Packaging the app

Currently the Rocket.Chat servers and Marketplace allow submission of zip files, these files can be created by running rc-apps package which packages your app and creates the zip file under dist folder.

Uploading the app

For uploading the app you need add to the required parameters in the .rcappsconfig already created in the apps directory. It accepts two types of objects:-

  1. Upload using username, password
{
    url: string;
    username: string;
    password: string;
}
  1. Upload using personal access token and userId
{
    url: string;
    userId: string;
    token: string;
}

Enabling autocomplete for commands

To enable autocomplete for the apps cli use the command rc-apps autocomplete <your-shell-type> with the shell type as zsh or bash as the supported types. This would provide a step by step instruction to enable shell completion in your preferred shell.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].