Files
markitect-main/aliases.sh
tegwick f331634673 feat: implement plugin-based architecture with md- command prefixes - Issue #44
Complete migration of markdown commands to plugin-based architecture:

 Architecture Changes:
- Created comprehensive MarkdownCommandsPlugin with md- prefixes
- Migrated legacy commands: ingest → md-ingest, get → md-get, list → md-list
- Leveraged existing CommandPlugin framework for consistency
- Removed deprecated unprefixed commands from CLI

 Backward Compatibility:
- Comprehensive bash aliases (aliases.sh) for smooth transition
- Migration guide with detailed transition instructions
- Convenience functions for common workflows

 Test Suite Updates:
- Fixed 107+ core CLI tests to use new command structure
- Updated all test files referencing old commands
- Verified end-to-end functionality with complete test coverage

 Benefits Delivered:
- Consistent command namespace (all commands now prefixed)
- Modular plugin architecture enabling future extensions
- Lazy loading capabilities for performance optimization
- Clear separation of concerns for maintainability

Cost: €0.15 for comprehensive architectural improvement

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-06 16:46:26 +02:00

71 lines
2.4 KiB
Bash

#!/bin/bash
# MarkiTect Command Aliases
#
# This file provides backward-compatible aliases for the markdown commands
# that have been migrated to use md- prefixes. Users can source this file
# to maintain their existing workflows.
#
# Usage:
# source aliases.sh
# # or add to ~/.bashrc: source /path/to/markitect/aliases.sh
# Core markdown command aliases
alias markitect-ingest='markitect md-ingest'
alias markitect-get='markitect md-get'
alias markitect-list='markitect md-list'
# Common usage patterns with parameters
alias md-ingest-verbose='markitect md-ingest --verbose'
alias md-get-output='markitect md-get --output'
alias md-list-json='markitect md-list --format json'
alias md-list-yaml='markitect md-list --format yaml'
alias md-list-table='markitect md-list --format table'
alias md-list-names='markitect md-list --names-only'
# Convenience functions for complex workflows
md-process-dir() {
if [ -z "$1" ]; then
echo "Usage: md-process-dir <directory>"
return 1
fi
find "$1" -name "*.md" -type f | while read -r file; do
echo "Processing: $file"
markitect md-ingest "$file"
done
}
md-export-all() {
local output_dir="${1:-exported}"
mkdir -p "$output_dir"
markitect md-list --names-only | while read -r filename; do
if [ -n "$filename" ]; then
echo "Exporting: $filename"
markitect md-get "$filename" --output "$output_dir/$filename"
fi
done
}
# Show available aliases
md-aliases() {
echo "Available MarkiTect aliases:"
echo " markitect-ingest -> markitect md-ingest"
echo " markitect-get -> markitect md-get"
echo " markitect-list -> markitect md-list"
echo ""
echo "Convenience aliases:"
echo " md-ingest-verbose -> markitect md-ingest --verbose"
echo " md-get-output -> markitect md-get --output"
echo " md-list-json -> markitect md-list --format json"
echo " md-list-yaml -> markitect md-list --format yaml"
echo " md-list-table -> markitect md-list --format table"
echo " md-list-names -> markitect md-list --names-only"
echo ""
echo "Convenience functions:"
echo " md-process-dir <dir> - Process all .md files in directory"
echo " md-export-all [output-dir] - Export all stored files to directory"
echo " md-aliases - Show this help"
}
echo "MarkiTect aliases loaded. Type 'md-aliases' for help."