Skip to main content

shortiepy 🌸

Your local URL shortener (˶˘ ³˘)♡

  • 🔒 100% offline - no data leaves your machine
  • 🌈 Cross-platform (Linux/macOS/Windows)
  • 📋 Auto-copies short URLs to clipboard
  • 🎀 Pastel colors & kaomojis everywhere!
image

Installation

  • Using pipx [Recommended]

Follow instructions to install pipx here: pipx.pypa.io/stable/installation and after installing pipx in your system, install shortiepy:

pipx install shortiepy
  • Using pip
pip install shortiepy

Run the server automatically on startup - Linux only [Optional]

You can create a systemd (user) service for automatically running the server when you turn on your PC.

  • Check the shortiepy.service file at the root of this repository.

    • Download it and move it to ~/.config/systemd/user/ directory.
  • Run the following commands to enable and run the service:

    • systemctl --user daemon-reload
      
    • systemctl --user enable --now shortiepy.service
      
  • To check the status of the service, you can run following command:

    • systemctl --user status shortiepy.service
      
    • If you see following output at the end, then everything went well:
      ... systemd[1282]: Started shortiepy.service - shortiepy URL Shortener.
      ... shortiepy[85824]: ℹ  Running shortiepy server on http://localhost:9876
      ... shortiepy[85824]: ⚠  Press CTRL + C to stop the server. (๑•̀ㅂ•́)و✧
      
  • If for some reason you want to undo above steps (disable auto-start and systemd service), you can run following commands to do so:

    • systemctl --user stop shortiepy.service
      
    • systemctl --user disable shortiepy.service
      
    • systemctl --user daemon-reload
      
    • Then running systemctl --user status shortiepy.service should show output saying "No service 'shortiepy.service' found" (or something like that).
    • Additionally, delete the shortiepy.service file from ~/.config/systemd/user/ directory.

Usage

  • Add a URL
shortiepy add https://example.com
  • Start server
shortiepy serve  # will run in forground
# OR
shortiepy start  # will run in background
  • View docs
shortiepy docs

Create Links from browser

shortiepy supports creating short URLs from within your browser (without having to use CLI add command).

You can visit /new route and provide code (this will be used to generate short url) and url (the URL you want to create short link for) query paramters:

  • http://localhost:9876/new?code=meow&url=https://example.com

    • It will create short link for https://example.com using provided short code: http://localhost:9876/meow

    • The code parameter is optional and can be omitted.

However, vising that URL and route manully is tedious! But if your browser allows it, like I have Brave browser, you can add a shortcut for it:

  • In your browser go to settings and find "search engines". In Brave, it's brave://settings/searchEngines and add the following in "Site search":

    • Name: shortiepy (or anything you like)
    • Shortcut: :sh (or anything you like)
    • URL: http://localhost:9876/new?url=%s
Click to See Screen Recording of above steps!

Add Shortcut in Browser

Now when you want to create a short link, just type :sh in url bar and press spacebar, then you can paste the URL you want to create short link for and press enter!

Click to See Screen Recording of above steps!

Use Shortcut to create short link

Shell Completion

Get tab-completion with one command:

shortiepy completion

Restart your shell or reload config (source ~/.bashrc for bash OR source ~/.zshrc for zsh). Fish users: no restart needed!

That's it! Works for bash, zsh, and fish.

Why

For some reason, when I’m working on things or trying to learn something new, my browser ends up filled with tons of tabs—which makes my laptop-chan angry ~ ₍^. ̫.^₎

I don’t want to close them or bookmark them. I tried manually copying URLs into a .txt file, but then I wished there was a simple way to turn long links into short ones I could use later.

I didn’t want to send anything online, and existing self-hosted URL shorteners felt like overkill for such a small need.

So I made this: a minimal, local-only URL shortener. It started as a single script file and isn’t perfect—but it just works! ~ ദ്ദി/ᐠ。‸。ᐟ\

For Developers

Want to tinker with shortiepy or contribute? Here's how to set it up locally:

  • Clone the repository locally and change the directory into it:
git clone https://github.com/CheapNightbot/shortiepy.git && cd shortiepy
  • Install shortiepy:
# Create a virtual environment (keeps things clean!)
python -m venv .venv

# Activate it
source .venv/bin/activate  # Linux/macOS
# OR
.venv\Scripts\activate     # Windows

# Install in editable mode (changes reflect instantly!)
pip install -e .

Now you can run shortiepy from anywhere in your terminal! Made a change? It’ll work immediately—no reinstall needed!

Updating Shell Completions

If you modify CLI commands or options, regenerate completions:

./scripts/generate-completions.sh

This updates the files in shortiepy/completions/ directory.

Metadata

Release files for shortiepy 1.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for shortiepy 1.1.3
File Size Uploaded
shortiepy-1.1.3.tar.gz 20.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shortiepy 1.1.3
File Interpreter ABI Platform
shortiepy-1.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 37.2 kB

Release files / shortiepy-1.1.3.tar.gz

Download URL shortiepy-1.1.3.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
48dd438cb8e26d46eedb30dddd212df3b17bc0b58cd0f7280c8d22710d8ef1cb
BLAKE2b-256 checksum
How to use checksums
661326b9d76830f3a2756dbd564a48c300759eac086afe51bd2d53f3ab33722f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Release files / shortiepy-1.1.3-py3-none-any.whl

Download URL shortiepy-1.1.3-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ececc88a7f01fe6838f041c8158bf420811e3207c736cdbb93adf6b8d797a0dc
BLAKE2b-256 checksum
How to use checksums
931f82dfa7be8b47e990d27f917f19103e9d4a1ac12a22545daefa67a7eba2ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 1, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.3 This release

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page