A powerful command-line interface for Instagram that brings the full Instagram experience to your terminal. This CLI provides comprehensive Instagram functionality through simple terminal commands, including real-time messaging, group management, and live chat features.
- π Account Registration - Create new Instagram accounts without mobile app
- π Secure Authentication - Login with persistent session management
- π¬ Direct Messaging - Send messages to any Instagram user or group
- π₯ Group Messaging - Send messages to Instagram groups by name
- π΄ Live Chat - Real-time conversation mode with any user
- π¬ Interactive Chat - Chat with users directly from CLI with real-time message display
- π Thread Management - List and view all your Instagram conversations
- πΈ Content Publishing - Upload photos to feed and stories
- π€ Social Interactions - Follow/unfollow users, like posts, add comments
- π Content Discovery - Browse your feed, search users and hashtags
- π₯ Multi-Account Support - Manage multiple Instagram accounts
- β‘ Rate Limiting Protection - Built-in safeguards against Instagram limits
- π Cross-Platform - Works on Windows, macOS, and Linux
- π¨ Beautiful Interface - Colorful output with loading spinners
- π Session Management - View active sessions and account status
Install globally via npm:
npm install -g instagram-clii- Login to your Instagram account:
instagram-cli login your_username your_password- Check your status:
instagram-cli status- View your conversations:
instagram-cli threads- Start a live chat:
instagram-cli chat usernameThat's it! You're ready to use Instagram from the command line.
instagram-cli register <username> <email> <password> [options]
instagram-cli register <username> <phone> <password> [options]Create a new Instagram account directly from the CLI without needing the mobile app.
Examples:
# Register with email
instagram-cli register johndoe john@example.com mypassword123
# Register with phone number
instagram-cli register johndoe +1234567890 mypassword123
# Register with additional options
instagram-cli register johndoe john@example.com mypassword123 --fullname "John Doe" --birthday "1990-01-01"Options:
--fullname <name>- Full name for the profile--birthday <date>- Birthday in YYYY-MM-DD format--gender <gender>- Gender (male/female/prefer_not_to_say)--verify- Enable phone/email verification during registration--profile-pic <path>- Upload profile picture during registration
Supported Registration Methods:
- β Email-based registration
- β Phone number-based registration
- β Automatic verification handling
- β Profile customization during setup
- β Bypass mobile app requirement
instagram-cli login <username> <password>Login to your Instagram account. Sessions are automatically saved for future use.
Example:
instagram-cli login johndoe mypassword123instagram-cli logout [username]
instagram-cli logout --allLogout from a specific account or all accounts.
Examples:
instagram-cli logout johndoe # Logout specific user
instagram-cli logout # Logout current user (interactive)
instagram-cli logout --all # Logout all accountsinstagram-cli statusDisplay current login status and active sessions.
instagram-cli send <username> <message>Send a direct message to any Instagram user.
Examples:
instagram-cli send johndoe "Hello! How are you?"
instagram-cli send @instagram "Love your posts!"instagram-cli send <groupName> <message> --group
instagram-cli group-send <groupName> <message>Send a message to an Instagram group by name (supports partial matching).
Examples:
instagram-cli send "My Friends" "Hello everyone!" --group
instagram-cli group-send "Work Team" "Meeting at 3 PM"
instagram-cli send "Family" "Happy birthday!" -ginstagram-cli chat <username>Start an interactive chat session with real-time messaging. Type messages and press Enter to send.
Examples:
instagram-cli chat johndoe
instagram-cli chat @instagramChat Commands:
- Type any message and press Enter to send
- Type
/exitor/quitto leave the chat - Type
/helpfor available commands - Use Ctrl+C to force exit
instagram-cli live-chat <username>Start a live chat session that automatically displays new incoming messages in real-time.
Examples:
instagram-cli live-chat johndoe
instagram-cli live-chat @bestfriendLive Chat Features:
- Real-time message updates every 2 seconds
- Shows both sent and received messages
- Timestamps for all messages
- Auto-scrolling to latest messages
- Type
/exitto quit
instagram-cli threads [limit]
instagram-cli threads --limit <number>List all your Instagram conversations (direct messages and groups).
Examples:
instagram-cli threads # Show 10 conversations (default)
instagram-cli threads 20 # Show 20 conversations
instagram-cli threads --limit 5 # Show 5 conversationsinstagram-cli bulk-send <userListFile> <message> [options]Send the same message to multiple users from a text file.
Examples:
instagram-cli bulk-send users.txt "Check out my new post!"
instagram-cli bulk-send users.txt "Hello!" --delay 10000
instagram-cli bulk-send users.txt "Test message" --dry-runOptions:
--delay <ms>- Delay between messages (default: 5000ms)--dry-run- Preview without sending
File format (users.txt):
johndoe
@instagram
https://instagram.com/user123
jane_doe
instagram-cli post <imagePath> [caption]Upload a photo to your Instagram feed with an optional caption.
Examples:
instagram-cli post ./photo.jpg
instagram-cli post ./photo.jpg "Beautiful sunset today! #nature"Supported formats: .jpg, .jpeg, .png
instagram-cli story <imagePath>Upload a photo to your Instagram story.
Example:
instagram-cli story ./story-photo.jpginstagram-cli follow <username>Follow an Instagram user.
Examples:
instagram-cli follow johndoe
instagram-cli follow @instagram
instagram-cli follow https://instagram.com/johndoeinstagram-cli unfollow <username>Unfollow an Instagram user.
Example:
instagram-cli unfollow johndoeinstagram-cli bulk-follow <userListFile> [options]Follow multiple users from a text file.
Examples:
instagram-cli bulk-follow influencers.txt
instagram-cli bulk-follow users.txt --delay 15000
instagram-cli bulk-follow users.txt --dry-runOptions:
--delay <ms>- Delay between follows (default: 10000ms, minimum: 5000ms)--dry-run- Preview without following
instagram-cli like <postUrl>Like an Instagram post using its URL.
Example:
instagram-cli like https://www.instagram.com/p/ABC123DEF456/instagram-cli comment <postUrl> <message>Add a comment to an Instagram post.
Example:
instagram-cli comment https://www.instagram.com/p/ABC123DEF456/ "Amazing photo!"instagram-cli feed [limit]
instagram-cli feed --limit <number>View posts from your Instagram feed.
Examples:
instagram-cli feed # View 10 posts (default)
instagram-cli feed 20 # View 20 posts
instagram-cli feed --limit 5 # View 5 postsinstagram-cli search <query> [--limit <number>]Search for users (prefix with @) or hashtags (prefix with #).
Examples:
instagram-cli search @johndoe # Search for users
instagram-cli search #photography # Search for hashtags
instagram-cli search @john --limit 5 # Limit results to 5The CLI supports real-time messaging through two modes:
- Interactive Chat Mode (
chatcommand) - Type and send messages interactively - Live Chat Mode (
live-chatcommand) - Real-time updates with automatic message refresh
- Smart Group Matching - Send messages to groups using partial names
- Group Discovery - List all available groups with participant counts
- Thread Management - View and manage all conversations in one place
Instagram CLI automatically manages your login sessions:
- Session Storage: Sessions are stored securely in
~/.instagram-cli/ - Multi-Account: Support for multiple Instagram accounts
- Auto-Restore: Sessions are automatically restored when you run commands
- Cross-Platform: Session files work across different operating systems
| Command | Description | Example |
|---|---|---|
register |
Create new Instagram account | instagram-cli register user email@domain.com pass123 |
login |
Authenticate with Instagram | instagram-cli login username password |
logout |
Sign out from account | instagram-cli logout |
status |
Check authentication status | instagram-cli status |
threads |
List conversations | instagram-cli threads 10 |
| Command | Description | Example |
|---|---|---|
send |
Send direct message | instagram-cli send user "Hello" |
group-send |
Send message to group | instagram-cli group-send "My Group" "Hi all" |
chat |
Interactive chat mode | instagram-cli chat username |
live-chat |
Live chat with real-time updates | instagram-cli live-chat username |
bulk-send |
Send to multiple users | instagram-cli bulk-send users.txt "Hello" |
| Command | Description | Example |
|---|---|---|
post |
Upload photo to feed | instagram-cli post photo.jpg "Caption" |
story |
Upload photo to story | instagram-cli story photo.jpg |
feed |
View your feed | instagram-cli feed 20 |
like |
Like a post | instagram-cli like POST_URL |
comment |
Comment on post | instagram-cli comment POST_URL "Nice!" |
| Command | Description | Example |
|---|---|---|
follow |
Follow a user | instagram-cli follow username |
unfollow |
Unfollow a user | instagram-cli unfollow username |
bulk-follow |
Follow multiple users | instagram-cli bulk-follow users.txt |
search |
Search users/hashtags | instagram-cli search @username |
All commands support these global options:
-v, --verbose- Enable detailed logging-d, --debug- Enable debug mode for troubleshooting-h, --help- Show help for any command
Examples:
instagram-cli login johndoe password123 --verbose
instagram-cli feed --debug
instagram-cli send --help-g, --group- Send to a group thread by name-t, --thread-id <id>- Send to a specific thread ID
- Auto-completion - Tab completion for usernames
- Message history - Scroll through previous messages
- Real-time updates - See new messages as they arrive
- Rich formatting - Colored output with timestamps
- Use
chatcommand for interactive conversations - Use
live-chatfor monitoring conversations with automatic updates - Type
/helpin chat mode to see available commands - Use Ctrl+C to quickly exit any chat mode
- Use partial group names for easier targeting
- Check
threadscommand to see exact group names - Group names are case-insensitive
- Use quotes for group names with spaces
Instagram CLI includes built-in rate limiting to protect your account:
- Automatic delays between requests
- Smart session management
- Human-like behavior simulation
When uploading images, you can use:
- Relative paths:
./images/photo.jpg - Absolute paths:
/home/user/photos/vacation.jpg - Current directory:
photo.jpg
For bulk messaging and following:
- Create text files with one username per line
- Use
--dry-runto preview operations before executing - Adjust delays based on your account age and activity
- Monitor for rate limiting and adjust accordingly
- See
examples/users.txtfor file format reference
The CLI accepts various Instagram URL formats:
- Full URLs:
https://www.instagram.com/johndoe - Short URLs:
instagram.com/johndoe - Usernames:
johndoeor@johndoe
Registration Problems:
# Try with verbose logging
instagram-cli register username email password --verbose
# Use phone instead of email if email fails
instagram-cli register username +1234567890 password
# Enable verification if required
instagram-cli register username email password --verifyLogin Problems:
# Try with verbose logging
instagram-cli login username password --verbose
# Check your credentials
instagram-cli statusRate Limiting:
# Wait a few minutes and try again
# Use --verbose to see detailed information
instagram-cli command --verboseSession Issues:
# Clear all sessions and login again
instagram-cli logout --all
instagram-cli login username passwordChat Mode Issues:
# If chat freezes, use Ctrl+C to exit
# Clear terminal and try again
clear && instagram-cli chat username| Error | Solution |
|---|---|
| "Username already exists" | Try a different username or add numbers |
| "Email already registered" | Use a different email or login to existing account |
| "Phone verification required" | Use --verify flag to complete verification |
| "Registration rate limited" | Wait 1-2 hours before trying again |
| "Not authenticated" | Run instagram-cli login <username> <password> |
| "Rate limit exceeded" | Wait 5-10 minutes before trying again |
| "User not found" | Check the username spelling |
| "Group not found" | Check group name with threads command |
| "Invalid post URL" | Make sure you're using a valid Instagram post URL |
| "Image file not found" | Check the file path and make sure the image exists |
| "Chat connection failed" | Check internet connection and try again |
- Local Storage: All session data is stored locally on your device
- No Data Collection: Instagram CLI doesn't collect or transmit your personal data
- Secure Sessions: Session files are stored in your user directory
- Rate Protection: Built-in safeguards prevent account restrictions
- Encrypted Storage: Session data is encrypted for security
- Node.js: Version 14.0.0 or higher
- NPM: Latest version recommended
- Operating System: Windows, macOS, or Linux
- Instagram Account: Valid Instagram credentials
- Terminal: Modern terminal with Unicode support for best experience
- Instant messaging with real-time message display
- Auto-refresh every 2 seconds for new messages
- Bi-directional communication - see both sent and received messages
- Message timestamps for better conversation tracking
- Graceful handling of network issues
- Command-line interface for natural messaging
- Message history within the session
- Quick exit commands (
/exit,/quit) - Help system built into chat mode
- Responsive design that works in any terminal size
This project is open for contributions! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
- Improve documentation
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is designed for educational and automation purposes. While it provides powerful Instagram functionality, it's essential to use it responsibly.
- Respect Instagram's Terms of Service - Always comply with Instagram's community guidelines
- No Spam or Abuse - Do not use this tool for sending unsolicited messages, excessive following/unfollowing, or any form of harassment
- Rate Limiting - The tool includes built-in delays, but avoid excessive usage that could trigger Instagram's security measures
- Personal Use - Intended for managing your own content and legitimate interactions
- Commercial Use - Be aware of Instagram's policies regarding automated commercial activities
- Built-in rate limiting to prevent account restrictions
- Session management to maintain account safety
- Proper error handling for Instagram's security responses
- Smart delays between actions to mimic human behavior
The developers are not responsible for any account restrictions, violations, or legal issues that may result from misuse of this tool. Users are solely responsible for ensuring their usage complies with all applicable terms of service and laws.
Join our growing community of developers who are building automation tools for social media platforms.
- β Account Registration (Email & Phone)
- β Authentication & Session Management
- β Direct Messaging
- β Group Messaging
- β Interactive Chat Mode
- β Live Chat with Real-time Updates
- β Thread/Conversation Management
- β Content Publishing (Photos to Feed & Stories)
- β Social Interactions (Follow/Unfollow/Like/Comment)
- β Content Discovery (Feed/Search)
- β Bulk Operations (Messaging & Following)
- β Multi-Account Support
- β Rate Limiting Protection
- β Cross-Platform Support
- Real-time Communication - Chat with users in real-time from your terminal
- Smart Group Targeting - Send messages to groups using partial name matching
- Persistent Sessions - Stay logged in across sessions
- Comprehensive Logging - Detailed verbose and debug modes
- Error Recovery - Intelligent error handling and recovery
- Human-like Behavior - Built-in delays and patterns to avoid detection
Made with β€οΈ for the command-line community
Transform your Instagram experience with the power of the terminal! *Github repository https://github.com/Kunboruto20/Instagram-clii.git