freshcrate
Home > Developer Tools > gardener

gardener

Practical CLI tool for maintaining open source repositories.

Description

Practical CLI tool for maintaining open source repositories.

README

gardener

实用开源仓库维护工具:自动生成Changelog、PR描述、Issue打标。

我建这个用来自动化处理多个开源项目的日常重复劳动。它通过将 Git 历史和 GitHub API 结合大模型(OpenAI 或是本地免费 Ollama),让维护工作完全留在终端内。

Topics: python github maintenance cli-tool open-source

实战展示 (Eating our own dog food)

以下是使用 gardener 本身工具维护时的控制台真实输出情况:

自动生成真实日志 (gardener changelog):

$ gardener changelog --since 2026-03-01

## [0.3.1] - 2026-03-07

### Added
- GitHub API issue labeling command (`gardener issue-label`)
- Real CHANGELOG generation via `gardener changelog`

### Changed
- Refactored CLI entry point with Typer module

自动生成 PR 摘要 (gardener pr-desc):

$ gardener pr-desc --branch feature/issue-label

## PR Summary
This PR introduces the new `issue-label` command and refactors the core LLM provider.

## Changes
- Added `label_issue` to `core.py`
- Registered `issue-label` in `cli.py`
- Configured GitHub API token fallback

## Impact
- Users can now triage issues directly from the CLI.

Features

  • Changelog generation from git commit history
  • PR descriptions generated from branch diffs
  • Issue triage with automatic label suggestions
  • Repository health stats — file counts, commit history, completeness scoring
  • README analysis with improvement suggestions
  • Template engine for standardized issue/PR/release documents
  • Multi-backend LLM — OpenAI API or Ollama (local, free)

Install

git clone https://github.com/uu1202hq-crypto/gardener.git
cd gardener
pip install -e .

For development:

pip install -e ".[dev]"
pre-commit install

Quick Start

# Check repo health
gardener stats

# Generate changelog since a date
gardener changelog --since 2026-01-01

# Generate PR description
gardener pr-desc --branch feature/new-command

# Suggest labels for an issue
gardener issue-label --title "App crashes on empty repo"

# README improvement suggestions
gardener readme-suggest --path README.md

# List available templates
gardener template list

# Triage open issues (dry run)
gardener triage --owner myuser --repo myproject

Configuration

Copy .env.example to .env and fill in your keys:

cp .env.example .env
Variable Default Description
OPENAI_API_KEY OpenAI API key
OPENAI_MODEL gpt-4o-mini Model name
OLLAMA_BASE_URL http://localhost:11434 Ollama URL
GITHUB_TOKEN PAT for GitHub API commands

If no OpenAI key is set, gardener automatically falls back to Ollama.

Project Structure

src/gardener/
├── cli.py             # CLI commands (typer)
├── config.py          # Environment config
├── core.py            # Business logic
├── providers.py       # LLM backends (OpenAI/Ollama)
├── analytics.py       # Repo analysis & health scoring
├── github_client.py   # GitHub REST API client
├── templates.py       # Jinja2 template engine
└── utils.py           # Shared helpers

Development

# Run tests
pytest tests/ -v

# Lint
ruff check src/ tests/

# Type check
mypy src/gardener/

License

MIT

Release History

VersionChangesUrgencyDate
0.0.0No release found — using repo HEADLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026
main@2026-03-07Latest activity on main branchLow3/7/2026

Dependencies & License Audit

Loading dependencies...

Similar Packages

pddPrompt Driven Development Command Line Interfacemain@2026-04-21
ossatureAn open-source harness for spec-driven code generation.master@2026-04-18
rjobsCLI tool to search and rank remote job opportunities0.0.0
OSATool that just makes your open source project better using LLM agentsv0.2.10
VideoGraphAI🎬 AI-powered YouTube Shorts automation tool using LLMs, real-time search, and text-to-speech. Create engaging short-form videos with automated research, voiceovers, and subtitles.0.0.0