Skip to main content

SAGE development CLI tools โ€” sage-dev command and developer utilities (L5)

Project description

SAGE Dev Tools

Development tools and utilities for the SAGE framework ecosystem.

๐Ÿ“‹ Overview

sage-dev-tools provides a comprehensive suite of development utilities for SAGE framework maintainers and contributors. This repository consolidates development scripts, maintenance tools, and reporting utilities that were previously scattered across the SAGE monorepo.

๐ŸŽฏ Purpose

This repository serves as a central hub for:

  1. Work Report Generation - Automated weekly/monthly/quarterly/yearly reports
  2. Code Maintenance - Cluster sync, Git optimization, migration scripts
  3. Quality Assurance - Code quality checks and validation tools
  4. Documentation Tools - Doc validation and organization utilities
  5. Development Scripts - Various helper scripts for SAGE development

๐Ÿš€ Installation

From PyPI

# Basic installation
pip install isage-dev-tools

# With LLM support (for AI-powered work reports)
pip install isage-dev-tools[llm]

# Development installation
pip install isage-dev-tools[dev]

# Full installation
pip install isage-dev-tools[all]

From Source

git clone https://github.com/intellistream/sage-dev-tools.git
cd sage-dev-tools
pip install -e ".[dev]"

๐Ÿ“ฆ Features

๐Ÿ—‚๏ธ Work Report Generator

Generate comprehensive work reports with AI-powered summaries:

# Weekly report
sage-dev-tools report --period weekly

# Monthly report with AI summaries
sage-dev-tools report --period monthly --use-llm

# Custom date range
sage-dev-tools report --days 14 --output my_report.md

# Specific repositories
sage-dev-tools report --repos "SAGE,sage-examples,sagellm"

๐Ÿ”ง Maintenance Tools

# Sync code to cluster
sage-dev-tools maintenance sync-cluster --config cluster.yaml

# Optimize Git repository
sage-dev-tools maintenance optimize-git

# Migrate tutorials
sage-dev-tools maintenance migrate-tutorials --from SAGE --to sage-tutorials

โœ… Quality Tools

# Check intermediate file placement policy
sage-dev-tools quality check-placement --project-root .

# Find orphaned Python files
sage-dev-tools quality find-orphaned --project-root . --verbose

# Batch update ruff ignore rules
sage-dev-tools quality update-ruff --rules B904,C901

# Validate documentation metadata and structure
sage-dev-tools docs validate --project-root .

๐Ÿ› ๏ธ Utility Scripts

Located in scripts/ directory:

  • setup_workspace.sh - Set up development workspace
  • verify_compliance.sh - Verify architectural compliance
  • migrate_*.sh - Various migration scripts

๐Ÿ“– Usage

Work Report Generation

The work report generator analyzes Git history across SAGE repositories and generates comprehensive reports:

Features:

  • Multi-repository support (SAGE main + submodules)
  • Configurable time periods (weekly/monthly/quarterly/yearly)
  • AI-powered commit summaries (optional)
  • Multiple output formats (Markdown/JSON/Console)
  • Bilingual support (ไธญๆ–‡/English)

Configuration:

Create a .env file:

# GitHub Token (required for private repos)
GITHUB_TOKEN=ghp_xxx
GIT_TOKEN=ghp_xxx

# LLM Configuration (optional, for AI summaries)
SAGE_CHAT_API_KEY=sk-xxx
SAGE_CHAT_BASE_URL=https://api.openai.com/v1
SAGE_CHAT_MODEL=gpt-4

# HuggingFace (optional)
HF_TOKEN=hf_xxx

Example:

# Generate weekly report with AI summaries
sage-dev-tools report \
    --period weekly \
    --branch main-dev \
    --format markdown \
    --language zh \
    --use-llm \
    --output reports/weekly_report.md

Maintenance Operations

Sync code to remote cluster:

sage-dev-tools maintenance sync-cluster \
    --config config/cluster.yaml \
    --target node1,node2

Optimize Git repository:

sage-dev-tools maintenance optimize-git \
    --gc \
    --prune \
    --repack

๐Ÿ—๏ธ Architecture

