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 code quality
sage-dev-tools quality check

# Validate documentation
sage-dev-tools docs validate

# Check architecture compliance
sage-dev-tools quality check-architecture

๐Ÿ› ๏ธ 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

๐Ÿ”— 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.7.tar.gz (201.6 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.7-py2.py3-none-any.whl (236.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: isage_dev_tools-0.2.4.7.tar.gz
  • Upload date:
  • Size: 201.6 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.7.tar.gz
Algorithm Hash digest
SHA256 c3ecd4b1d1eca337e92232b7f33111abd7d3434a90568ff81436fcc0081cbcb3
MD5 1f3600bb373f5bc7fee6e7f0f130122b
BLAKE2b-256 3e315cb65777be1cb78b3be068ee9d3c76dbc9fd0adb7110caa209700ac8759e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for isage_dev_tools-0.2.4.7-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 9e52d4efcd911ee4f64f09a55ffb4ce1ac70f681dec5a52efc84c2f66bbcc838
MD5 5a04df62828a8ad71c0732fc17a6d0fd
BLAKE2b-256 02723cf1cfc0638d59185def6a71d78bec17cea8f2e5ea400b637e54b94697b9

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