Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/jaypopat/cf_ai_duet/llms.txt

Use this file to discover all available pages before exploring further.

Get up and running with your first Duet pairing session. This guide walks you through connecting via SSH, creating or joining a room, and starting your collaborative session.

Connect via SSH

The fastest way to try Duet is to connect to the hosted version:
ssh <username>@duet.jaypopat.me
Replace <username> with any username you’d like to use in the session (e.g., alice, bob). Your username will be visible to other users in the room.
If you don’t specify a username, you’ll be assigned the default username “guest”.

Create or join a room

Once connected, you’ll see the launch screen with two options:
1

Create a new room

Press c or C to create a new room.You can optionally enter a description for your room (e.g., “React debugging session”). This description will be used to name the workspace directory.Press Enter to create the room. You’ll see a shareable room ID (UUID format) that others can use to join.
2

Join an existing room

Press J (capital J) to join an existing room.Enter the room ID shared by the host and press Enter.You’ll join the session and see the existing terminal history and any ongoing AI conversations.
Room IDs are UUIDs (e.g., f47ac10b-58cc-4372-a567-0e02b2c3d479). Share this ID with collaborators to let them join your session.

Your first pairing session

After creating or joining a room, you’ll enter the main collaboration interface:

Interface overview

The screen is divided into three sections:
  • Left sidebar - Shows your username, room ID, connected users, and keyboard shortcuts
  • Center terminal - Shared terminal where all users can type and see output in real-time
  • Right AI sidebar - (Optional) AI conversation panel, toggle with Ctrl+A

Using the shared terminal

Everything you type goes to the shared terminal and is visible to all users:
# All users see this in real-time
echo "Hello from Duet!"
ls -la
nvim index.js  # Neovim is pre-installed
The terminal comes with Neovim and Node.js pre-installed, perfect for pair programming on code.

Keyboard shortcuts

  • Ctrl+G - Ask the AI assistant a question
  • Ctrl+R - Run a command in the sandbox
  • Ctrl+A - Toggle AI sidebar visibility
  • Ctrl+L - Leave room and return to launch screen
  • Ctrl+J - Scroll AI conversation down
  • Ctrl+K - Scroll AI conversation up
All standard terminal shortcuts work: arrow keys, Ctrl+C, Tab, etc.

Try the AI assistant

Press Ctrl+G to activate AI mode and ask a question:
How do I create a React component?
The AI (powered by Cloudflare’s Llama 3 8B model) will respond in the sidebar. It can also run commands automatically using <run> tags:
Show me the contents of this directory
The AI might respond with a command like:
Let me check the directory contents
<run>ls -la</run>
The command will execute automatically and the output will appear in the AI conversation.
AI features require a Cloudflare Worker to be configured. If you see “AI not configured”, the server administrator needs to set the -worker flag. See Self-hosting for details.

Run sandbox commands

Press Ctrl+R to run a command directly in the Cloudflare sandbox:
npm --version
The output will appear as a toast notification at the bottom of the screen. Sandbox commands run in isolation from the shared terminal.

Leave the session

When you’re done:
  1. Press Ctrl+L to leave the room
  2. You’ll return to the launch screen
  3. The room will be cleaned up automatically when the last user leaves

Run Duet locally

Want to run your own instance?
make dev
Then connect to your local instance:
ssh <username>@localhost -p 2222
See Self-hosting for complete deployment instructions.

Next steps

Core features

Learn about pairing sessions, terminal sharing, and AI features

Keyboard shortcuts

Master all keyboard shortcuts and terminal commands

AI interaction

Deep dive into AI assistant capabilities

Deploy your own

Self-host Duet with your own Cloudflare Worker

Build docs developers (and LLMs) love