A browser-based simulation of a macOS terminal powered by Claude AI. This project creates a virtual terminal environment where all commands, filesystem operations, and state changes are simulated by Claude's language model.
terminaLLM creates a realistic macOS terminal experience directly in your browser. Unlike traditional terminal emulators that connect to a real operating system, terminaLLM uses Claude AI to:
- Process and respond to standard Unix commands
- Maintain a virtual filesystem entirely in the AI's context
- Track command history and directory changes
- Simulate file operations like creating, editing, and deleting files
- Provide realistic error messages and command output
-
Clone this repository
git clone https://github.com/norbinsh/terminaLLM.git cd terminaLLM -
Install dependencies
npm install -
Start the development server
npm run dev -
Open the application in your browser (usually at http://localhost:5173)
-
Enter your Anthropic API key when prompted
- You'll need a valid API key from Anthropic
- The key is only stored in browser memory and is never sent to any server except Anthropic's API
Once you've entered your API key, you can use the terminal just like a real macOS terminal:
- Navigate with
cd,ls,pwd - Create files and directories with
touch,mkdir - Edit files with
nano,vim,cat >, etc. - Run common Unix utilities like
grep,find,ps - Use pipes and redirections:
ls | grep .txt,echo hello > file.txt
The terminal maintains state between commands, so you can create a file and then reference it in later commands.
terminaLLM uses the Anthropic API directly from the browser with special headers that allow browser access. The application:
- Sends commands to Claude AI with your current terminal state (directory, command history)
- Processes the AI's response to extract the command output and any state changes
- Updates the terminal display and internal state accordingly
All filesystem operations and command processing happen entirely within Claude's context window. The AI maintains a mental model of your virtual filesystem and updates it as you run commands.
- Built with React, TypeScript, and Tailwind CSS
- Uses Zustand for state management
- Communicates directly with the Anthropic API from the browser
- Styled to look like a native macOS terminal
This application uses your Anthropic API key directly in the browser. While this works for development and personal use, be aware that:
- Your API key is stored in browser memory
- API usage will count against your personal quota
- For a production application, consider implementing a backend service
Contributions are welcome! Please feel free to submit a Pull Request.
MIT
