DEV Community

Cover image for Typing Too Much While Using AI? This Tool Will Save You Hours
Rijul Rajesh
Rijul Rajesh

Posted on

Typing Too Much While Using AI? This Tool Will Save You Hours

Hello, I'm Rijul. I'm building git-lrc, a micro AI code reviewer that runs on every commit. It's free and source-available on GitHub. Star git-lrc to help more developers discover the project. Do give it a try and share your feedback


Are you tired of typing the same prompts over and over again?

I definitely was.

When working with AI tools, I noticed I kept writing the same instructions repeatedly. Sometimes I'd even dig through old chats just to copy and paste a prompt I had already written dozens of times.

It isn't difficult, but it breaks your flow.

Thankfully, there's a fantastic tool that completely solves this problem: Espanso.

You can create your own shortcuts, and Espanso instantly expands them into full text anywhere on your computer.

For example, here's the built-in :date shortcut.

As soon as I type :date, it automatically replaces it with today's date.

Pretty cool, right?

Let's install it and create our own shortcuts.


Installing Espanso

Head over to espanso.org.

You'll find the installation button right on the homepage.

Installation depends on your operating system:

  • macOS: Install the bundle or use Homebrew.
  • Windows: Download and run the installer.
  • Linux: Choose the installation method for your distribution.

Linux users

Before installing, check whether you're running X11 or Wayland.

echo $XDG_SESSION_TYPE
Enter fullscreen mode Exit fullscreen mode

My machine is running X11, so I'll install the AppImage like so.

# Create the $HOME/opt destination folder
mkdir -p ~/opt

# Download the AppImage
wget -O ~/opt/Espanso.AppImage 'https://github.com/espanso/espanso/releases/latest/download/Espanso-X11.AppImage'

# Make it executable
chmod u+x ~/opt/Espanso.AppImage

# Create the "espanso" command alias
sudo ~/opt/Espanso.AppImage env-path register
Enter fullscreen mode Exit fullscreen mode

Once the installation finishes, verify that everything is working.

espanso --version
Enter fullscreen mode Exit fullscreen mode

Now start Espanso.

# Required only once
espanso service register

# Start Espanso
espanso start
Enter fullscreen mode Exit fullscreen mode

That's it. Espanso is now running in the background.

If you'd like more installation details, the official documentation is available here:

https://espanso.org/docs/get-started/


Witness the Magic

Let's try one of the built-in shortcuts.

I'll type:

:espanso
Enter fullscreen mode Exit fullscreen mode

As soon as I finish typing, Espanso replaces it with "Hi there!"

No copy-pasting.

No scripts.

Just instant text expansion.

Now let's create our own shortcut.


Creating Your Own Shortcuts

Espanso stores its configuration in a simple YAML file.

First, locate your configuration directory.

espanso path
Enter fullscreen mode Exit fullscreen mode

Mine returns:

Config: /home/rtp/.config/espanso
Packages: /home/rtp/.config/espanso/match/packages
Runtime: /home/rtp/.cache/espanso
Enter fullscreen mode Exit fullscreen mode

Open the Config directory and navigate to the match folder.

I will head to /home/rtp/.config/espanso

Inside, you'll find a file named base.yml.

Open it.

You'll notice some existing shortcuts already defined.

For example:

  • :date inserts the current date.
  • :espanso expands to Hi there!

Creating your own shortcut is just as easy.


A Real-World Example

When I'm prompting AI, I frequently include this instruction:

Make only minimal, non-destructive changes to the code.

It helps prevent the AI from making unnecessary modifications that could accidentally break my software.

The problem is that I end up typing this sentence countless times every week.

Instead, I created a shortcut.

- trigger: ":mdc"
  replace: "Make only minimal, non-destructive changes to the code."
Enter fullscreen mode Exit fullscreen mode

After adding it to base.yml, my configuration looks like this:

Now, whenever I type :mdc, Espanso instantly expands it into the full sentence.

It feels like magic, and after a few days of using it, you'll wonder how you ever worked without it.


Wrapping up

Espanso is one of those small tools that quietly saves you hundreds of keystrokes every day.

Whether you're writing prompts, code snippets, email templates, commit messages, or anything repetitive, custom text expansions can make your workflow noticeably faster.

Huge kudos to Federico Terzi for creating such an awesome tool.


AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs -- without telling you. You often find out in production.

git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.

Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.

Give it a ⭐ star on Github

Top comments (0)