Skip to content
Anton C. Swartz IV edited this page Mar 9, 2017 · 4 revisions

Some of these ideas might seem like just ad-hoc microservices. That might suggest using Lambda or a similar alternative. Here's why Cmd.io is better for these:

  • Easier deploy and management
  • Builtin access control
  • Easier conceptual setup
    • CLI tool, instead of library for some particular language
      • Language may or may not be supported by Lambda, et al
  • Easier to use from scripts via SSH
  • Also usable from HTTP / apps
  • Embeddable on pages with WebSocket

Slack notifier

Any off the shelf Slack notification CLI, use env for key. Share access or make tokens. Now shell scripts from anywhere can talk to Slack. Use Run API to make it a tiny web service.

** Note from Anton: This can be done by anyone with a curl request look up slack bot notifications all they do is make a web call.

Pipe file into repo

Editing a file on a public repo requires cloning, editing, adding, committing, pushing, maybe opening PR. On GitHub, you have the GitHub API, which helps. But without that, you could set up a Cmd.io command that works like this:

$ cat myfile | ssh cmd.io git-edit github.com/progrium/myrepo/path/to/myfile "updating my file"

It lets you pipe a file into the repo and it will do all the work. Note that this would probably require SSH key forwarding, which hasn't been added yet to Cmd.

Clone this wiki locally