Upload files to Slack from the CLI
npm install slackifyUpload files to Slack from your CLI
``sh`
slackify file channel
Or pipe in stdin`sh`
ps -a | slackify channel
Install the slackify package globally from npm``
npm install -g slackify
Obtain a Test OAuth token from Slack's test token generator or create a new Bot under your organization _yourorganization_.slack.com/services/new/bot.
Add an environment variable containing this token
`sh`
export SLACKIFY_TOKEN=xoxp-xxxxxx-xxxxxx-xxxxxslackify -t xoxp-xxxxxx-xxxxxx-xxxxx
Or include it as an option when using slackify
Usage: slackify [options] [file] [channel] Options:
-h, --help output usage information
-V, --version output the version number
-m --message a comment to add to the file
-u --user the user to send the file to
-l --lines .. upload specific lines in a file
-t --token slack token
-tl --tail tail of a file
`#### Send a file to a user
`
slackify file -u user
`#### Pipe stdin to a user
`
ps -a | slackify -u user
`#### Upload specific lines of a file
`
slackify file channel --lines 10..30
`#### Upload the tail of a file
`
slackify error_log support --tail 50
`#### Add a comment with your file
`
slackify file development -m 'uploaded from slackify'
``