Tweet from the command line with Twidge

Jack Wallen
Nov 13, 2009
Updated • Jan 4, 2018
Companies, Linux, Twitter

For the longest time I refused to see the value in Twitter. Over the last six months I have changed my tune on that. Now I use Twitter primarily as a PR tool for my articles. And since my renewed belief in micro-blogging, I have found plenty of tools with which to enact with Twitter.

One tool I have found to be the least invasive is Twidge. Twidge does not have an application or daemon running in the background. Twidge does not have a panel applet. Twidge doesn't even remain open in the terminal window. Twidge just allows you to enter commands that take specific action on your Twitter account. It's simple, it's fast, and it's...well...command line fu-tastic! With that said, let's install, configure, and use Twidge.


The first thing you need to know is if Twidge offers enough features to convince you to use it. Here is the short list:

  • Simple to use.
  • View activity of friends.
  • Add followers.
  • Follow users.
  • Archiving of your tweets.
  • Automatic URL shortening via

And much more.


As you would expect, twidge can be found in your distribution repositories. So all you need to do is open up a terminal and issue a command like:

sudo apt-get install twidge


yum install twidge


urpmi twidge

The installation will pick up the curl dependency automatically. After Twidge is installed, keep that terminal open because you'll need it (at least to begin with).


In order to use Twidge you have to configure it to authenticate to your account. To do this you have to run a built-in configuration script issued from the command line. Issue the command:

twidge setup

You will be asked two simple questions:

  • Your use(r)name.
  • Your password.

That's it. Now you are ready to start using Twidge.


The basic usage of Twidge is:

twidge update 'STATUS'

Where STATUS is what you want to post to twitter (between single quotes).

Of course updating is not always enough. Twidge has a number of built-in tools. Let's take a look at what they are. NOTE: The basic usage of these tools is:


Where TOOL is the tool you want to use and OPTIONS are any options you want to pass to the tool (if any options are available).

Display updates.

  • lsarchive: List your own posts.
  • lsdm: List direct messages sent to you.
  • lsdmarchive: List direct messages you have sent.
  • lsrecent: Lists recent posts made by you or those you follow.
  • lsreplies: Lists all recent replies made to you.
  • lsfollowers: Lists those following you.
  • lsfollowing: Lists those you are following.

Action commands.

All of these tools are used in the same way the tools above are used, except in certain instances you proceed the tool name with username like so:


Where TOOL is the specific tool you want to use and USERNAME is the user you want to send the information to.

  • dmsend: Send a direct to a user.
  • follow: Follow a specific user.
  • unfollow: Stop following a user.
  • update: Update your status.

So let's say you want to update your status to say "Hey everyone, I am reading a cool article on Ghacks right now!". To do this you would enter the command:

twidge update 'Hey everyone, I am reading a cool article on Ghacks right now!'

and hit enter when you're done.

Let's say, however, you wanted to use I'm instead of I am. The use of a single quote in the middle of that tweet would cause an error. To get around that just enter:

twidge update

and then hit enter. You should notice that you do not get your bash prompt back. What you do now is type in your tweet, without using quotes, and then hit enter. This way you can use contractions without having to worry about proper shell quotes.

Using twidge without command line

Although Twidge is a command line only tool, you can get around opening up a terminal by opening up your desktop's run dialog and then entering your twidge command there. If you're using GNOME you hit <Alt>F2 and then enter the Twidge command in the run dialog. This keeps you from having to have yet another window open, and it's much faster.

Final thoughts

I will make no bones about the fact that Twidge is not nearly as simple as the standard GUI-based tool. But Twidge makes up for that with speed, reliability, and flexibility. Because of its command line nature, you could even create a nifty bash script to use something like fortune and then add that bash script to a cron job so you would get an automatically updated status. Script-fu-tastic!


Tutorials & Tips

Previous Post: «
Next Post: «


  1. The Dark Lady said on July 9, 2023 at 11:19 am

    Martin, I would appreciate that you do not censor this post, as it’s informative writing.

    Onur, there is a misleading statement “[…] GIFs are animated images …”. No, obviously you don’t seem to have take much notice of what you were told back in March regarding; Graphics Interchange Format (GIF).

    For example, (if you had read my replies within that thread, you might have learnt something useful). I even mentioned, “GIF intrinsically supports animated images (GIF89a)”.

    You linked to said article, [Related: …] within this article, but have somehow failed to take onboard what support you were given by several more knowledgeable people.

    If you used AI to help write this article, it has failed miserably.

  2. KeZa said on August 17, 2023 at 5:58 pm

    AI is stupid, and it will not get any better if we really know how this all works. Prove me wrong..

  3. Database failure said on August 18, 2023 at 5:21 pm

    Martin, [#comment-4569908] is only meant to be in: []. Whereas it appears duplicated in several recent random low-quality non relevant articles.

    Obviously it [#comment-4569908] was posted: 9 July 2023. Long before this thread even existed… your database is falling over. Those comments are supposed to have unique ID values. It shouldn’t be possible to duplicate the post ID, if the database had referential integrity.

  4. Howard Pearce said on August 25, 2023 at 12:24 pm

    Don’t tell me!

    Ghacks wants the state to step in for STATE-MANDATED associations to save jobs!!!

    Bring in the dictatorship!!!

    And screw Rreedom of Association – too radical for Ghacks maybe

  5. Howard Allan Pearce said on September 7, 2023 at 9:13 am

    GateKeeper ?

    That’s called “appointing” businesses to do the state’s dirty work!!!!!

    But the article says itself that those appointed were not happy – implying they had not choice!!!!!!

  6. owl said on September 7, 2023 at 9:50 am

    @The Dark Lady,
    @Database failure,
    @Howard Pearce,
    @Howard Allan Pearce,

    Note: I replaced the quoted URI scheme: https:// with “>>” and posted.

    The current is owned by “Softonic International S.A.” (sold by Martin in October 2019), and due to the fate of M&A, has changed in quality.
    Many Authors of bloggers and advertisers certified by Softonic have joined the site, and the site is full of articles aimed at advertising and clickbait.
    As it stands, except for articles by Martin Brinkmann, Mike Turcotte, and Ashwin, they are low quality, unhelpful, and even vicious. It is better not to read those articles.
    How to display only articles by a specific author:
    Added line to My filters in uBlock Origin:,.home-posts,.home-category-post:not(:has-text(/Martin Brinkmann|Mike Turcotte|Ashwin/))

    By the way, if you use an RSS reader, you can track exactly where your comments are (I’m an iPad user, so I use “Feedly Classic”, but for Windows I prefer the desktop app “RSS Guard”).
    RSS Guard: Feed reader which supports RSS/ATOM/JSON and many web-based feed services.

  7. Anonymous said on September 14, 2023 at 6:41 pm

    We all live in digital surveillance glass houses under scrutiny of evil people because of people like Musk. It’s only fair that he takes his turn.

  8. Anonymous said on September 18, 2023 at 1:31 pm

    “Operating systems will be required to let the user choose the browser, virtual assistant and search engine of their choice. Microsoft cannot force users to use Bing or Edge. Apple will have to open up its iOS operating system to allow third-party app stores, aka allow sideloading of apps. Google, on the other hand, will need to provide users with the ability to uninstall preloaded apps (bloatware) from Android devices. Online services will need to allow users to unsubscribe from their platform easily. Gatekeepers need to provide interoperability with third-parties that offer similar services.”

    Wonderful ! Let’s hope they’ll comply with that law more than they are doing with the GDPR.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.