{"id":18297674,"url":"https://github.com/kurusugawa-computer/slack-primitive-cli","last_synced_at":"2026-01-06T16:12:34.727Z","repository":{"id":37960585,"uuid":"261950377","full_name":"kurusugawa-computer/slack-primitive-cli","owner":"kurusugawa-computer","description":"Executing Slack web api methods from command line.","archived":false,"fork":false,"pushed_at":"2024-08-01T15:43:42.000Z","size":131,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-20T04:40:14.366Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kurusugawa-computer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T04:36:22.000Z","updated_at":"2024-05-13T05:49:32.000Z","dependencies_parsed_at":"2024-05-13T05:29:01.077Z","dependency_job_id":"a1aaafd5-039b-412a-ae34-937f7b0ea2d8","html_url":"https://github.com/kurusugawa-computer/slack-primitive-cli","commit_stats":null,"previous_names":["yuji38kwmt/slack-primitive-cli"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Fslack-primitive-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Fslack-primitive-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Fslack-primitive-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kurusugawa-computer%2Fslack-primitive-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kurusugawa-computer","download_url":"https://codeload.github.com/kurusugawa-computer/slack-primitive-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245568570,"owners_count":20636803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T15:03:51.181Z","updated_at":"2026-01-06T16:12:34.687Z","avatar_url":"https://github.com/kurusugawa-computer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# slack-primitive-cli\n[![Build Status](https://app.travis-ci.com/kurusugawa-computer/slack-primitive-cli.svg?branch=main)](https://app.travis-ci.com/kurusugawa-computer/slack-primitive-cli)\n[![PyPI version](https://badge.fury.io/py/slack-primitive-cli.svg)](https://badge.fury.io/py/slack-primitive-cli)\n[![Python Versions](https://img.shields.io/pypi/pyversions/slack-primitive-cli.svg)](https://pypi.org/project/slack-primitive-cli/)\n\n`slack-primitive-cli` can execute [Slack web api methods](https://api.slack.com/methods) from command line.\nCommand line argument is correspont to web api arguments, so `slack-primitive-cli` is **primitive**.\n\n\n# Requirements\n* Python 3.8.1+\n\n# Install\n\n```\n$ pip install slack-primitive-cli\n```\n\nhttps://pypi.org/project/slack-primitive-cli/\n\n\n# Usage\n\n## Sending a message\n\n```\n$ slackcli chat.postMessage --token xoxb-XXXXXXX --channel \"#random\" --text hello\n\n$ export SLACK_API_TOKEN=xoxb-XXXXXXX\n$ slackcli chat.postMessage  --channel \"#random\" --text hello\n```\n\n\n```\n$ slackcli chat.postMessage --help\n\nUsage: slackcli chat.postMessage [OPTIONS]\n\n  Sends a message to a channel. See\n  https://api.slack.com/methods/chat.postMessage\n\nOptions:\n  --token TEXT               Authentication token. If not specified, refer\n                             `SLACK_API_TOKEN` environment variable.\n                             [required]\n\n  --channel TEXT             Channel, private group, or IM channel to send\n                             message to. Can be an encoded ID, or a name. See\n                             below for more details.  [required]\n\n  --text TEXT                How this field works and whether it is required\n                             depends on other fields you use in your API call.\n                             [required]\n\n  --as_user BOOLEAN          Pass true to post the message as the authed user,\n                             instead of as a bot.\n\n  --attachments TEXT         A JSON-based array of structured attachments,\n                             presented as a URL-encoded string.\n\n  --blocks TEXT              A JSON-based array of structured blocks,\n                             presented as a URL-encoded string.\n\n  --icon_emoji TEXT          Emoji to use as the icon for this message.\n                             Overrides icon_url. Must be used in conjunction\n                             with as_user set to false, otherwise ignored. See\n                             authorship below.\n\n  --icon_url TEXT            URL to an image to use as the icon for this\n                             message. Must be used in conjunction with as_user\n                             set to false, otherwise ignored. See authorship\n                             below.\n\n  --link_names BOOLEAN       Find and link channel names and usernames.\n  --mrkdwn BOOLEAN           Disable Slack markup parsing by setting to false.\n  --parse BOOLEAN            Change how messages are treated.\n  --reply_broadcast BOOLEAN  Used in conjunction with thread_ts and indicates\n                             whether reply should be made visible to everyone\n                             in the channel or conversation.\n\n  --thread_ts TEXT           Provide another message's ts value to make this\n                             message a reply. Avoid using a reply's ts value;\n                             use its parent instead.\n\n  --unfurl_links BOOLEAN     Pass true to enable unfurling of primarily text-\n                             based content.\n\n  --unfurl_media BOOLEAN     Pass false to disable unfurling of media content.\n  --username TEXT            Set your bot's user name. Must be used in\n                             conjunction with as_user set to false, otherwise\n                             ignored.\n\n  --help                     Show this message and exit.\n\n```\n## Uploading files\n\n```\n$ slackcli files.upload --channels \"#random\" --file foo.txt\n```\n\n```\n$ slackcli files.upload  --help\nUsage: slackcli files.upload [OPTIONS]\n\n  Uploads or creates a file. See https://api.slack.com/methods/files.upload\n\nOptions:\n  --token TEXT                    Authentication token. If not specified,\n                                  refer `SLACK_API_TOKEN` environment\n                                  variable.  [required]\n\n  --channels TEXT                 Comma-separated list of channel names or IDs\n                                  where the file will be shared.  [required]\n\n  File contents: [mutually_exclusive, required]\n    --file TEXT                   File contents via multipart/form-data. If\n                                  omitting this parameter, you must submit\n                                  content.\n\n    --content TEXT                File contents via a POST variable. If\n                                  omitting this parameter, you must provide a\n                                  file.\n\n  --filename TEXT                 Filename of file.\n  --filetype TEXT                 A file type identifier. See also\n                                  https://api.slack.com/types/file#file_types\n                                  .\n\n  --initial_comment TEXT          The message text introducing the file in\n                                  specified channels.\n\n  --thread_ts TEXT                Provide another message's ts value to upload\n                                  this file as a reply.\n\n  --title TEXT                    Title of file.\n\n```\n\n# Supported web api methods.\n`slack-primitive-cli` supports a few web api methods.\n\n* [chat.delete](https://api.slack.com/methods/chat.delete)\n* [chat.postMessage](https://api.slack.com/methods/chat.postMessage)\n* [files.delete](https://api.slack.com/methods/files.delete)\n* [files.upload](https://api.slack.com/methods/files.upload)\n\n# Additional\n\n## Shell Completion\n`slack-primitive-cli` depends on [click](https://click.palletsprojects.com/en/7.x/), so `slack-primitive-cli` can provide tab completion.\nBash, Zsh, and Fish are supported\n\nIn order to activate shell completion, you need to execute the following script.\n\n```\n$ eval \"$(_SLACKCLI_COMPLETE=source slackcli)\"\n```\n\n\nSee [here](https://click.palletsprojects.com/en/7.x/bashcomplete/) for details.\n\n\n# Usage for Developer\nRefer to https://github.com/kurusugawa-computer/slack-primitive-cli/blob/main/README_for_developer.md .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurusugawa-computer%2Fslack-primitive-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkurusugawa-computer%2Fslack-primitive-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkurusugawa-computer%2Fslack-primitive-cli/lists"}