Skip to main content

Pylon: Command-Line Improvements

Project description

Pylon CLI

Pylon is a simple command-line tool that allows you to run Python scripts from either your current project directory or your user's .pylon directory. It searches for Python scripts by name and executes them with the specified arguments.

Installation

To install Pylon CLI, you can use pip:

pip install pylon-cli

Usage

pylon <script-name> [args...]

Pylon searches for scripts in the following order:

  1. Current project directory (the directory you're in)
  2. User scripts directory (~/.pylon)

How It Works

Pylon looks for Python files with the .py extension that match the name you provide. For example, if you run pylon myscript, it will look for a file named myscript.py in the current directory and in your user's .pylon directory.

Examples

Basic Usage

If you have a script named hello.py in your current directory:

pylon hello

This will execute hello.py using the current Python interpreter.

With Arguments

You can pass arguments to your script:

pylon hello --name="World" --verbose

User Scripts

You can store scripts in your user's .pylon directory (~/.pylon) to make them globally accessible:

  1. Create a script file in ~/.pylon/myscript.py
  2. Run it from anywhere:
pylon myscript arg1 arg2

Example Script

Create a file called greet.py in your current directory:

import sys

def main():
    name = sys.argv[1] if len(sys.argv) > 1 else "World"
    print(f"Hello, {name}!")

if __name__ == "__main__":
    main()

Then run it with:

pylon greet Alice
# Output: Hello, Alice!

Available Scripts

When you run pylon without any arguments, it will show you all available scripts in both the current directory and the user's .pylon directory.

Requirements

  • Python 3.13 or higher

License

This project is licensed under the Apache-2.0 license.

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

pylon_cli-0.2.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

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

pylon_cli-0.2.1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file pylon_cli-0.2.1.tar.gz.

File metadata

  • Download URL: pylon_cli-0.2.1.tar.gz
  • Upload date:
  • Size: 8.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pylon_cli-0.2.1.tar.gz
Algorithm Hash digest
SHA256 310151a5682d147e41c2f46493faa52e8e5112379b40f4ee4ed3ee43a36efb5f
MD5 c256b9e54988ec39ad40dbad0e35fe57
BLAKE2b-256 6456f1e2bfa543db8f54bccae478cd46c60931dad1b3264fae8e4e81003c2c50

See more details on using hashes here.

File details

Details for the file pylon_cli-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pylon_cli-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.16 {"installer":{"name":"uv","version":"0.9.16","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pylon_cli-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 43b081c930e8045167f6313e70ccf08153d7f58f599c84e65e221cb5152f40af
MD5 f3e272a1364aafa9d326f0cbe0e056f6
BLAKE2b-256 90081329c709ac99590093f6c85f00f6d54603357c328e87bc9e51d03f1048f9

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