A cross-platform, AI-powered terminal assistant with custom commands, local API key storage, and autocompletion. Built using Tauri v2.5, React, and Rust.
Term aims to provide a minimal, extensible terminal-like interface enhanced with AI capabilities. It supports custom shell commands, natural language queries, and secure local API key management, making it a powerful productivity tool for developers and power users.
- Terminal-like UI with command history and autocompletion
- AI-powered responses for natural language queries
- Custom shell command execution (with sudo/password support)
- Secure local storage for API keys
- Cross-platform: Linux, Windows, macOS (experimental)
- Colorful output and user-friendly design
- Frontend: React, TypeScript, TailwindCSS, Vite
- Backend: Rust, Tauri
- Testing: Vitest, Jest, Testing Library
- Linting/Formatting: ESLint, Prettier, Husky
term/
βββ src/ # React frontend (components, hooks, utils, styles)
βββ src-tauri/ # Rust backend (Tauri commands, API key mgmt, shell)
βββ public/ # Static assets
βββ __tests__/ # Unit and integration tests
βββ package.json # Node.js dependencies and scripts
βββ tailwind.config.js# TailwindCSS config
βββ vite.config.ts # Vite config
βββ README.md # Project documentation
βββ ... # Other configs and assets
- Node.js (v18+ recommended)
- npm (or pnpm)
- Rust (via rustup)
- Tauri CLI
- System dependencies:
- Linux:
webkit2gtk
,librsvg2
- Windows: See Tauri Windows prerequisites
- Linux:
git clone https://github.com/sapatevaibhav/term.git
cd term
sudo pacman -S --needed base-devel webkit2gtk rsvg2
sudo apt update
sudo apt install build-essential libwebkit2gtk-4.1-dev librsvg2-dev
- Install Rust and Node.js
- Install Tauri prerequisites for Windows
- Ensure you have the latest Visual Studio Build Tools (with C++ workload)
# Linux/macOS/Windows (via rustup)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# Restart your terminal or run:
source $HOME/.cargo/env
rustup default stable
cargo install create-tauri-app tauri-cli
npm install # or pnpm install
npx tauri dev # or npm run tauri dev
- On first launch, youβll be prompted to enter your OpenAI API key.
- To set your API key manually:
setapikey sk-proj-xxxxxx
- To reset your API key:
resetapikey
- API keys are stored securely in a
.term
directory at the project root.
- Type shell commands or natural language queries in the terminal.
- Use Up/Down arrows to navigate command history.
- Some commands are predefined (src/utils/autocomplete.ts).
- If a command isnβt recognized, the AI will handle it.
Contributions are welcome! To get started:
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature
) - Commit your changes (
git commit -m 'Add feature'
) - Push to your fork (
git push origin feature/your-feature
) - Open a Pull Request
- Follow the existing code style (see ESLint/Prettier configs)
- Write clear commit messages
- Add tests for new features when possible
- Be respectful in code reviews and discussions
- Do not push the code without manually testing and verifying it.
If you are developing a production application, we recommend updating the configuration to enable type-aware lint rules:
export default tseslint.config({
extends: [
// Remove ...tseslint.configs.recommended and replace with this
...tseslint.configs.recommendedTypeChecked,
// Alternatively, use this for stricter rules
...tseslint.configs.strictTypeChecked,
// Optionally, add this for stylistic rules
...tseslint.configs.stylisticTypeChecked,
],
languageOptions: {
// other options...
parserOptions: {
project: ['./tsconfig.node.json', './tsconfig.app.json'],
tsconfigRootDir: import.meta.dirname,
},
},
})
You can also install eslint-plugin-react-x and eslint-plugin-react-dom for React-specific lint rules:
// eslint.config.js
import reactX from 'eslint-plugin-react-x'
import reactDom from 'eslint-plugin-react-dom'
export default tseslint.config({
plugins: {
// Add the react-x and react-dom plugins
'react-x': reactX,
'react-dom': reactDom,
},
rules: {
// other rules...
// Enable its recommended typescript rules
...reactX.configs['recommended-typescript'].rules,
...reactDom.configs.recommended.rules,
},
})
This project is licensed under the MIT License.
For issues and TODOs, see the TODO File.