question.sh is an interactive AI-powered SSH service that allows users to connect and interact with various AI models through a command-line interface.
This project implements a custom SSH server that:
- Authenticates users and manages sessions
- Provides access to AI models for text generation and conversation
- Supports multiple concurrent users
- Offers a room-based chat system
- Allows users to select and interact with different AI models
- User authentication and session management
- Real-time interaction with AI models
- Multi-user support with isolated sessions
- Model selection and management
- Bun runtime (v1.1.38 or later)
- Node.js and npm (for some dependencies)
-
Clone the repository:
git clone https://github.com/your-username/question.sh.git cd question.sh
-
Install dependencies:
bun install
To start the SSH server:
bun run index.ts
-
Connect to the server using an SSH client:
ssh username@hostname -p port
-
Once connected, you can:
- Use
/help
to see available commands - Start conversations with the AI
- Select models using
/model modelname
- Use
Access postgres database with:
ssh -L 15432:localhost:5432 [email protected] -p 2345
- Fork the repository and create your feature branch
- Make your changes, ensuring to follow the existing code style
- Test your changes thoroughly
- Create a pull request with a clear description of your changes
index.ts
: Main entry point, sets up the SSH serverclientSession.ts
: Manages individual client sessions and interactionsdatabase.ts
: Handles database operationstypes.ts
: Contains TypeScript type definitionsutils.ts
: Utility functions
For more detailed information about the project's functionality and implementation, please refer to the source code and comments within each file.