# MyCliApp
A modern Python CLI application similar to Azure CLI with comprehensive Azure authentication capabilities.
[](https://badge.fury.io/py/mycli-app)
[](https://pypi.org/project/mycli-app/)
[](https://opensource.org/licenses/MIT)
## Features
- **🔐 Multiple Authentication Methods**:
- Interactive browser authentication
- Broker-based authentication (Windows Hello, Microsoft Authenticator)
- Device code flow for headless environments
- Azure CLI credential fallback
- **📦 Resource Management**: Create, list, and delete resources (demo operations)
- **⚙️ Configuration Management**: Set and view configuration settings
- **🎨 Colorized Output**: Enhanced terminal output with colors and icons
- **🔄 Cross-platform**: Works on Windows, macOS, and Linux
- **💾 Persistent Authentication**: Saves authentication state between sessions
- **📊 Status Monitoring**: Check system status and health
## Installation
### 🚀 Quick Start (2025)
#### From PyPI (Recommended)
```bash
# Basic CLI functionality
pip install mycli-app
# With Azure authentication support
pip install mycli-app[azure]
# With enhanced Windows authentication (Windows Hello, Microsoft Authenticator)
pip install mycli-app[broker]
```
#### Modern Package Managers
**Windows (WinGet)**
```powershell
winget install YourCompany.MyCliApp
```
**Windows (Chocolatey)**
```powershell
choco install mycli-app
```
**macOS (Homebrew)** - Coming Soon
```bash
brew install mycli-app
```
#### Standalone Executable (Windows)
Download from [GitHub Releases](https://github.com/naga-nandyala/mycli-app/releases):
- No Python installation required
- Extract and run `mycli.exe`
#### Development Installation
```bash
git clone https://github.com/naga-nandyala/mycli-app.git
cd mycli-app
pip install -e .[dev]
```
## Quick Start
1. **Install the package**:
```bash
pip install mycli-app[azure]
```
2. **Check status**:
```bash
mycli status
```
3. **Login to Azure**:
```bash
mycli login
```
4. **Start using commands**:
```bash
mycli resource list
mycli whoami
```
## Usage
### Authentication Commands
```bash
# Interactive browser login
mycli login
# Broker authentication (Windows Hello/Authenticator)
mycli login --use-broker
# Device code flow (for remote/headless scenarios)
mycli login --use-device-code
# Login with specific tenant
mycli login --tenant "your-tenant-id"
# Check authentication status
mycli whoami
# View account information
mycli account
# Check broker capabilities
mycli broker
# Logout
mycli logout
```
### Resource Management
```bash
# Create a resource
mycli resource create --name "my-vm" --location "eastus" --type "vm"
# List all resources
mycli resource list
# List resources by location
mycli resource list --location "eastus"
# List resources by type
mycli resource list --type "vm"
# Delete a resource (with confirmation)
mycli resource delete "my-vm"
```
### Configuration Management
```bash
# Set a configuration value
mycli config set --key "default_location" --value "westus"
# Show all configuration
mycli config show
# Show specific configuration key
mycli config show --key "default_location"
```
### System Commands
```bash
# Show system status
mycli status
# Show version
mycli --version
# Show help
mycli --help
# Clear authentication cache
mycli clear-cache
# Clear all cache including MSAL
mycli clear-cache --all
```
## Authentication Storage
Authentication information is stored in:
- **Windows**: `%USERPROFILE%\.mycli\config.json`
- **macOS/Linux**: `~/.mycli/config.json`
The stored information includes:
- Authentication status
- User information (user ID, display name)
- Tenant ID (if specified)
- Authentication method used
- Broker capabilities
**Note**: Actual credentials are managed securely by the Azure SDK and are not stored in plain text.
## Command Structure
```
mycli
├── resource
│ ├── create # Create a new resource
│ ├── list # List all resources
│ └── delete # Delete a resource
├── config
│ ├── set # Set configuration value
│ └── show # Show configuration
├── login # Authenticate with Azure
├── logout # Sign out from Azure
├── whoami # Show current user
├── account # Show account information
├── broker # Show broker capabilities
├── status # Show system status
├── clear-cache # Clear authentication cache
├── --help # Show help
└── --version # Show version
```
## Development
### Setting up Development Environment
1. **Clone the repository**:
```bash
git clone https://github.com/naga-nandyala/mycli-app.git
cd mycli-app
```
2. **Install in development mode**:
```bash
pip install -e .[dev]
```
3. **Run tests**:
```bash
pytest
```
4. **Format code**:
```bash
black src/
```
5. **Type checking**:
```bash
mypy src/
```
### Building and Publishing
1. **Build the package**:
```bash
python -m build
```
2. **Upload to PyPI** (requires credentials):
```bash
twine upload dist/*
```
## Configuration Options
The package supports multiple installation configurations:
| Installation | Command | Features |
|-------------|---------|----------|
| Basic | `pip install mycli-app` | Core CLI functionality |
| Azure | `pip install mycli-app[azure]` | + Azure authentication |
| Broker | `pip install mycli-app[broker]` | + Enhanced Windows authentication |
| Development | `pip install mycli-app[dev]` | + Testing and development tools |
| **WinGet** | `winget install YourCompany.MyCliApp` | **Native Windows package manager (2025)** |
| **Chocolatey** | `choco install mycli-app` | **Windows package manager** |
| **Standalone** | Download from releases | **No Python required (Windows)** |
## Requirements
- **Python**: 3.8 or higher
- **Operating System**: Windows, macOS, or Linux
- **Optional**: Azure subscription for authentication features
### Core Dependencies
- `click>=8.0.0` - Command-line interface framework
- `colorama>=0.4.0` - Cross-platform colored terminal output
### Optional Dependencies
- `azure-identity>=1.12.0` - Azure authentication
- `azure-mgmt-core>=1.3.0` - Azure management
- `azure-core>=1.24.0` - Azure core functionality
- `msal>=1.20.0` - Microsoft Authentication Library
## Example Session
```bash
$ mycli status
📊 System Status:
Service: Online
Authentication: Not Authenticated (None)
Azure SDK: Available
Version: 1.0.0
$ mycli login
🔐 Starting Azure authentication...
✓ Successfully authenticated!
User: your.email@domain.com
$ mycli resource create --name "test-vm" --type "vm"
✓ Creating vm resource...
Name: test-vm
Location: eastus
Type: vm
✓ Resource 'test-vm' created successfully!
$ mycli resource list
📋 Listing resources...
Name Type Location Status
--------------------------------------------------
myvm-001 vm eastus running
mystorage-001 storage westus active
mydb-001 database eastus running
test-vm vm eastus running
$ mycli logout
👋 Logging out...
✓ Successfully logged out!
```
## Error Handling
The application includes comprehensive error handling for:
- ❌ Missing Azure SDK packages
- ❌ Authentication failures
- ❌ Network connectivity issues
- ❌ Invalid tenant IDs
- ❌ Permission issues
- ❌ Configuration problems
## Contributing
1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## Support
- 📖 [Documentation](https://github.com/naga-nandyala/mycli-app#readme)
- 🐛 [Bug Reports](https://github.com/naga-nandyala/mycli-app/issues)
- 💬 [Discussions](https://github.com/naga-nandyala/mycli-app/discussions)
---
**Made with ❤️ for the CLI community**
Raw data
{
"_id": null,
"home_page": "https://github.com/naga-nandyala/mycli-app",
"name": "mycli-app-naga",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "cli, azure, authentication, command-line, tool",
"author": "Your Name",
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/81/7a/d5598332766aa525ae7d1330e7dd95a1f4a802a8adad035334c4232af774/mycli_app_naga-1.0.0.tar.gz",
"platform": null,
"description": "# MyCliApp\r\n\r\nA modern Python CLI application similar to Azure CLI with comprehensive Azure authentication capabilities.\r\n\r\n[](https://badge.fury.io/py/mycli-app)\r\n[](https://pypi.org/project/mycli-app/)\r\n[](https://opensource.org/licenses/MIT)\r\n\r\n## Features\r\n\r\n- **\ud83d\udd10 Multiple Authentication Methods**: \r\n - Interactive browser authentication\r\n - Broker-based authentication (Windows Hello, Microsoft Authenticator)\r\n - Device code flow for headless environments\r\n - Azure CLI credential fallback\r\n\r\n- **\ud83d\udce6 Resource Management**: Create, list, and delete resources (demo operations)\r\n- **\u2699\ufe0f Configuration Management**: Set and view configuration settings\r\n- **\ud83c\udfa8 Colorized Output**: Enhanced terminal output with colors and icons\r\n- **\ud83d\udd04 Cross-platform**: Works on Windows, macOS, and Linux\r\n- **\ud83d\udcbe Persistent Authentication**: Saves authentication state between sessions\r\n- **\ud83d\udcca Status Monitoring**: Check system status and health\r\n\r\n## Installation\r\n\r\n### \ud83d\ude80 Quick Start (2025)\r\n\r\n#### From PyPI (Recommended)\r\n```bash\r\n# Basic CLI functionality\r\npip install mycli-app\r\n\r\n# With Azure authentication support\r\npip install mycli-app[azure]\r\n\r\n# With enhanced Windows authentication (Windows Hello, Microsoft Authenticator)\r\npip install mycli-app[broker]\r\n```\r\n\r\n#### Modern Package Managers\r\n\r\n**Windows (WinGet)**\r\n```powershell\r\nwinget install YourCompany.MyCliApp\r\n```\r\n\r\n**Windows (Chocolatey)**\r\n```powershell\r\nchoco install mycli-app\r\n```\r\n\r\n**macOS (Homebrew)** - Coming Soon\r\n```bash\r\nbrew install mycli-app\r\n```\r\n\r\n#### Standalone Executable (Windows)\r\nDownload from [GitHub Releases](https://github.com/naga-nandyala/mycli-app/releases):\r\n- No Python installation required\r\n- Extract and run `mycli.exe`\r\n\r\n#### Development Installation\r\n```bash\r\ngit clone https://github.com/naga-nandyala/mycli-app.git\r\ncd mycli-app\r\npip install -e .[dev]\r\n```\r\n\r\n## Quick Start\r\n\r\n1. **Install the package**:\r\n ```bash\r\n pip install mycli-app[azure]\r\n ```\r\n\r\n2. **Check status**:\r\n ```bash\r\n mycli status\r\n ```\r\n\r\n3. **Login to Azure**:\r\n ```bash\r\n mycli login\r\n ```\r\n\r\n4. **Start using commands**:\r\n ```bash\r\n mycli resource list\r\n mycli whoami\r\n ```\r\n\r\n## Usage\r\n\r\n### Authentication Commands\r\n\r\n```bash\r\n# Interactive browser login\r\nmycli login\r\n\r\n# Broker authentication (Windows Hello/Authenticator)\r\nmycli login --use-broker\r\n\r\n# Device code flow (for remote/headless scenarios)\r\nmycli login --use-device-code\r\n\r\n# Login with specific tenant\r\nmycli login --tenant \"your-tenant-id\"\r\n\r\n# Check authentication status\r\nmycli whoami\r\n\r\n# View account information\r\nmycli account\r\n\r\n# Check broker capabilities\r\nmycli broker\r\n\r\n# Logout\r\nmycli logout\r\n```\r\n\r\n### Resource Management\r\n\r\n```bash\r\n# Create a resource\r\nmycli resource create --name \"my-vm\" --location \"eastus\" --type \"vm\"\r\n\r\n# List all resources\r\nmycli resource list\r\n\r\n# List resources by location\r\nmycli resource list --location \"eastus\"\r\n\r\n# List resources by type\r\nmycli resource list --type \"vm\"\r\n\r\n# Delete a resource (with confirmation)\r\nmycli resource delete \"my-vm\"\r\n```\r\n\r\n### Configuration Management\r\n\r\n```bash\r\n# Set a configuration value\r\nmycli config set --key \"default_location\" --value \"westus\"\r\n\r\n# Show all configuration\r\nmycli config show\r\n\r\n# Show specific configuration key\r\nmycli config show --key \"default_location\"\r\n```\r\n\r\n### System Commands\r\n\r\n```bash\r\n# Show system status\r\nmycli status\r\n\r\n# Show version\r\nmycli --version\r\n\r\n# Show help\r\nmycli --help\r\n\r\n# Clear authentication cache\r\nmycli clear-cache\r\n\r\n# Clear all cache including MSAL\r\nmycli clear-cache --all\r\n```\r\n\r\n## Authentication Storage\r\n\r\nAuthentication information is stored in:\r\n- **Windows**: `%USERPROFILE%\\.mycli\\config.json`\r\n- **macOS/Linux**: `~/.mycli/config.json`\r\n\r\nThe stored information includes:\r\n- Authentication status\r\n- User information (user ID, display name)\r\n- Tenant ID (if specified)\r\n- Authentication method used\r\n- Broker capabilities\r\n\r\n**Note**: Actual credentials are managed securely by the Azure SDK and are not stored in plain text.\r\n\r\n## Command Structure\r\n\r\n```\r\nmycli\r\n\u251c\u2500\u2500 resource\r\n\u2502 \u251c\u2500\u2500 create # Create a new resource\r\n\u2502 \u251c\u2500\u2500 list # List all resources\r\n\u2502 \u2514\u2500\u2500 delete # Delete a resource\r\n\u251c\u2500\u2500 config\r\n\u2502 \u251c\u2500\u2500 set # Set configuration value\r\n\u2502 \u2514\u2500\u2500 show # Show configuration\r\n\u251c\u2500\u2500 login # Authenticate with Azure\r\n\u251c\u2500\u2500 logout # Sign out from Azure\r\n\u251c\u2500\u2500 whoami # Show current user\r\n\u251c\u2500\u2500 account # Show account information\r\n\u251c\u2500\u2500 broker # Show broker capabilities\r\n\u251c\u2500\u2500 status # Show system status\r\n\u251c\u2500\u2500 clear-cache # Clear authentication cache\r\n\u251c\u2500\u2500 --help # Show help\r\n\u2514\u2500\u2500 --version # Show version\r\n```\r\n\r\n## Development\r\n\r\n### Setting up Development Environment\r\n\r\n1. **Clone the repository**:\r\n ```bash\r\n git clone https://github.com/naga-nandyala/mycli-app.git\r\n cd mycli-app\r\n ```\r\n\r\n2. **Install in development mode**:\r\n ```bash\r\n pip install -e .[dev]\r\n ```\r\n\r\n3. **Run tests**:\r\n ```bash\r\n pytest\r\n ```\r\n\r\n4. **Format code**:\r\n ```bash\r\n black src/\r\n ```\r\n\r\n5. **Type checking**:\r\n ```bash\r\n mypy src/\r\n ```\r\n\r\n### Building and Publishing\r\n\r\n1. **Build the package**:\r\n ```bash\r\n python -m build\r\n ```\r\n\r\n2. **Upload to PyPI** (requires credentials):\r\n ```bash\r\n twine upload dist/*\r\n ```\r\n\r\n## Configuration Options\r\n\r\nThe package supports multiple installation configurations:\r\n\r\n| Installation | Command | Features |\r\n|-------------|---------|----------|\r\n| Basic | `pip install mycli-app` | Core CLI functionality |\r\n| Azure | `pip install mycli-app[azure]` | + Azure authentication |\r\n| Broker | `pip install mycli-app[broker]` | + Enhanced Windows authentication |\r\n| Development | `pip install mycli-app[dev]` | + Testing and development tools |\r\n| **WinGet** | `winget install YourCompany.MyCliApp` | **Native Windows package manager (2025)** |\r\n| **Chocolatey** | `choco install mycli-app` | **Windows package manager** |\r\n| **Standalone** | Download from releases | **No Python required (Windows)** |\r\n\r\n## Requirements\r\n\r\n- **Python**: 3.8 or higher\r\n- **Operating System**: Windows, macOS, or Linux\r\n- **Optional**: Azure subscription for authentication features\r\n\r\n### Core Dependencies\r\n- `click>=8.0.0` - Command-line interface framework\r\n- `colorama>=0.4.0` - Cross-platform colored terminal output\r\n\r\n### Optional Dependencies\r\n- `azure-identity>=1.12.0` - Azure authentication\r\n- `azure-mgmt-core>=1.3.0` - Azure management\r\n- `azure-core>=1.24.0` - Azure core functionality\r\n- `msal>=1.20.0` - Microsoft Authentication Library\r\n\r\n## Example Session\r\n\r\n```bash\r\n$ mycli status\r\n\ud83d\udcca System Status:\r\n Service: Online\r\n Authentication: Not Authenticated (None)\r\n Azure SDK: Available\r\n Version: 1.0.0\r\n\r\n$ mycli login\r\n\ud83d\udd10 Starting Azure authentication...\r\n\u2713 Successfully authenticated!\r\n User: your.email@domain.com\r\n\r\n$ mycli resource create --name \"test-vm\" --type \"vm\"\r\n\u2713 Creating vm resource...\r\n Name: test-vm\r\n Location: eastus\r\n Type: vm\r\n\u2713 Resource 'test-vm' created successfully!\r\n\r\n$ mycli resource list\r\n\ud83d\udccb Listing resources...\r\n\r\nName Type Location Status \r\n--------------------------------------------------\r\nmyvm-001 vm eastus running \r\nmystorage-001 storage westus active \r\nmydb-001 database eastus running \r\ntest-vm vm eastus running \r\n\r\n$ mycli logout\r\n\ud83d\udc4b Logging out...\r\n\u2713 Successfully logged out!\r\n```\r\n\r\n## Error Handling\r\n\r\nThe application includes comprehensive error handling for:\r\n- \u274c Missing Azure SDK packages\r\n- \u274c Authentication failures \r\n- \u274c Network connectivity issues\r\n- \u274c Invalid tenant IDs\r\n- \u274c Permission issues\r\n- \u274c Configuration problems\r\n\r\n## Contributing\r\n\r\n1. Fork the repository\r\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\r\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\r\n4. Push to the branch (`git push origin feature/amazing-feature`)\r\n5. Open a Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\r\n\r\n## Support\r\n\r\n- \ud83d\udcd6 [Documentation](https://github.com/naga-nandyala/mycli-app#readme)\r\n- \ud83d\udc1b [Bug Reports](https://github.com/naga-nandyala/mycli-app/issues)\r\n- \ud83d\udcac [Discussions](https://github.com/naga-nandyala/mycli-app/discussions)\r\n\r\n---\r\n\r\n**Made with \u2764\ufe0f for the CLI community**\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A simple CLI application similar to Azure CLI with Azure authentication capabilities",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://github.com/naga-nandyala/mycli-app",
"documentation": "https://github.com/naga-nandyala/mycli-app#readme",
"issues": "https://github.com/naga-nandyala/mycli-app/issues",
"repository": "https://github.com/naga-nandyala/mycli-app"
},
"split_keywords": [
"cli",
" azure",
" authentication",
" command-line",
" tool"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "1d6e2c252d1b4835f0fc8c661f61d5f2454d8181a60927f246d78249eff63fd6",
"md5": "933000d96429c6c10938c41a54ca4820",
"sha256": "d889bd3fdaebce5e235dcdabd4fd2c240a0fe27638aa2e9b1857c8237b7c81b9"
},
"downloads": -1,
"filename": "mycli_app_naga-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "933000d96429c6c10938c41a54ca4820",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 14817,
"upload_time": "2025-08-25T03:40:10",
"upload_time_iso_8601": "2025-08-25T03:40:10.954776Z",
"url": "https://files.pythonhosted.org/packages/1d/6e/2c252d1b4835f0fc8c661f61d5f2454d8181a60927f246d78249eff63fd6/mycli_app_naga-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "817ad5598332766aa525ae7d1330e7dd95a1f4a802a8adad035334c4232af774",
"md5": "0648d63b91332a90831e2cc49a82dc04",
"sha256": "0242066eb4f82f429f056cd6dee9c9b4f3607ee665ba979e651e38f0ae0cb5d2"
},
"downloads": -1,
"filename": "mycli_app_naga-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "0648d63b91332a90831e2cc49a82dc04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 20132,
"upload_time": "2025-08-25T03:40:12",
"upload_time_iso_8601": "2025-08-25T03:40:12.439377Z",
"url": "https://files.pythonhosted.org/packages/81/7a/d5598332766aa525ae7d1330e7dd95a1f4a802a8adad035334c4232af774/mycli_app_naga-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-25 03:40:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "naga-nandyala",
"github_project": "mycli-app",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "click",
"specs": [
[
">=",
"8.0.0"
]
]
},
{
"name": "colorama",
"specs": [
[
">=",
"0.4.0"
]
]
},
{
"name": "setuptools",
"specs": [
[
">=",
"45.0.0"
]
]
},
{
"name": "wheel",
"specs": [
[
">=",
"0.36.0"
]
]
}
],
"lcname": "mycli-app-naga"
}