Introducing Command Line for Light Phone

Let's start with a tl;dr – Command Line for Light Phone (CLLP) is a tool for Android users that use two active SIMs for their Light Phone 2 and other Android device – either using phone number sharing (when both devices can receive calls and texts for the same phone number via something like T-Mobile DIGITS or Verizon NumberShare) or where each device has its own separate phone number associated with it. CLLP leverages the fact that you can send text messages from one device to the other. When you go out with your Light Phone 2, the CLLP app runs on the Android device you leave behind and monitors incoming SMS messages to look for commands you send that instruct it to perform tasks and report the results back to your Light Phone 2. See it in action and read more details below!
Using CLLP to get walking directions from Google Maps

Background on Light Phone Tools

The Light Phone 2 ("LP2") is a beautiful device meant to reduce/eliminate smartphone and social media addiction. It does this by providing only the necessary tools to get things done without distraction – "It will never have social media, email, news or ads."

However at the moment with the device only recently launched, the tools are still being developed and will trickle out, with things like a calculator, directions, and a music player among the first to become available. Directions will use Here Maps instead of Google Maps due to both costs and wanting to avoid location tracking. Until those tools release, the phone is limited to calls, texting, hotspot, and alarm clock functionality.

How CLLP works

Enter CLLP. I started using the LP2 over the weekends when I knew I'd be out and didn't need to be as socially connected. I quickly ran into some limitations with not having tools, but eventually found a workaround for the ability to take short notes. I'd simply text myself the note, and when I got home later I had that note in Google Messages on my Pixel phone and could copy it to Google Keep, an email, etc.

A week later I had an epiphany. The Android device I was leaving behind was internet-connected, and I could make an app for it that could check my incoming text messages to myself for commands that I could send via SMS from my Light Phone 2. So if I was out and about with my LP2 and needed to get directions, I could simply send myself a text like Toronado walkto Fly Bar SF. You can see this in action in the GIF that was embedded at the top of this post.

In that SMS message, "walkto" is a command that CLLP is coded to look for. When it sees it, it knows I'm asking for Google Maps walking directions, and I have given it my origin ("Toronado") and destination ("Fly Bar SF"). So CLLP then runs that through the Google Maps Directions API using an API key you provide in the app, gets the walking directions, and sends the results back to the LP2 via text message(s).

What works in CLLP today:

  • Google maps directions
    • Walking - <origin> walkto <destination>
    • Transit - <origin> transitto <destination>
    • Driving - <origin> driveto <destination>
    • Bicycling - <origin> biketo <destination>
  • Google Calendar
    • Get agenda for next 3 days (limited to first 6 events) - calagenda
    • Add event to calendar - addtocal <title> on <date and time> at <location>
  • Yelp Business Search
    • Business Name - <current location> yelpme <name of business>
    • Type/Category of food (aka Chinese, Mexican, etc) - <current location> yelpme <type of food>
  • Weather (powered by Dark Sky)
    • Weather (returns current conditions, a short summary, and a 3-day forecast) - weather <city and optionally state/country if needed>
  • Wikipedia
    • Get snippet from closest article match - wiki <search term>
  • Calculator - powered by https://github.com/kieferlam/postfix, see the readme there for all the bonus commands (trig, ceil/floor, etc.) it supports beyond basic arithmetic
    • Calculator - calc <expression>
  • Help
    • Get a list of all supported commands - helpme

Wishlist:

  • Yelp (search by name or by type of food, etc.) (Update: Added Jan 7 2020)
  • Optionally use the Android device location to help give a hint when using commands looking for places so you don't have to type as much on the Light Phone
  • Weather (Update: Added Feb 7 2020)
  • Wikipedia (Update: Added Feb 7 2020)

Installing CLLP

Unfortunately CLLP is not available on Google Play due to their heavy-handed crackdown on apps that use SMS so it must be side-loaded onto an Android device running Android Marshmallow or higher. You can download the APK to install it here (tap the .apk file under the Assets section from your Android device to install the app). After initial install, the app will automatically notify you as new releases become available.

Note: I have noticed that my Light Phone will not receive responses if I have RCS enabled on my Android device. After disabling RCS (for example on a Pixel device, you do this in the Messages app by turning off "Chat Features") it can take a few hours before messages start coming through.

Permissions and API Keys

The CLLP app tries to explain what permissions are needed for different things. For instance, it absolutely needs notification access (to be able catch incoming SMS commands) and SMS sending permission (to be able to send back the command results). Currently you can optionally give calendar access permission for the agenda and event adding features, and a Google Maps API key you generate to get directions (this is because they changed the pricing model last year so it's prohibitively expensive for me to use my own API key for all users). The intention is to have all permissions be optional so you can only grant the ones you need for the features you want.

Note: This is all essentially a hack until Light adds a proper SDK to let you build your own tools. I don't want to break their ethos on being purely utilitarian and am therefore not introducing anything that could cause distractions, because I think that's what makes the LP2 so compelling in the first place. And I'm also not trying to compete with the tools they are working on, but rather fill gaps that prevent me from using the LP2 more often.

Support and contributing

Lastly, I've primarily made the app to fit my use cases, but it surely won't fit all needs. As a user I'd also want to know it's not doing anything improper due to its notification access, so the source code is available on Github under the Apache License 2.0. Feel free to fork the app for your own uses, and submit PRs/issues if you have any interesting additions!

And if you like this app and want to support its ongoing development, you can buy me a beer which is much appreciated! 🍻