A command-line interface for GroupMe messaging, built with TypeScript.
- List groups and direct message conversations
- Read messages from groups with pagination
- Send messages to groups
- Send direct messages to users
- Config file support for storing API token
git clone https://github.com/cuuush/groupme-cli
cd groupme-cli
npm install
npm run build
npm link # Makes 'groupme' command available globallynpx groupme-cli <command>- Go to dev.groupme.com
- Log in with your GroupMe account
- Click "Access Token" to get your personal access token
groupme config --token YOUR_ACCESS_TOKENThis saves your token to ~/.config/groupme/config.json.
Alternatively, you can:
- Use the
--tokenflag with each command - Set the
GROUPME_TOKENenvironment variable
groupme megroupme groups
groupme groups --json # Output as JSONgroupme chats
groupme chats --page 2 --per-page 10# Get latest 20 messages
groupme read --group GROUP_ID
# Get more messages
groupme read --group GROUP_ID --limit 50
# Pagination (load older messages)
groupme read --group GROUP_ID --before MESSAGE_ID
# Output as JSON
groupme read --group GROUP_ID --jsongroupme send --group GROUP_ID --message "Hello, world!"groupme dm-read --user USER_ID
groupme dm-read --user USER_ID --before MESSAGE_ID # Paginationgroupme dm --user USER_ID --message "Hello!"groupme config --show| Command | Description |
|---|---|
config |
Configure CLI (save API token) |
me |
Show current user info |
groups |
List groups you belong to |
chats |
List direct message conversations |
read |
Read messages from a group |
send |
Send a message to a group |
dm-read |
Read direct messages with a user |
dm |
Send a direct message to a user |
All commands support these options:
--token <token>- Override configured API token--json- Output results as JSON (where applicable)--help- Show help for command
# Install dependencies
npm install
# Build TypeScript
npm run build
# Watch mode for development
npm run dev
# Run the CLI
npm start -- <command>
# or
node dist/index.js <command>groupme-cli/
├── src/
│ ├── index.ts # CLI entry point
│ ├── api.ts # GroupMe API wrapper
│ ├── config.ts # Configuration management
│ ├── types.ts # TypeScript type definitions
│ └── commands/ # Command implementations
│ ├── index.ts
│ ├── config.ts
│ ├── groups.ts
│ └── messages.ts
├── dist/ # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md
ISC