Skip to main content
The DefDrive CLI is an interactive terminal user interface (TUI) that provides a streamlined way to configure, authenticate, and connect to your DefDrive instance.

What is the DefDrive CLI?

The DefDrive CLI is a Go-based interactive setup tool that guides you through:
  • Configuring your DefDrive server URL
  • Creating a new account (signup)
  • Logging into an existing account
  • Managing stored credentials
Built with Charm’s Bubble Tea, the CLI provides a user-friendly TUI experience with keyboard navigation, input validation, and confirmation steps.

Key Features

Interactive Setup Flow

The CLI walks you through each step of the configuration process with clear prompts and menu options. No command-line flags or complex syntax required.

Persistent Configuration

Your credentials are automatically saved to a local .defdrive_credentials file, so you only need to authenticate once. On subsequent runs, the CLI detects existing configuration and asks if you want to use it.

Dual Authentication Methods

Choose between two authentication flows:
  • Signup: Create a new account with name, email, username, and password
  • Login: Authenticate with existing username and password

Built-in Validation

The CLI includes validation for:
  • Password confirmation matching
  • Server connectivity checks
  • Authentication response handling

Edit and Confirm

Before submitting your credentials, you can review all entered information and choose to:
  • Confirm: Proceed with authentication
  • Edit: Modify any field before submission
The CLI supports intuitive keyboard controls:
Keyboard Controls
  • - Navigate menu options
  • - Move cursor within text input
  • Enter - Confirm input and proceed to next step
  • Backspace - Delete characters
  • q or Ctrl+C - Quit the CLI

Quick Start

1

Run the CLI

Execute the CLI using Go:
go run cli/main.go
2

Enter DefDrive URL

Provide the URL where your DefDrive instance is hosted
3

Choose Authentication

Select either Signup or Login using arrow keys
4

Complete Authentication

Fill in the required fields and confirm your details
Once configured, your credentials are saved locally and automatically loaded on future CLI runs.

What’s Next?

Installation

Learn how to install and build the CLI

Configuration

Understand how credentials are stored

Authentication

Detailed walkthrough of signup and login flows

Build docs developers (and LLMs) love