sreeragh
v1.0.2
Published
Interactive CLI for Sreeragh's portfolio
Maintainers
Readme
Sreeragh CLI
An interactive command-line interface for exploring Sreeragh's portfolio, built with TypeScript and Node.js.
Features
- 🚀 Interactive Portfolio: Explore projects, skills, and experience
- ⌨️ Typing Test: Built-in typing test with real-time feedback
- 📝 Blog Integration: Read blog posts directly from the CLI
- 🎨 Beautiful UI: Colorful and well-formatted terminal output
- 📊 Real-time Data: Fetches live data from https://sreeragh.me
- 🔧 Cross-platform: Works on Windows, macOS, and Linux
Installation
Global Installation (Recommended)
npm install -g sreeragh-cliFrom Source
git clone <repository-url>
cd sreeragh
npm install
npm run build
npm linkUsage
Basic Commands
# Show general information
sreeragh about
# View projects and works
sreeragh works
sreeragh works --interactive # Interactive mode
sreeragh works --list # List format
# View technical skills
sreeragh skills
sreeragh skills frontend # Specific category
# Start typing test
sreeragh typing
sreeragh typing 60 # 60-second test
# Contact information
sreeragh contact
# Blog posts
sreeragh blog
# Interactive mode
sreeragh interactiveCommand Aliases
Most commands have convenient aliases:
about→whoami,infoworks→projects,portfolioskills→tech,stacktyping→type,monkeytype
Options
# Show help
sreeragh --help
sreeragh <command> --help
# Version information
sreeragh --version
# Verbose output
sreeragh --verbose <command>
# Disable colors
sreeragh --no-color <command>Examples
Explore Projects Interactively
sreeragh works --interactiveThis will show an interactive list where you can:
- Navigate with arrow keys
- View detailed project information
- Open project URLs in your browser
Quick Skills Lookup
# View all skills
sreeragh skills
# View frontend skills only
sreeragh skills frontend
# View backend skills only
sreeragh skills backendTyping Test
# Default 60-second test
sreeragh typing
# Custom duration (10-300 seconds)
sreeragh typing 30
sreeragh typing 120The typing test includes:
- Real-time WPM calculation
- Accuracy tracking
- Error counting
- Performance feedback
- Colorized text (green for correct, red for errors)
Development
Prerequisites
- Node.js 14.0.0 or higher
- npm or yarn
Setup
# Clone the repository
git clone <repository-url>
cd sreeragh
# Install dependencies
npm install
# Development mode
npm run dev
# Build for production
npm run build
# Run built version
npm startProject Structure
src/
├── commands/ # Command implementations
│ ├── about.ts
│ ├── works.ts
│ ├── skills.ts
│ └── typing.ts
├── services/ # API and external services
│ └── api.ts
├── utils/ # Utility functions
│ ├── display.ts
│ └── typing-test.ts
├── types/ # TypeScript type definitions
│ └── index.ts
├── cli.ts # Main CLI application class
└── index.ts # Entry pointAdding New Commands
- Create a new command class in
src/commands/ - Extend
BaseCommand - Implement required methods and properties
- Register the command in
src/cli.ts
Example:
import { BaseCommand } from './base';
import { CLIContext } from '../types';
export class NewCommand extends BaseCommand {
name = 'new';
description = 'A new command';
aliases = ['n'];
async execute(args: string[], context: CLIContext): Promise<void> {
this.log('Hello from new command!');
}
}API Integration
The CLI fetches data from https://sreeragh.me with the following endpoints:
GET /api/portfolio- Portfolio dataGET /api/blog- Blog postsGET /api/blog/:slug- Individual blog post
The CLI includes fallback mechanisms and graceful error handling when the API is unavailable.
Dependencies
Runtime Dependencies
axios- HTTP client for API requestschalk- Terminal stylingcommander- Command-line argument parsinginquirer- Interactive promptsora- Loading spinnersboxen- Terminal boxesfiglet- ASCII art textgradient-string- Gradient text effects
Development Dependencies
typescript- TypeScript compilerts-node- TypeScript execution@types/*- Type definitions
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
License
MIT License - see LICENSE file for details
Contact
- Email: [email protected]
- GitHub: https://github.com/sreeragh-s/
- Twitter: https://x.com/sreeragh_s
- Website: https://sreeragh.me
Built with ❤️ by Sreeragh S