sage-dev-tools/
โ”œโ”€โ”€ src/sage_dev_tools/
โ”‚   โ”œโ”€โ”€ cli/           # CLI commands (Click)
โ”‚   โ”œโ”€โ”€ work_report/   # Work report generator
โ”‚   โ”œโ”€โ”€ maintenance/   # Maintenance tools
โ”‚   โ”œโ”€โ”€ quality/       # Code quality tools
โ”‚   โ”œโ”€โ”€ docs/          # Documentation tools
โ”‚   โ””โ”€โ”€ utils/         # Shared utilities
โ”œโ”€โ”€ scripts/           # Standalone helper scripts
โ”œโ”€โ”€ tests/             # Test suite
โ””โ”€โ”€ docs/              # Documentation

๐Ÿงญ Boundary Contract (L5)

This repository is an L5 developer-tooling package. Boundary rules:

  • In scope:
    • Cross-repository developer workflows (report, maintenance, quality, docs)
    • CLI orchestration and reusable utility modules under sage_dev_tools/*
  • Out of scope:
    • Runtime/service implementations from lower layers
    • Compatibility shim layers for legacy paths
  • Forbidden patterns:
    • New fallback/shim/re-export compatibility entry points
    • Silent fallback behavior that masks missing dependencies/config

Reference design notes:

  • docs/adr/0001-wave-d3-quality-command-regression.md
  • docs/adr/0002-wave-d1-cli-thin-layer.md

๐Ÿ”— Relationship with SAGE Ecosystem

sage-tools (isage-tools)

  • Purpose: Framework-integrated development CLI
  • PyPI: isage-tools
  • Import: sage.tools
  • CLI: sage-dev
  • Scope: SAGE framework development (L5 layer)

sage-dev-tools (isage-dev-tools)

  • Purpose: Standalone development utilities
  • PyPI: isage-dev-tools
  • Import: sage_dev_tools
  • CLI: sage-dev-tools
  • Scope: Cross-repository maintenance and reporting

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests
  5. Submit a pull request

See CONTRIBUTING.md for details.

๐Ÿ“ Migration Notes

This repository consolidates tools migrated from:

  • SAGE/tools/scripts/
  • SAGE/tools/maintenance/
  • SAGE/tools/lib/
  • Workflow-embedded utilities (work report generator)

Files that remain in SAGE main repo:

  • tools/install/ - Installation scripts
  • tools/hooks/ - Git hooks
  • tools/config/ - Project-specific configs

๐Ÿ“„ License

Apache License 2.0 - See LICENSE

๐Ÿ™‹ Support

๐ŸŽฏ Roadmap

  • Project structure setup
  • Work report generator implementation
  • Maintenance tools migration
  • Quality tools migration
  • Documentation tools
  • PyPI publication
  • SAGE workflow integration
  • Comprehensive test coverage

Part of the SAGE Framework Ecosystem - https://github.com/intellistream/SAGE

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

isage_dev_tools-0.2.4.10.tar.gz (202.7 kB view details)

Uploaded Source

Built Distribution

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

isage_dev_tools-0.2.4.10-py2.py3-none-any.whl (236.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file isage_dev_tools-0.2.4.10.tar.gz.

File metadata

  • Download URL: isage_dev_tools-0.2.4.10.tar.gz
  • Upload date:
  • Size: 202.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for isage_dev_tools-0.2.4.10.tar.gz
Algorithm Hash digest
SHA256 ff71e764389a842d938acd4df711e9205db1bf99a7458d25c22a36f7266d706b
MD5 f865b17db71064a6d29ba5852f37004f
BLAKE2b-256 90b917ebd94dbeabaf75bdcdef6ffcfa0b9ef3d9d820a8459c35f567727907ba

See more details on using hashes here.

File details

Details for the file isage_dev_tools-0.2.4.10-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for isage_dev_tools-0.2.4.10-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 604930c7cb6799836dfc4ea0f01b8df87678f2ca78f61a0a3c6a6a2f91126cf6
MD5 632ce083a9c5c79b2eb99663f295a63b
BLAKE2b-256 7fe670691788d2970d6a4ff9cd308fbb6f29ff981996cd8f774e70c714310de9

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