Skip to content

Latest commit

Β 

History

History
87 lines (61 loc) Β· 1.69 KB

File metadata and controls

87 lines (61 loc) Β· 1.69 KB

Terminal CLI Template

A simple, clean terminal-based CLI template with a web interface. Perfect for building command-line applications with a retro terminal aesthetic.

Features

  • πŸ–₯️ Retro terminal interface
  • ⌨️ Command-line interface
  • 🎨 Customizable styling
  • πŸ“± Responsive design
  • πŸš€ Built with Express.js

Getting Started

Installation

npm install

Running the Application

npm start

Or for development with auto-reload:

npm run dev

The application will be available at http://localhost:3000

Built-in Commands

  • /help - Show available commands
  • /clear - Clear the terminal screen
  • /time - Display current time
  • /echo <text> - Echo back the text

Keyboard Shortcuts

  • Ctrl+L - Clear display
  • Ctrl+C - Clear input
  • Page Up/Down - Scroll through output
  • Ctrl+End - Scroll to bottom
  • Ctrl+Home - Scroll to top

Customization

Adding New Commands

Edit server.js and add your command handlers in the /api/command endpoint:

else if (command === '/mycommand') {
  res.json({ 
    type: 'response', 
    message: 'Your response here' 
  });
}

Styling

Customize the terminal appearance by editing public/style.css:

  • Change colors in the CSS variables
  • Modify fonts and sizes
  • Adjust terminal dimensions

Project Structure

β”œβ”€β”€ server.js          # Express server and command handlers
β”œβ”€β”€ package.json       # Dependencies and scripts
β”œβ”€β”€ public/
β”‚   β”œβ”€β”€ index.html     # Terminal UI
β”‚   β”œβ”€β”€ script.js      # Client-side logic
β”‚   └── style.css      # Terminal styling
└── README.md          # This file

License

MIT