cli-dev

Wrap backend API endpoints with CLI commands using cmd2 and httpx.

Updated May 31, 2025
One-click install
npx skills add https://github.com/dEitY719/dotfiles --skill cli-dev-deity719
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: cli-dev
Source: https://github.com/dEitY719/dotfiles/tree/main/claude/skills/cli-dev
Command: npx skills add https://github.com/dEitY719/dotfiles --skill cli-dev-deity719

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

CLI development often requires bridging frontend commands to backend services. This skill provides a structured workflow to implement CLI commands that wrap API endpoints, enabling automated testing and developer-focused tooling.

Core Features & Use Cases

  • TDD-driven workflow with pytest for CLI actions and tests in tests/cli
  • Rich console formatting and session state management for interactive sessions
  • Scalable project structure under src/cli and tests/cli for maintainability

Quick Start

Follow the workflow to read requirements, write tests, implement actions, and run tests and lint checks.

Frequently Asked Questions about cli-dev

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure a Python CLI project to wrap backend API endpoints using TDD?▼

Structure a Python CLI project using a TDD approach by placing actions in src/cli and tests in tests/cli. This layout enforces maintainability while wrapping backend API endpoints for developer testing and automation.

What's the best way to test CLI commands that make HTTP API calls?▼

The best way to test CLI commands making HTTP API calls is using a TDD workflow with pytest. Write tests in tests/cli first, then implement actions using httpx for API calls to ensure endpoints are properly wrapped.

How does cmd2 work with rich for interactive CLI session state management?▼

cmd2 works with rich by parsing CLI commands and formatting console output. The integration provides interactive session state management, allowing developers to maintain context across multiple API calls within a structured project layout.

Can I use pytest with httpx to automate testing of CLI actions that hit backend services?▼

Yes, you can use pytest with httpx to automate testing of CLI actions. The workflow requires writing tests in tests/cli first, then implementing actions that use httpx for API calls to validate backend service integration.

Why does my CLI project layout need separate src/cli and tests/cli directories?▼

Your CLI project layout needs separate src/cli and tests/cli directories to enforce a scalable and maintainable structure. This separation supports the TDD workflow with pytest, keeping actions and tests organized for automated testing.