Skip to content

๐Ÿ”ฎ Essential packages to build, release, and run great software in the cloud - bots, cards, containers, analytics and more!

License

Notifications You must be signed in to change notification settings

CiscoDevNet/essentials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

220 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Essentials

Essential packages to build, release, and run great software.

lerna Contributor Covenant

Example

// Create a Webex bot with Botkit.

const { Botkit } = require("botkit");
const { WebexAdapter } = require("botbuilder-adapter-webex");

const adapter = new WebexAdapter({
  access_token: "<BOT_ACCESS_TOKEN>",
  public_address: "<BOT_URL>",
  secret: "<BOT_SECRET>",
});

const controller = new Botkit({
  adapter,
  webhook_uri: "/api/messages",
});

// Use the product analytics middleware. ๐Ÿ‘‡

const { Analytics } = require("@cisco/bot-middleware");

const analyticsMiddleware = new Analytics("<ANALYTICS_API_KEY>");
controller.middleware.receive.use(analyticsMiddleware.trackUserMessage);
controller.middleware.send.use(analyticsMiddleware.trackBotMessage);

Now basic properties from all messages are automatically โœจ sent to analytics, including:

  • message ID
  • message time
  • sender's domain, e.g., cisco.com
  • if the conversation is one-on-one or in a group
  • more!

Installation

Clone this repository.

Install its dependencies with uv.

cd essentials
uv sync --all-packages

Git Hooks

Install the pre-commit hooks to run linters and security checks automatically.

uv run pre-commit install --hook-type pre-push
uv run pre-commit install

This sets up two hooks:

  • pre-commit โ€” trailing whitespace, EOF fixer, YAML/JSON/TOML checks, merge conflict detection, debug statements.
  • pre-push โ€” Ruff (lint + format), Pylint + perflint, Bandit (security), TruffleHog (secrets).

TruffleHog must be installed separately:

brew install trufflehog

License

Apache 2.0

About

๐Ÿ”ฎ Essential packages to build, release, and run great software in the cloud - bots, cards, containers, analytics and more!

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors