Files
zzpyjenkins/CLAUDE.md
tech 54838dba25 Add command-line options for Jenkins credentials
Allow passing URL, username, and password via global options (-u, -U, -P)
as an alternative to environment variables. Options take precedence over
environment variables.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 12:48:21 +08:00

1.2 KiB

CLAUDE.md

This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.

Project Overview

zzpyjenkins is a CLI tool to interact with Jenkins servers for building jobs. It wraps the python-jenkins library with a user-friendly CLI using Click and rich terminal output.

Development Commands

# Install dependencies
uv sync

# Run the CLI
uv run zzpyjenkins --help

# Format code
uv run ruff format .

# Lint
uv run ruff check .

# Run tests
uv run pytest

Architecture

  • src/zzpyjenkins/cli.py: Click-based CLI entry point. Defines commands (info, list, build, status, watch) and handles parameter parsing. Uses get_client() to create JenkinsClient from environment variables.

  • src/zzpyjenkins/jenkins_client.py: JenkinsClient class that wraps python-jenkins library. Handles all Jenkins API interactions and formats output using Rich (tables, colored status).

Configuration

Credentials can be passed via command-line options (-u/--url, -U/--username, -P/--password) or environment variables (JENKINS_URL, JENKINS_USERNAME, JENKINS_PASSWORD or JENKINS_TOKEN).