Ahmad Awais

NAVIGATE


SHARE


Introducing PTCL CLI: Control PTCL Routers via Command Line

Ahmad AwaisAhmad Awais

This post is meant for the local community.

PTCL is the biggest local internet service provider here in Lahore. I have been using PTCL’s internet since the beginning. While there are several other wireless internet providers, in my experience there is simply no better alternative to PTCL at the time of writing this post.

Workflow Is My Thing!#

If you read this blog then you know that I am a workflow optimist. I love building professional workflows via automation scripts mostly related to the command line or web development. Being a command line junkie and all that, I find it very cumbersome to have to log in simply to reboot the PTCL router.

I wanted to use the command line to play around with the router, for things like rebooting, keeping a check at the line parameters and even calculating the signal to noise ratio (SNR). I was earlier looking into phatomJS for building something like that, but one thing led to another and today I got some time to finally open source a simple to use command line interface for PTCL routers.

Introducing PTCL CLI#

ptcli is a bash CLI for PTCL routers. An intuitive PTCL-CLI to control PTCL routers via command line.

PTCL-CLI

You can use ptcli to perform following actions via command line

⚡️ Installation#

Open command line terminal (I prefer iTerm2) and run the following command.

sudo wget -qO ptcli https://git.io/vPtPS && sudo chmod +x ./ptcli && sudo install ./ptcli /usr/local/bin/ptcli

This command will perform the following actions:

? Usage#

️ Usage: ptcli [ -c |--config ], [ -h | help ] ️ – [ -h | help ] Use help

Here’s a complimentary GIF.

PTCL-CLI GIF

? Why was PTCL CLI Created?#

I am a command line junkie and it is too much work for me to go sign in and reboot the router or get the line parameters when I need to. So, I built this CLI and now with a bunch of aliases, I am able to perform these actions within a single command.

⚡️ Environment#

I have built this CLI using Mac. It needs to be run on Bash or ZSH based shell.

Beta software! Use at your own risk.

ℹ️ Changelog#

1.0.0 (2016-10-01)#

ℹ️ License#

MIT License. This script has no official affiliation with PTCL.

? Looking forward to the feedback and contribution from your end. That’s how we can make it something more worthwhile. Let’s collaborate at GitHub.
✔︎ Did you like PTCL CLI? It’d be great if you can share it on Twitter.

Founder & CEO of ⌘ Command Code coding agent with taste. Founded Langbase.com, AI cloud to build, deploy, and scale AI agents with tools & memory · Creator of Command.new.

"Awais is an awesome example for developers" — Satya Nadella, CEO of Microsoft.

NASA Mars Ingenuity Helicopter mission code contributor 8th GitHub Stars Award recipient with 5x GitHub Stars Award (Listed as GitHub's #1 JavaScript trending developer). Google Developers Expert Web DevRel.

Ex VP Eng (DevTools & DevRel) Rapid · Google Developers Advisory Board (gDAB) founding member · AI/ML/DevTools Angel Investor (Replit, Resend, Daytona, Gumroad and you?) ❯ AI/ML Advisory Board San Francisco, DevNetwork.

Award-winning Open Source Engineering leader authored hundreds of open-source dev-tools and software libraries used by millions of developers, including Shades of Purple code theme and corona-cli.

Linux Foundation (Node.js Committee Lead), OpenAPI Business Governing Board. Taught 108K+ developers via NodeCLI.com and VSCode.pro course. 274 million views, blogging for 24 yrs.

❯ Read more about Ahmad Awais or come say hi on 𝕏 @_AhmadAwais.

📨

Developers Takeaway

Stay ahead in the web dev community with Ahmad's expert insights on open-source, developer relations, dev-tools, and side-hustles. Insider-email-only-content. Don't miss out - subscirbe for a dose of professional advice and a dash of humor. No spam, pinky-promise!

✨ 172,438 Developers Already Subscribed
Comments 8
  • Dr. Adnan
    Posted on

    Dr. Adnan Dr. Adnan

    Reply Author

    Great script. Keep up the awesome work.


  • Nizam Tajik
    Posted on

    Nizam Tajik Nizam Tajik

    Reply Author

    I was literally thinking about it. Had a really bad time with TELNET….
    This is one big solution.


  • Sameer Hamid
    Posted on

    Sameer Hamid Sameer Hamid

    Reply Author

    Nice Work. Keep it Up.


  • Syed Rizvi
    Posted on

    Syed Rizvi Syed Rizvi

    Reply Author

    Awesome Work Brother .
    You are my motivator now .


    • AhmadAwais
      Posted on

      AhmadAwais AhmadAwais

      Reply Author

      That’s very kind of you to say. ?


Mentions

  • AhmadAwais
  • Syed Rizvi
  • AhmadAwais
  • Ahmad Awais
  • Sameer Hamid
  • Nizam Tajik
  • Ahmad Awais
  • Dr. Adnan