Plandex - A Powerful Terminal-Based AI Assistant for Linux Coders
In this guide, we’ll show you how to install and use PlandexAI in your Linux terminal to handle everything from basic tasks to more advanced coding workflows.

These days, there are a lot of AI tools that help with the coding workflow and let you ship code fast, especially if you're following along with our AI with Linux series.
We go over a bunch of tools, each one built for a specific task. In today’s article, we’re breaking down another handy tool that you can integrate right into your terminal to speed up coding or even to help you learn a new technology.
The tool is called Plandex, an AI-powered assistant that runs inside the terminal.
Compared to other tools, Plandex feels more like a full AI framework. Most other tools are simple CLI apps that just do basic chat tasks. Plandex, on the other hand, can handle more complex, context-aware prompts.
In this guide, we’ll walk you through how to install and use PlandexAI in the Linux terminal to tackle some simple to intermediate tasks.
What is Plandex?
Plandex is an AI tool that runs right in your terminal, built to help you ship production-ready code faster. It’s mainly geared toward developers who are building applications, but it’s also super handy for everyday terminal tasks.
It’s written in Go, which means it’s fast and easy to install, no heavy Python dependencies slowing things down.
What sets Plandex apart from other AI tools I’ve tried is how it actually cares about what you're trying to do. If your prompt isn’t clear, it won’t just guess, it’ll ask for more info so it can generate clean, functional code that’s ready for production. No more messy output or half-baked scripts.
Install Plandex in Linux
The process of installation is easy. As we mentioned earlier, you can install it with one command:
curl -sL https://plandex.ai/install.sh | bash
After downloading the tool, it will ask for the root password. Enter the password and hit Enter to complete the installation:

You can also build it from source if you prefer:
git clone https://github.com/plandex-ai/plandex.git
cd plandex/app/cli
go build -ldflags "-X plandex/version.Version=$(cat version.txt)"
mv plandex /usr/local/bin # adapt as needed for your system
How Plandex Works
Plandex can be considered a framework, not a simple CLI tool that gets a prompt and responds back. On the other hand, Plandex tries to help you as much as possible with your project code. For this, you pass your project code and Plandex takes it as context and tries to do all the assigned tasks.
The simple conversations that we regularly do in ChatGPT, in Plandex are calledplans. It can be a simple chat or a complete process if you load the code of an application and try to get help completing or explaining the code.
By default, Plandex uses OpenAI as the backend LLM to do all the fancy stuff behind the scenes, but we can use other LLMs instead of OpenAI.
I personally like to use Gemini as it doesn’t cost as much, and you can use its free tier. Compared to, you need to pay first to use the API key, but it is still not fully supported in Plandex.
Get OpenAI API Key
As we said before, Plandex under the hood needs an LLM in the backend to do the work. For this, we first need to get an API key.
In case you want to use the OpenAI LLMs, navigate to the OpenAI website and get an API key.
You need an account first. If you don't have one, create it, and then generate the API key:

After you get the key, add it as an environment variable to the bash like this:
export OPENAI_API_KEY=<your-key>
And that's all you need, you are ready for the AI journey.
The next step is to create the OpenRouter API key by going to the OpenRouter website. In case you don't have an account, create one first.

The final step is to add it to the environment variable:
export OPENROUTER_API_KEY=<your-key>
Getting Started with Your First Prompt
, can be beneficial in both cases: if you're doing simple tasks and need some help, or in the other case, where you work on a project and need an AI tool to assist you in completing it and making it production code.
To start chatting with Plandex, it's preferred to create a directory, and later we’ll see why. So, create a directory like this:
mkdir example
cd example
Now we are ready to start using PlandexAI. You just need to call the command plandex tellor
the short version pdx tell
like this:
pdx tell "what is tecmint"

As this is the first time we start Plandex, it asks if we want to use the cloud provided by Plandex or create an account. We will just go with the trial on the cloud, so choose the first option.
This will open a new browser tab asking you to use your email to sign up for the cloud. Enter your email.

Next, choose the free trial as the beginning step, and then if you like it, you can extend your subscription to the premium.

After that, you will see the account is activated in the terminal session. It will show your email used and the plan you chose, free trial or premium.

You may notice a message at the end saying "no plan in current directory." That's right, we didn’t set the plan. We mentioned earlier that Plandex uses what we call a plan (basically a conversation).
Let's set a plan for this directory with the command plandex new -n
followed by the name as you want:
plandex new -n example

Now we are ready to ask Plandex whatever we want.
plandex tell "what is tecmint"
Load a Project
The other case where Plandex can help you is if you have a complete structured project and you need help completing it, adding functionality, or even explaining what each part does.
You need to load the project files to Plandex and ask for help. For this, first create a new directory, or inside the project directory create a new plan and thencdto the plan like this:
plandex new -n myproject
plandex cd myproject
To load the files to Plandex, use the command:
plandex load
This will load all the files and directories of your project. In case you only need help with one file, not all the files, you can load it by itself like this:
plandex load file.sh
This will load the single filefile.sh
.
After loading the project or the single file, you can start asking for anything related to the project.
Summary
Plandex is an AI framework that can help you boost productivity, whether you're writing code in a project or working on single tasks. In both cases, Plandex is a good choice.
If you need more guides and explanations on AI with Linux, check the Linux with AI Series, where we explain different tools specific to Linux that can help boost your workflow and automation.