diff --git a/pushbullet_cli/app.py b/pushbullet_cli/app.py
index <HASH>..<HASH> 100755
--- a/pushbullet_cli/app.py
+++ b/pushbullet_cli/app.py
@@ -158,7 +158,8 @@ def push(title, device, channel, filename, link, arg):
         kwargs['data_type'] = 'url'
     else:
         if arg is None:
-            print("Enter your message: ")
+            if sys.stdin.isatty():
+                print("Enter your message: ")
             kwargs['message'] = sys.stdin.read()
 
         kwargs['data_type'] = 'text'
Avoid prompt the user when message is piped
Checks if stdin is attached to a tty or being piped