GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - sendgrid/sendgrid-cli: The SendGrid CLI (Command Line Interface) is a tool that helps you to interact with SendGrid services from the command line.

BranchesTags
Open more actions menu

Latest commit

 

History

54 Commits
54 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
cmds
cmds
 
 
lib
lib
 
 
test
test
 
 
.env_sample
.env_sample
 
 
.eslintrc.js
.eslintrc.js
 
 
.gitignore
.gitignore
 
 
.travis.yml
.travis.yml
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
RETRIEVE_TOKEN.md
RETRIEVE_TOKEN.md
 
 
package-lock.json
package-lock.json
 
 
package.json
package.json
 
 
sendgrid-cli.gif
sendgrid-cli.gif
 
 
sg
sg
 
 

Repository files navigation

SendGrid CLI

The SendGrid CLI (Command Line Interface) is a tool that helps you to interact with SendGrid services from the command line. It is helpful for automating routine tasks. The SendGrid CLI removes the need to write code to perform common management activites of the SendGrid platform like uploading a CSV file and enabling/disabling webhooks.

animated example

Prerequisites

  • SendGrid Account
  • Tested with NodeJS v8.12.0

Installation

  • Clone this project
  • cd sendgrid-cli
  • npm install
  • Rename .env_sample to .env and update the values

A Note on API Key and API Token

In the .env_sample, you will notice two environment variables, SENDGRID_API_KEY and SENDGRID_TOKEN. For certain commands, you will need to use SENDGRID_TOKEN. To learn how to retrieve this token here.

Usage

This command line interface implements a limited set of commands.

  • ./sg list-apikeys: List API keys
  • ./sg subuser-admins: Iterate over all subusers and list all teammates (including role) for each subuser (requires SENDGRID_TOKEN see note above)
  • ./sg contacts upload: Upload contacts from a CSV file (fields: email, first_name, last_name)
  • ./sg webhooks: Manage Event and Inbound Parse webhooks

These will output JavaScript Objects that are human readable.

You can also prepend DEBUG=sg:* for additional debug logging (not much yet).

Debug namespaces:

  • sg:client
  • sg:utils
  • sg:contacts-upload
  • sg:subuser-admins
  • sg:webhooks-add-parse
  • sg:webhooks-disable-event
  • sg:webhooks-enable-event

Todos

  • Pipe from one command into another (need to output JSON strings to stdout)

License

LICENSE

About

The SendGrid CLI (Command Line Interface) is a tool that helps you to interact with SendGrid services from the command line.

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

32 stars

Watchers

86 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.