A Rust-based command line interface with TUI capabilities for managing Board API pastes.
- Interactive TUI interface
- Configurable settings with TOML configuration
- Multiple authentication methods (App Password and Device Code)
- Create, read, and list pastes
- Error handling
- Configuration management
Board CLI uses two authentication headers for API requests:
- Device Code (Required): Every API request requires a device code
- App Password (Optional): Additional authentication when needed
Device codes are always required. Register a new device:
board register
# or
board device newManage device codes:
# Show current device code
board device show
# Set device code manually
board device set your_device_code_here
# Clear device code
board device clearSet an app password in your configuration file at ~/.config/board/config.toml:
app_password = "your_app_password_here"Special Behavior for Default API: When using the default API URL (https://board-api.pybash.xyz), the app password must be embedded from the BOARD_APP_PASSWORD environment variable at build time. This means the password value is compiled into the binary and used regardless of runtime environment variables:
# Set environment variable BEFORE building (REQUIRED for default API)
export BOARD_APP_PASSWORD="your_secure_password"
cargo build --releaseThe built binary will use the embedded password value on any machine, even if BOARD_APP_PASSWORD is not set in the runtime environment.
Important:
BOARD_APP_PASSWORDmust be set at build time when using the default API URL- If
BOARD_APP_PASSWORDis missing, empty, or contains only whitespace, the build will panic at runtime to prevent accidental deployment with invalid credentials
For other API URLs, the app password from the config file is used as normal.
If no app password is configured (either in config or environment), an empty value will be sent.
All API requests include both headers:
Device-Code: your_device_codeApp-Password: your_app_password_or_empty
# Show help
board --help
# Launch TUI
board tui
# Create a paste from stdin
echo "Hello, World!" | board create
# Get paste content by ID
board get paste_id
# List all paste IDs
board list
# Show all pastes with content
board show
# Manage device code
board device new
board device show
board device set device_code
board device clearConfiguration is stored in ~/.config/board/config.toml:
data_dir = "~/.board-cli"
theme = "default"
auto_save = true
# Device code (required) - set automatically via CLI commands
device_code = "your_device_code_here"
# App password (optional) - set manually in config
# For the default API URL (https://board-api.pybash.xyz),
# this is ignored and BOARD_APP_PASSWORD is embedded at build time instead
app_password = "your_app_password_here"- q or Esc: Quit
cargo build --release# Show help (default when no command given)
cargo run
# Launch TUI
cargo run -- tui
# Run tests
cargo testsrc/
├── main.rs # Entry point
├── cli/ # CLI argument parsing
├── tui/ # TUI interface
├── config/ # Configuration management
└── error/ # Error types