Use Cases
Getting Started with hacka.re
hacka.re is designed to be simple to use while providing powerful features. Here's how to get started:
Running hacka.re Locally
You can download and run hacka.re directly from your local machine without any server setup:
- Download the site using curl:
# Download the site with curl curl -L -o hacka.re.zip "https://hacka.re/hacka.re.zip" # Unzip the downloaded file unzip hacka.re.zip
- Or download using wget:
# Download the site with wget wget -O hacka.re.zip "https://hacka.re/hacka.re.zip" # Unzip the downloaded file unzip hacka.re.zip
- Open the index.html file in your browser:
# On macOS open index.html # On Windows start index.html # On Linux xdg-open index.html
- Alternatively, you can use a simple local server:
# Using Python python -m http.server # Using Node.js npx serve
- Enter your API key when prompted
- Select your preferred model
- Start chatting!
Using Different API Providers
hacka.re supports multiple OpenAI-compatible API providers:
- Click on the settings icon in the top right corner
- Select your preferred API provider from the dropdown
- Enter your API key for the selected provider
- The available models will automatically update based on your provider
Collaboration Use Cases
One of the most powerful features of hacka.re is its ability to securely share sessions with others. Here are some common collaboration scenarios:
Sharing Your API Key with a Team Member
Securely share your API key with a colleague without exposing it in plain text:
- Click on the "Share" button in the interface
- Check the "Include API Key" option
- Generate a session key or enter your own
- Copy the generated link
- Share the link with your team member through your preferred channel
- Share the session key through a separate secure channel
- When they open the link, they'll be prompted to enter the session key
- Once entered correctly, your API key will be loaded into their session
Continuing a Conversation Across Devices
Start a conversation on one device and continue it on another:
- Begin a conversation on your first device
- Click on the "Share" button
- Check the "Include Conversation" option
- Set the number of messages to include
- Generate a session key
- Use the QR code to quickly open the link on your mobile device
- Enter the session key on your second device
- The conversation will be loaded, allowing you to continue where you left off
Collaborative Problem Solving
Work together with colleagues on a complex problem using a shared AI session:
- Set up a custom system prompt tailored to your specific problem
- Start the conversation with initial context and questions
- Use the "Share" feature to include:
- API Key (if your colleague doesn't have their own)
- System Prompt (to maintain the same AI behavior)
- Conversation (to provide full context)
- Active Model (to ensure consistent responses)
- Share the link and session key with your colleagues
- Each person can now interact with the AI using the same context
- Generate new shareable links as the conversation evolves
Advanced Use Cases
Using Different API Providers
Connect to your preferred OpenAI-compatible API provider:
- Sign up for an account with your chosen OpenAI-compatible API provider
- Generate an API key from your provider's dashboard
- In hacka.re, select your provider from the dropdown or provide your own base URL manually
- Enter your API key
- Select from the available models shown in the interface
- Start chatting with your selected model
Creating a Team-Specific Session Key
Set up a persistent session key for seamless sharing within your team:
- Click on the "Share" button
- In the session key field, enter a memorable but secure key for your team
- Check the "Lock session key" option
- Share this session key with all team members through a secure channel
- Have each team member enter and lock the same session key in their settings
- Now when any team member shares a link, others can open it without re-entering the session key
- This creates a seamless sharing experience within your trusted team
Customizing hacka.re
As a project released under the MIT No Attribution license, hacka.re can be extended and customized for your needs:
- Download the site using the curl or wget commands above
- Make your desired modifications:
- Add support for additional API providers
- Customize the UI to match your organization's branding
- Implement additional features like file uploads or specialized prompts
- Test your changes locally
- If you want to create your own distribution zip, you can use this pre-commit hook to ensure only the correct files are included:
#!/bin/bash # pre-commit hook to create a clean zip file with only HTML, JS, CSS, and fonts # Create a temporary directory TEMP_DIR=$(mktemp -d) # Copy only the necessary files cp -r *.html $TEMP_DIR/ cp -r css/ $TEMP_DIR/ cp -r js/ $TEMP_DIR/ cp -r lib/ $TEMP_DIR/ cp -r about/ $TEMP_DIR/ # Remove any unnecessary files (like .git, .DS_Store, etc.) find $TEMP_DIR -name ".git*" -delete find $TEMP_DIR -name ".DS_Store" -delete find $TEMP_DIR -name "*.map" -delete # Create the zip file cd $TEMP_DIR zip -r ../hacka.re.zip ./* # Clean up cd .. rm -rf $TEMP_DIR echo "Created clean hacka.re.zip with only HTML, JS, CSS, and font files"
- Deploy your customized version to your preferred hosting
- Keep your improvements private for your organization or share them as you wish