BETA

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:

  1. 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
    
    
  2. 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
    
    
  3. Open the index.html file in your browser:
    # On macOS
    open index.html
    
    # On Windows
    start index.html
    
    # On Linux
    xdg-open index.html
  4. Alternatively, you can use a simple local server:
    # Using Python
    python -m http.server
    
    # Using Node.js
    npx serve
  5. Enter your API key when prompted
  6. Select your preferred model
  7. Start chatting!
[Screenshot of hacka.re running locally will be added here]

Using Different API Providers

hacka.re supports multiple OpenAI-compatible API providers:

  1. Click on the settings icon in the top right corner
  2. Select your preferred API provider from the dropdown
  3. Enter your API key for the selected provider
  4. The available models will automatically update based on your provider
[Screenshot of API provider selection will be added here]

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:

  1. Click on the "Share" button in the interface
  2. Check the "Include API Key" option
  3. Generate a session key or enter your own
  4. Copy the generated link
  5. Share the link with your team member through your preferred channel
  6. Share the session key through a separate secure channel
  7. When they open the link, they'll be prompted to enter the session key
  8. Once entered correctly, your API key will be loaded into their session
[Screenshot of sharing API key will be added here]

Continuing a Conversation Across Devices

Start a conversation on one device and continue it on another:

  1. Begin a conversation on your first device
  2. Click on the "Share" button
  3. Check the "Include Conversation" option
  4. Set the number of messages to include
  5. Generate a session key
  6. Use the QR code to quickly open the link on your mobile device
  7. Enter the session key on your second device
  8. The conversation will be loaded, allowing you to continue where you left off
[Screenshot of conversation sharing with QR code will be added here]

Collaborative Problem Solving

Work together with colleagues on a complex problem using a shared AI session:

  1. Set up a custom system prompt tailored to your specific problem
  2. Start the conversation with initial context and questions
  3. 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)
  4. Share the link and session key with your colleagues
  5. Each person can now interact with the AI using the same context
  6. Generate new shareable links as the conversation evolves
[Screenshot of collaborative problem solving will be added here]

Advanced Use Cases

Using Different API Providers

Connect to your preferred OpenAI-compatible API provider:

  1. Sign up for an account with your chosen OpenAI-compatible API provider
  2. Generate an API key from your provider's dashboard
  3. In hacka.re, select your provider from the dropdown or provide your own base URL manually
  4. Enter your API key
  5. Select from the available models shown in the interface
  6. Start chatting with your selected model
[Screenshot of API provider selection will be added here]

Creating a Team-Specific Session Key

Set up a persistent session key for seamless sharing within your team:

  1. Click on the "Share" button
  2. In the session key field, enter a memorable but secure key for your team
  3. Check the "Lock session key" option
  4. Share this session key with all team members through a secure channel
  5. Have each team member enter and lock the same session key in their settings
  6. Now when any team member shares a link, others can open it without re-entering the session key
  7. This creates a seamless sharing experience within your trusted team
[Screenshot of team session key setup will be added here]

Customizing hacka.re

As a project released under the MIT No Attribution license, hacka.re can be extended and customized for your needs:

  1. Download the site using the curl or wget commands above
  2. 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
  3. Test your changes locally
  4. 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"
  5. Deploy your customized version to your preferred hosting
  6. Keep your improvements private for your organization or share them as you wish
[Screenshot of customized hacka.re instance will be added here]