Skip to main content

Your all-in-one CLI Toolkit

Project description

🛠️ JUST CLI

The simple stuff should be simple.

Sick of Googling "how to install X on XXX" for the 47th time, only to end up copying and pasting similar commands from various official docs?

Tired of copy-pasting giant commands and tapping arrow keys forever just to change one little thing?

Just want an all-in-one toolkit for everyday simple tasks, instead of endlessly searching and testing Deep Research results one by one?

Just is built to end the hassle. It focuses purely on making the simple, everyday developer tasks actually simple.

Installation

pip install just-cli

😋 The Good Stuff

The Toolkit 🧰

A collection of essential tools that work exactly how you expect them to.

📥 Easy Download

Just download files like wget or curl, but with smart naming, auto-resume, and a beautiful progress bar by default.

# Auto-resume is on by default. The filename is automatically extracted from the URL.
just download https://example.com/big-file.zip

# Use -H for custom headers and -o to specify a custom output filename.
just download https://api.example.com/data -H "Authorization: Bearer token" -o data.json

📦 Universal Extract

Just extract the archive. It intelligently detects the compression format (via magic bytes) and handles everything.

  • Supported: ZIP, TAR, GZ, BZ2, XZ, ZSTD, 7Z.
  • Note: RAR is not supported.
# Extracts to a folder named after the archive by default
just extract archive.tar.gz

# Specify a custom output directory
just extract data.7z -o ./output_dir

📝 Text Editor

Just edit files with a simple TUI editor.

just edit README.md

Editor Screenshot

📖 Smart Viewer

Just view files with intelligent rendering. Currently supports Markdown with syntax highlighting and TOC. Based on the excellent Textual Markdown example.

just view README.md

Viewer Screenshot

🌐 Cloudflare Tunnel

Just expose your local server to the internet.

# Powered by Cloudflare Tunnel (cloudflared)
just tunnel http://localhost:8000

🐧 Common Linux File Operations

Just some common file operations implemented in Python, for those tired of remembering command differences between Linux and Windows.

just cat
just ls 
just cp
just mv
just rm
just mkdir

The Extension System 🧩

Create a CLI tool with Just Extension in just 2 steps

The core idea is simple: String Replacement. You take a long, complex command, mark the parts you want to change, and just generates a CLI for it.

Here is an example:

  1. Register the complex command: Tell just what command you want to alias.

    just ext add docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' f523e75ca4ef
    
  2. Design your command: Design a command structure that is easy for you to remember by marking dynamic parts using the syntax [<name>:<type>=<default>#<help>].

    # Replace the static container ID with a dynamic argument
    Enter extension commands: just docker ip f523e75ca4ef[container_id:str#The Container ID]
    

That's it! Now you can use your new command:

just docker ip <container_id>

✨ How it works

When you run the command above, just compiles a native Python script using typer.

  1. Parsing: The syntax f523e75ca4ef[container_id:str#The Container ID] tells just to:

    • Identify f523e75ca4ef as the target string to replace.
    • Create a variable container_id of type str.
    • Use "The Container ID" as the help message.
  2. Code Generation: It generates a Python function with a type-safe signature:

    def main(container_id: Annotated[str, typer.Argument(help="The Container ID")]):
        # The original command template
        command = "docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' f523e75ca4ef"
        
        # String Replacement Logic
        command = command.replace('f523e75ca4ef', str(container_id))
        
        # Execution
        subprocess.run(shlex.split(command))
    
  3. Result: You get a fully functional CLI with auto-completion, type validation, and help messages—all powered by the simple act of string replacement.

The Installer 💿

Automate the "Official Docs" with minimal code.

just allows you to run any command from the official docs using just.execute_commands. It simply automates your manual steps.

To help you make decisions, just provides system probing tools:

  • just.system.platform: linux, windows, darwin
  • just.system.arch: x86_64, aarch64
  • just.system.pms: Detects winget, brew, apt, etc.

We also provide two specialized helpers for common scenarios:

  • just.BinaryInstaller: Best for single-file binaries (handles download, chmod, path).
  • just.ArchiveInstaller: Best for archives (handles download, extraction, linking).

Example: Installing Cloudflared

Here is a complete example that mimics the official installation logic:

@just.installer(check="cloudflared --version")
def install_cloudflare():
    """Install Cloudflare Tunnel client."""
    
    # Use standard package managers if available
    if just.system.pms.winget.is_available():
        just.execute_commands("winget install --id Cloudflare.cloudflared")
        
    elif just.system.pms.brew.is_available():
        just.execute_commands("brew install cloudflared")
    
    # Use BinaryInstaller
    elif just.system.platform == 'linux':
        # This helper automates: curl -> chmod +x -> symlink to bin
        just.BinaryInstaller(
            url='https://github.com/cloudflare/cloudflared/releases/.../cloudflared-linux-amd64',
            alias='cloudflared'
        ).run()
    
    else:
        raise NotImplementedError

🤝 Contributing

Found a bug? Want to add a new installer? Fork it, fix it, ship it. We love PRs. Just keep it cool, keep it simple, and don't break the "just works" vibe.

📄 License

MIT. Go wild.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

just_cli-0.3.1.tar.gz (457.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

just_cli-0.3.1-py3-none-any.whl (105.7 kB view details)

Uploaded Python 3

File details

Details for the file just_cli-0.3.1.tar.gz.

File metadata

  • Download URL: just_cli-0.3.1.tar.gz
  • Upload date:
  • Size: 457.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_cli-0.3.1.tar.gz
Algorithm Hash digest
SHA256 c7b6fa8dd3f73618134b0fc9cedf46b26bd278111d7c83a02c92bb7a44ce89f3
MD5 a6091b9d5e23ed41ec17f364460b9f94
BLAKE2b-256 c3cab1592620b2f11c3c432b7518b89acfa97a3c28c067bbcde2afa60f7bc9f8

See more details on using hashes here.

File details

Details for the file just_cli-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: just_cli-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 105.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.3 {"installer":{"name":"uv","version":"0.10.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for just_cli-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f8cae17f4e4ed00c578e56e476ab2ef2a21eef0afe1b97e8a8586edab4e6c136
MD5 117b0e6e5d013ec8171f79ba6c6ede8c
BLAKE2b-256 26768c7bbd2c3bc88e29c2638dd97a5e8fb4038c2e77194674ddd843b42d7211

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page