Skip to main content

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:

  1. Fork the repository
  2. Create a feature branch
  3. Implement your changes
  4. Submit a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Rajdeep Deb

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

clickproj_rjd-0.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

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

Hashes for clickproj_rjd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90ca634fbc91aa89183621f6a76580221d8ce53ee005aa22bd988fa6c51d01e3
MD5 4af46975f0c32c32e0fbfa405dcf29bd
BLAKE2b-256 292769a0c32c0da35617b571e43510b2ae620dc5ea620b5bf328cb7a3783aa5c

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