Skip to content

KemenyStudio/berto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

15 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿค– Berto Terminal

AI-powered terminal that speaks human

A revolutionary terminal experience where you can type commands OR ask in natural language. Berto is your AI assistant that understands both traditional shell commands and conversational requests.


โœจ Key Features

  • ๐Ÿง  AI-Powered: Ask naturally - "show me files", "create a folder", "help me find something"
  • โšก Real Commands: Execute actual shell commands on your machine (local) or simulated environment (remote)
  • ๐ŸŒ Hybrid Mode: Works seamlessly both locally and on remote deployments (Vercel)
  • ๐ŸŽจ Beautiful UI: Modern, responsive terminal interface with proper theming
  • ๐Ÿ“ฑ Mobile Friendly: Optimized touch experience for mobile devices
  • ๐Ÿ” Smart Context: AI understands your current directory and available files
  • ๐ŸŽฏ Inline Input: Clean, authentic terminal feel with proper prompt alignment

๐Ÿš€ Quick Start

Prerequisites

  • Node.js 18+
  • pnpm (recommended) or npm
  • OpenAI API key

Installation

# Clone the repository
git clone https://github.com/kemenystudio/berto.git
cd berto

# Install dependencies (use pnpm for best results)
pnpm install

# Set up environment variables
cp .env.example .env.local
# Add your OPENAI_API_KEY to .env.local

# Start development server
pnpm dev

Environment Variables

Create a .env.local file with:

OPENAI_API_KEY=your-openai-api-key-here

๐Ÿ’ฌ How to Use Berto

Natural Language Commands

Ask Berto anything in plain English:

  • "show me the files in this folder" โ†’ runs ls
  • "create a project folder and call it 'bananas'" โ†’ runs mkdir bananas
  • "help me find all text files" โ†’ runs find . -name "*.txt"
  • "what's in my home directory?" โ†’ runs ls ~

Traditional Commands

All standard shell commands work perfectly:

ls -la                    # List files with details
cat filename.txt          # Read file contents
mkdir new-folder          # Create directory
cd Documents              # Change directory
pwd                       # Show current directory
grep "text" *.txt         # Search in files

Special Commands

Try these built-in commands:

  • help - See all available commands and tips
  • hack - Start an immersive AI-powered cyber hacker challenge
  • clear - Clear the terminal screen

๐ŸŽฎ Hack Challenge

Experience Berto's interactive cyber security challenge:

hack                      # Start the challenge
cd intel                  # Navigate to intel directory  
cat CODE_1.dat           # Find your first access code
cat ../matrix.dat        # Decode the matrix for CODE_2
cd ../vault              # Enter the final vault challenge

Features:

  • ๐Ÿ•ต๏ธ Immersive Story: Realistic hacker scenario with classified files
  • ๐Ÿ” Progressive Puzzles: Find 3 access codes through different challenges
  • ๐Ÿงญ Full Navigation: Complete cd support for directory exploration
  • ๐Ÿค– AI-Generated Content: Dynamic hints and responses
  • ๐ŸŽฏ Educational: Learn real terminal commands while playing

๐Ÿ—๏ธ Architecture

Local Mode (Development)

  • ๐Ÿ–ฅ๏ธ Native Performance: Direct access to your local filesystem
  • โšก Real Commands: Execute actual shell commands on your machine
  • ๐Ÿ”„ Instant Feedback: No network delays, immediate responses

Remote Mode (Vercel Deployment)

  • ๐ŸŒ Simulated Environment: Virtual filesystem for safe command execution
  • ๐Ÿค– AI-Enhanced: Intelligent command interpretation and responses
  • ๐Ÿ›ก๏ธ Secure: Sandboxed environment prevents system access

AI Integration

  • GPT-4 Powered: Natural language understanding and command generation
  • Context Aware: Understands your current directory and available files
  • Smart Suggestions: Provides helpful tips and alternative commands

๐Ÿšข Deployment

Vercel (Recommended)

  1. Connect your repository to Vercel
  2. Set environment variables in Vercel dashboard:
    • OPENAI_API_KEY: Your OpenAI API key
  3. Deploy - Vercel will automatically build and deploy

