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.0.tar.gz (8.4 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.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pylon_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for pylon_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 8a8daa1758b03c130db6e93e3a414cada50e7854c9f8363a6798757a3b22e08a
MD5 b7b100d51b347ab1690de6121488b314
BLAKE2b-256 54d3b6d92234cf23ab5a411855eaf156b98b6475decbaad8bcedc339d236fe09

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pylon_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.8

File hashes

Hashes for pylon_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7322aae6fe3beb425a0c647fb683fd6eb0bc7293df09da2375b09d12bcfd4404
MD5 6fc82ff3dc37d3065ebba0221e7a558b
BLAKE2b-256 9a88f3521cc28766f17cd992e275648e2cbcfea970c1f093e73673b40b5da42b

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