A CLI tool built with Click and Rich to interact with Jenkins servers. Provides commands for viewing server info, listing jobs, triggering builds, checking build status, and watching build progress. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1.1 KiB
1.1 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. Usesget_client()to createJenkinsClientfrom environment variables. -
src/zzpyjenkins/jenkins_client.py:JenkinsClientclass that wrapspython-jenkinslibrary. Handles all Jenkins API interactions and formats output using Rich (tables, colored status).
Configuration
The tool requires these environment variables:
JENKINS_URL: Jenkins server URLJENKINS_USERNAME: Jenkins usernameJENKINS_PASSWORDorJENKINS_TOKEN: API token or password