Prerequisites

Install the CLI

Install the SessionBase CLI globally to access it from anywhere:
npm install -g @sessionbase/cli
This provides two commands:
  • sessionbase - Main CLI interface
  • sessionbase-mcp - MCP server for AI platforms

Verify Installation

Confirm the installation was successful:
sessionbase --version
sessionbase --help
sb - Shortcut for sessionbase

Authentication

After installation, authenticate using:
sessionbase login
This will:
  1. Open your browser to the SessionBase login page
  2. Allow you to sign in with GitHub or Google
  3. Provide an authentication token to copy into your terminal

Manual Token Authentication

If you are already logged in to SessionBase in your browser, you can access your authentication token at https://www.sessionbase.ai/settings and provide the token directly:
sessionbase login --token YOUR_TOKEN_HERE

Verify Authentication

Check that you’re logged in successfully:
sessionbase whoami
This displays your username and authentication status.

Next Steps

The SessionBase CLI is intended for consumption by AI agents via the SessionBase MCP server. While you can use the CLI directly, we recommend using the SessionBase MCP server directly from your AI agent of choice. This allows you to push sessions with rich contextual descriptions directly from Claude Code, Gemini CLI, Q Chat, or Codex CLI without breaking your workflow. See our MCP Server guide for MCP installation instructions.

Power User Tips

If you prefer to use the CLI, use the sb alias for faster typing:
sb push --claude --title "Debug Session"
sb list --global
You can also use SessionBase CLI commands directly from within some AI chat agents using the ! operator (supported by Claude Code, Gemini CLI, and Amazon Q Chat):
# Push current session from within Claude Code
!sb push --claude --title "Current debugging session"

# List recent sessions
!sb list --claude

# Check authentication status
!sb whoami
This allows you to push sessions without leaving your AI conversation, even if you haven’t set up the MCP server.