To instaww Nyxie-Wixie, wun this wittle command:
pip install nyx-cli
- ❀ Instawwation ❀
- ✧・゚ Examples ・゚✧
- ★彡 Featuwes 彡★
- ✿ Documentation ✿
- (ノ◕ヮ◕)ノ*:・゚✧ Contwibuting
- Wicense UwU
To use Nyxie-Wixie, fiwst impowt it wike dis:
from nyx.nyx import Nyx
# Cweate a Nyx instance (so kawaiiiii)
nyx = Nyx()
nyx.add_arg(
long="exampwe",
short="e",
description="Custom exampwe message desu~",
required=True, # Dis makes it mandatowy uwu
arg_type="str", # Optional: Define expected type-chan
)
# Configure Nyx (Shows up in hewp `-h` or `--hewp`)
nyx.config(
description="Dis is a test toow (◕‿◕✿)",
example_input="--exampwe 'hewwo mummy~!'",
)
# Pawse command-wine awguments
nyx.parse_args()
# Access awgument vawues as object attwiboots!
print(nyx.exampwe)
Nyxie-Wixie has super kawaii functions for stwuctuwd and cowor-coded wogging:
nyx = Nyx()
nyx.config(theme="default") # Defauwt theme if not expwicitwy set uwu
nyx.success("Hewwo wowld", color_text=False) # Default: Gween
nyx.error("Something bad happened (。•́︿•̀。)") # Wed
nyx.warning("Watch owt senpai!") # Yewwow
nyx.info("Wandom infowmation OwO") # Bwue
[✔] SUCCESS: Hewwo wowld
[✖] ERROR: Something bad happened (。•́︿•̀。)
[!] WARNING: Watch owt senpai!
[*] INFO: Wandom infowmation OwO
Nyxie-Wixie has a supew intewactive mode that asks usews for awguments:
nyx = Nyx()
nyx.add_arg(
long="website",
short="w",
description="Website UWL pwease?",
required=True,
arg_type="url",
)
nyx.interactive() # Pwompts usew-chan for input
Optionaw awguments will be type checked if they wewen't empty! So smart desu ne~!
You can awso customize the input symbow and its cowor:
nyx.interactive(symbol="♡", color="pink") # Avaiwable cowors: red, green, blue, yellow (defauwt: white)
If you want to dispway ASCII awt befowe pwogwam execution, Nyxie-Wixie awwows you to set a stawtup function:
def print_ascii():
print("""
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⠀⠀⠀⠀
⠀⠀⠀⠀⢀⡴⣆⠀⠀⠀⠀⠀⣠⡀ ᶻ 𝗓 𐰁 .ᐟ ⣼⣿⡗⠀⠀⠀⠀
⠀⠀⠀⣠⠟⠀⠘⠷⠶⠶⠶⠾⠉⢳⡄⠀⠀⠀⠀⠀⣧⣿⠀⠀⠀⠀⠀
⠀⠀⣰⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢻⣤⣤⣤⣤⣤⣿⢿⣄⠀⠀⠀⠀
⠀⠀⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣧⠀⠀⠀⠀⠀⠀⠙⣷⡴⠶⣦
⠀⠀⢱⡀⠀⠉⠉⠀⠀⠀⠀⠛⠃⠀⢠⡟⠀⠀⠀⢀⣀⣠⣤⠿⠞⠛⠋
⣠⠾⠋⠙⣶⣤⣤⣤⣤⣤⣀⣠⣤⣾⣿⠴⠶⠚⠋⠉⠁⠀⠀⠀⠀⠀⠀
⠛⠒⠛⠉⠉⠀⠀⠀⣴⠟⢃⡴⠛⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠛⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
""")
# Two ways to set a stawtup function:
nyx = Nyx(starting_function=print_ascii) # Option 1
nyx.init(print_ascii) # Option 2 (≧◡≦)
Nyxie-Wixie hewps usews by weminding them if they miss a wequired awgument. If an awgument is mandatowy and not pwovided, Nyxie-Wixie will dispway an ewwor message indicating which awgument was missing. For exampwe:
Ewwor (╥﹏╥): Awgument '--website' wequires a vawue but none was pwovided.
Exampwe impwementation:
nyx.add_arg(
long="website",
short="w",
description="Website UWL pwease?",
required=True,
arg_type="url",
)
nyx.parse_args()
- Zewo dependency: No extewnaw dependencies wequired! So independent desu~
- Minimaw boiwerpwate: Easy-to-use API for wapid devewopment (quick wike a ninja~)
- Custom awgument types: Suppowts vawidation of awgument types (so smawt!)
- Intewactive mode: Automaticawwy pwompts for wequired awguments (´。• ᵕ •。`)
- Theming suppowt: Customizabwe wogging themes (makes evewything pwetty!)
- Cowowized output: Enabwes cweaw and stwuctuwd CLI feedback (rainbows evewywhere~)
To view suppowted awgument types and avaiwable themes, use these kawaii commands:
nyx.get_types() # Shows all the types-chan!
nyx.get_themes() # Shows all the pwetty themes!
We wewcome contwibutions! To contwibute, fowwow these steps:
- Fowk the wepositori (≧◡≦)
- Cweate a new bwanch (
git checkout -b feature-branch-chan
) - Commit youw changes (
git commit -m "Add new sugoi feature"
) - Push to the bwanch (
git push origin feature-branch-chan
) - Open a Puww Wequest and wait for sempai to notice you!
Pwease make suwe your code fowwows best pwactices and incwudes documentation where necessawy.
Nyxie-Wixie is weweased under the The Cuddwy Purrmission License Wicense. See the WICENSE fiwe for detaiws.
- Awgument Type Handwing: When using
arg_type
wikeint
,fwoat
, etc., Nyxie-Wixie vawidates the input but wetuwns it as a stwing. You must convewt it back to the expected type. - Async Suppowt: The
run_async
method is currentwy bwoken (so sadge). Avoid using it in pwoduction.
Happy hacking with huggins, nya~! (。♥‿♥。)ฅ^•ﻌ•^ฅ