A CLI application with interactive shell using Click
Project description
MyCLI
A command-line interface application with an interactive shell built using Click.
Features
- Interactive shell mode with command history and tab completion
- Debug mode for verbose output
- Command groups and subcommands
- User management commands
- Greeting functionality
Installation
You can install this package from source:
# Clone the repository
git clone <repository-url>
cd clickProj
# Install in development mode
pip install -e .
Usage
Basic Usage
After installation, you can run the CLI by using the cli command:
cli --help
Interactive Mode
Simply run cli without any subcommands to enter interactive mode:
cli
This will present you with a prompt where you can enter commands directly:
cli> help
cli> greet Alice
cli> user add bob
cli> exit
Available Commands
Greeting
cli greet NAME
Example:
cli greet Alice
User Management
Add a user:
cli user add USERNAME [--admin]
Delete a user:
cli user delete USERNAME
Debug Mode
Add the --debug flag to any command to enable debug output:
cli --debug greet World
Project Structure
clickProj/
├── commands/ # Main package containing all CLI commands
│ ├── __init__.py
│ ├── interactive_group.py # Implementation of the interactive shell
│ └── cli/ # CLI command implementations
│ ├── __init__.py
│ ├── cli.py # Main CLI entrypoint
│ ├── greet/ # Greeting command functionality
│ │ ├── __init__.py
│ │ └── greet.py
│ └── user/ # User management commands
│ ├── __init__.py
│ └── user.py
├── LICENSE # MIT License
├── pyproject.toml # Project build configuration
└── setup.py # Package setup file
Development
To contribute to this project:
- Fork the repository
- Create a feature branch
- Implement your changes
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Rajdeep Deb
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clickproj_rjd-0.1.0-py3-none-any.whl.
File metadata
- Download URL: clickproj_rjd-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90ca634fbc91aa89183621f6a76580221d8ce53ee005aa22bd988fa6c51d01e3
|
|
| MD5 |
4af46975f0c32c32e0fbfa405dcf29bd
|
|
| BLAKE2b-256 |
292769a0c32c0da35617b571e43510b2ae620dc5ea620b5bf328cb7a3783aa5c
|