termshow
Version:
A powerful CLI tool for creating terminal-based presentations with live coding support, featuring auto-execution, process management, and beautiful terminal UI.
133 lines (103 loc) ⢠4.2 kB
Markdown
# TermShow
[](https://github.com/0xElAnas/termshow/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/termshow)
[](https://opensource.org/licenses/MIT)
[](http://makeapullrequest.com)
[](https://github.com/0xElAnas/termshow/graphs/commit-activity)
TermShow is a powerful CLI tool for creating terminal-based presentations with live coding support. It allows you to create interactive presentations using Markdown, execute commands live, and demonstrate coding concepts in real-time.
## Features
- š Markdown-based slides with syntax highlighting
- š Live command execution within slides
- š Process termination with any key press
- š Visual indicators for running commands
- āØļø Simple keyboard navigation
- šØ Beautiful terminal UI with chalk styling
## Installation
```bash
npm install -g termshow
```
## Usage Guide
### Basic Usage
```bash
termshow presentation.md
```
### Navigation Controls
- `ā` or `Space`: Next slide
- `ā`: Previous slide
- `q`: Quit presentation
- `Enter`: Execute commands (if any)
- `1-9`: Execute specific command (when multiple commands are available)
- `Any key`: Stop running process
### Markdown Syntax
```markdown
# Slide Title
Regular markdown content...
```bash
# Command blocks
$ echo "Hello World"
```
```bash
# Multiple commands
$ sleep 5
$ echo "Done"
```
> Note: Commands starting with `$` will be executable. Press Enter to execute commands or use number keys for specific commands.
## Examples
Check out the `examples/` directory for sample presentations:
- `presentation.md`: Basic presentation example
- `commands.md`: Command execution examples
- `nodejs.md`: Node.js tutorial example
- `system.md`: System commands demonstration
## Development
### Setup
1. Clone the repository:
```bash
git clone https://github.com/0xElAnas/termshow.git
cd termshow
```
2. Install dependencies:
```bash
npm install
```
3. Build the project:
```bash
npm run build
```
### Project Structure
```
termshow/
āāā src/ # Source code
ā āāā cli.ts # CLI entry point
ā āāā parser.ts # Markdown parsing and command extraction
ā āāā renderer.ts # Terminal rendering and command execution
āāā examples/ # Example presentations
ā āāā presentation.md # Basic presentation example
ā āāā commands.md # Command execution examples
ā āāā nodejs.md # Node.js tutorial example
ā āāā system.md # System commands demonstration
āāā bin/ # Binary scripts
ā āāā termshow.js # CLI executable
āāā dist/ # Compiled JavaScript
āāā .github/ # GitHub specific files
ā āāā workflows/ # GitHub Actions workflows
ā ā āāā ci.yml # Continuous Integration
ā ā āāā publish.yml # Automated publishing
ā āāā ISSUE_TEMPLATE/ # Issue templates
ā āāā bug_report.md
ā āāā feature_request.md
āāā tests/ # Test files
āāā .gitignore # Git ignore rules
āāā .eslintrc.json # ESLint configuration
āāā .prettierrc # Prettier configuration
āāā jest.config.js # Jest configuration
āāā tsconfig.json # TypeScript configuration
āāā package.json # Project configuration and dependencies
āāā package-lock.json # Dependency lock file
āāā README.md # Project documentation
āāā CHANGELOG.md # Version history
āāā CONTRIBUTING.md # Contribution guidelines
āāā CODE_OF_CONDUCT.md # Code of conduct
āāā LICENSE # MIT License
```
## License
MIT License - see LICENSE file for details