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:
- Work Report Generation - Automated weekly/monthly/quarterly/yearly reports
- Code Maintenance - Cluster sync, Git optimization, migration scripts
- Quality Assurance - Code quality checks and validation tools
- Documentation Tools - Doc validation and organization utilities
- 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 workspaceverify_compliance.sh- Verify architectural compliancemigrate_*.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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- 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 scriptstools/hooks/- Git hookstools/config/- Project-specific configs
๐ License
Apache License 2.0 - See LICENSE
๐ Support
- Issues: https://github.com/intellistream/sage-dev-tools/issues
- SAGE Docs: https://sage.intellistream.com
- Team Info: https://github.com/intellistream/sage-team-info
๐ฏ 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file isage_dev_tools-0.2.4.9.tar.gz.
File metadata
- Download URL: isage_dev_tools-0.2.4.9.tar.gz
- Upload date:
- Size: 201.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
83d02b2ecc8e0bda5fdcbacb9aa3380a315a7ecbac6c2b821a706f6719277e6c
|
|
| MD5 |
ce0d106d8864f8f7397bc31bc8441171
|
|
| BLAKE2b-256 |
bcde0547ec47c4f023975a19fcf8f87dc5bfdcaefacc361d89317c25de2780aa
|
File details
Details for the file isage_dev_tools-0.2.4.9-py2.py3-none-any.whl.
File metadata
- Download URL: isage_dev_tools-0.2.4.9-py2.py3-none-any.whl
- Upload date:
- Size: 236.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d3df540996212e6180c82ce8ca56c50b87b3a80596dcc95f69cf040e06048eac
|
|
| MD5 |
cb800d367d104a0ca9d6d17a1024e4d2
|
|
| BLAKE2b-256 |
86f4d4ab0f29de5d075b165c1dbec763ac8e1843aae73078eb68b7ffc684b8c7
|