Skip to main content

A suite of CLI utilities for account pool and device spy services.

Project description

My CLI Utilities

A suite of powerful CLI tools for interacting with Account Pool and Device Spy services. This package provides two main utilities: ap for account management and ds for device management.

🚀 Features

  • Account Pool CLI (ap): Manage and query accounts from the account pool service
  • Device Spy CLI (ds): Monitor and interact with devices in the device spy system
  • User-friendly interface: Beautiful emoji-enhanced output with pagination
  • Smart caching: Index-based access for faster operations
  • Flexible search: Support for various query patterns including IP suffix matching

📦 Installation

From PyPI (Recommended)

pip install my-cli-utilities

From Source

git clone <repository-url>
cd my-cli-utilities
pip install .

Development Installation

git clone <repository-url>
cd my-cli-utilities
make setup

🔧 Usage

Account Pool CLI (ap)

Quick Start

# List available account types
ap types

# Get a random account by type name
ap get "kamino2(CI-Common-4U,mThor,brand=1210)"

# Get a random account by index (from types list)
ap get 2

# Get account details by phone number
ap info 12495002020

# Get account by ID
ap by_id 507f1f77bcf86cd799439011

Available Commands

  • ap types [filter] [brand] - List account types with optional filtering
  • ap get <type|index> [env] - Get random account by type or index
  • ap info <phone> [env] - Get account details by phone number
  • ap by_id <id> [env] - Get account details by ID
  • ap cache [clear] - Manage cache (view status or clear)
  • ap help - Show detailed help

Device Spy CLI (ds)

Quick Start

# Get device information
ds udid A1B2C3D4E5F6

# List available devices
ds devices android
ds devices ios

# Find hosts
ds host lab                 # Search by keyword
ds host .201               # Search by IP suffix
ds host XMNA067            # Search by alias

Available Commands

  • ds info <udid> - Get detailed device information
  • ds devices <platform> - List available devices (android/ios)
  • ds host <query> - Find host by various criteria
  • ds help - Show detailed help

💡 Advanced Features

Smart Caching

The account pool CLI automatically caches account types for faster access:

ap types           # Cache account types
ap get 5          # Use index instead of long type name
ap cache          # View cache status
ap cache clear    # Clear cache

Flexible Host Search

The device spy CLI supports multiple search patterns:

ds host 192.168    # Find hosts containing IP pattern
ds host .201       # Find hosts ending with .201
ds host lab        # Find hosts with 'lab' in any field
ds host 15.4       # Find hosts with macOS version 15.4

Pagination

Both tools support interactive pagination for long lists:

  • Press Enter to continue to next page
  • Type 'q' to quit viewing

🛠️ Development

Setup Development Environment

make setup          # Install dev dependencies
make build          # Build the package
make install-dev    # Install in editable mode

Build and Release

make build          # Build package
make upload-test    # Upload to TestPyPI
make upload         # Upload to PyPI

Project Structure

my-cli-utilities/
├── account_pool_cli/           # Account Pool CLI
├── device_spy_cli/             # Device Spy CLI  
├── my_cli_utilities_common/    # Shared utilities
│   ├── http_helpers.py         # HTTP request helpers
│   └── pagination.py           # Pagination utilities
├── .cursor/                    # Coding rules and patterns
├── pyproject.toml              # Project configuration
├── Makefile                    # Build automation
└── README.md                   # This file

🔧 Configuration

Default Settings

  • Account Pool: Default environment is webaqaxmn, brand 1210
  • Device Spy: Supports both Android and iOS platforms
  • Pagination: 5 items per page by default
  • Cache: Stored in system temp directory

Environment Variables

No environment variables required - all configuration is built-in with sensible defaults.

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature-name
  3. Make your changes following the coding standards in .cursor/
  4. Test your changes: make build && make install-dev
  5. Submit a pull request

📝 License

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

🆘 Support

For issues and questions:

  1. Check the help: ap help or ds help
  2. Review the examples in this README
  3. Create an issue on the project repository

Happy CLI-ing! 🚀

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

my_cli_utilities-0.2.8.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

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

my_cli_utilities-0.2.8-py3-none-any.whl (47.5 kB view details)

Uploaded Python 3

File details

Details for the file my_cli_utilities-0.2.8.tar.gz.

File metadata

  • Download URL: my_cli_utilities-0.2.8.tar.gz
  • Upload date:
  • Size: 42.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for my_cli_utilities-0.2.8.tar.gz
Algorithm Hash digest
SHA256 44a8b3cd3c36f6f772ace85c9ef7974050d72475cd9c1df46deb66357ae37e14
MD5 a7fcb5fa49bcf2a994b32c44c4c73ef0
BLAKE2b-256 04c9f4d8b5b6f7875c7fad198e8c0271d88f1e77a65f7c63c40250f0f894d5b5

See more details on using hashes here.

File details

Details for the file my_cli_utilities-0.2.8-py3-none-any.whl.

File metadata

File hashes

Hashes for my_cli_utilities-0.2.8-py3-none-any.whl
Algorithm Hash digest
SHA256 7426538b0034528562360e739ec47030f6aaec2df79f6dee7ef0ae644c474793
MD5 0ba80f6efcebaf6e7eecbcce3e8ad93d
BLAKE2b-256 afb5d4d40b0f091799e933ea937643e08414ab75716850433b9f295475ed82e1

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