Headless Go client for Obsidian
Home
Getting Started
  • Overview
  • macOS
  • Linux
  • Windows
  • Docker
  • From Source
  • Overview
  • Authentication
  • Sync
  • Publish
  • Configuration
  • Overview
  • Sync Protocol
  • Encryption
  • REST API
  • Circuit Breaker
GitHub
Home
Getting Started
  • Overview
  • macOS
  • Linux
  • Windows
  • Docker
  • From Source
  • Overview
  • Authentication
  • Sync
  • Publish
  • Configuration
  • Overview
  • Sync Protocol
  • Encryption
  • REST API
  • Circuit Breaker
GitHub
  • Usage
  • Authentication
  • Sync
  • Publish
  • Configuration

Authentication

Global Flags

These flags are available on all commands:

FlagEnv VarDefaultDescription
--api-baseOBSIDIAN_API_BASEhttps://api.obsidian.mdObsidian API base URL
--timeoutOBSIDIAN_TIMEOUT30HTTP timeout in seconds
--log-levelOBSIDIAN_LOG_LEVELinfoLog level: debug, info, warn, error, fatal, panic, disabled, trace

Environment variables are read automatically with the OBSIDIAN_ prefix. Dashes in flag names become underscores in environment variables (e.g. --api-base → OBSIDIAN_API_BASE).

ob login

Log in to an Obsidian account.

Tips

If already logged in and no credentials are provided, shows the current account info instead.

ob login [--email <email>] [--password <password>] [--mfa <code>]
FlagDescription
--emailAccount email
--passwordAccount password (prompts if not provided)
--mfaMFA/2FA code

If 2FA is required and --mfa is omitted, the CLI will prompt for the code interactively.

ob logout

Log out of the current account and clear stored credentials.

ob logout
Edit this page on GitHub
Last Updated: 5/1/26, 8:35 PM
Contributors: Belphemur
Prev
Usage
Next
Sync