The project is configured with:

  • โœ… vercel.json with proper pnpm configuration
  • โœ… Optimized build settings
  • โœ… API routes with appropriate timeouts
  • โœ… Edge runtime compatibility

Other Platforms

For other deployment platforms, ensure:

  • Node.js 18+ runtime
  • Environment variables are set
  • Build command: pnpm build
  • Start command: pnpm start

๐Ÿ› ๏ธ Development

Project Structure

berto/
โ”œโ”€โ”€ app/                    # Next.js app router
โ”‚   โ”œโ”€โ”€ api/               # API routes
โ”‚   โ”‚   โ”œโ”€โ”€ ai/            # AI command processing
โ”‚   โ”‚   โ””โ”€โ”€ execute/       # Command execution
โ”‚   โ”œโ”€โ”€ layout.tsx         # Root layout
โ”‚   โ””โ”€โ”€ page.tsx           # Main page
โ”œโ”€โ”€ src/                   # Source code
โ”‚   โ”œโ”€โ”€ components/        # React components
โ”‚   โ”‚   โ”œโ”€โ”€ ui/           # Shadcn/ui components
โ”‚   โ”‚   โ””โ”€โ”€ terminal.tsx  # Main terminal component
โ”‚   โ”œโ”€โ”€ services/         # Core services
โ”‚   โ”‚   โ”œโ”€โ”€ ai-interpreter.ts
โ”‚   โ”‚   โ”œโ”€โ”€ shell-executor.ts
โ”‚   โ”‚   โ”œโ”€โ”€ hybrid-filesystem.ts
โ”‚   โ”‚   โ””โ”€โ”€ environment-detector.ts
โ”‚   โ”œโ”€โ”€ hooks/            # Custom React hooks
โ”‚   โ”œโ”€โ”€ lib/              # Utilities
โ”‚   โ”œโ”€โ”€ types/            # TypeScript definitions
โ”‚   โ”œโ”€โ”€ commands/         # Command definitions
โ”‚   โ””โ”€โ”€ styles/           # CSS styles
โ”œโ”€โ”€ config/               # Configuration files
โ”œโ”€โ”€ public/               # Static assets
โ””โ”€โ”€ [config files]       # Next.js, TypeScript, etc.

Key Services

  • AI Interpreter: Processes natural language and converts to commands
  • Shell Executor: Executes commands safely in both environments
  • Hybrid Filesystem: Manages files in local/remote contexts
  • Environment Detector: Determines runtime environment

Tech Stack

  • Frontend: Next.js 15, React 19, TypeScript
  • Styling: Tailwind CSS, Shadcn/ui components
  • AI: OpenAI GPT-4, Vercel AI SDK
  • Icons: Lucide React
  • Package Manager: pnpm (recommended)

๐ŸŽฏ Roadmap

  • File Operations: Enhanced file manipulation commands
  • Git Integration: Direct git command support
  • Theme Customization: Multiple terminal themes
  • Command History: Persistent command history
  • Tab Completion: Smart command completion
  • Session Management: Multiple terminal sessions

๐Ÿ“ˆ Recent Updates

v1.2.0 - Enhanced Hack Challenge (December 2024)

  • โœ… Full Directory Navigation: Fixed cd command support in remote/simulated environments
  • ๐Ÿ•ต๏ธ Intel Directory: Added interactive intel files with mission briefings and classified documents
  • ๐Ÿ” Progressive Puzzle System: Complete 3-stage access code discovery
  • ๐ŸŽฏ Improved UX: Better error handling and helpful guidance for players
  • ๐Ÿค– AI Integration: Dynamic content generation for hints and responses

Previous Releases

  • v1.1.0: Added natural language processing and AI command interpretation
  • v1.0.0: Initial release with basic terminal functionality

๐Ÿค Contributing

Contributions are welcome! Please:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“ License

MIT License - see LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Built with Next.js, React, and OpenAI
  • UI components powered by Radix UI and Tailwind CSS
  • Terminal experience inspired by modern CLI tools

Made with ๐Ÿค– by Kemeny Studio โ€ข Website โ€ข Contact

About

An AI Terminal

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages