Skip to main content

CLI tool for uploading robot logs to Failbot

Project description

failbot-cli

A Python CLI tool for uploading robot logs to the Failbot backend. Supports both file uploads and real-time streaming from serial ports.

Installation

pip install failbot-cli

Or install from source:

git clone <repository-url>
cd failbot-cli
pip install -e .

Quick Start

  1. Login with your token:

    failbot-cli login
    
  2. Upload log files:

    failbot-cli upload --robot atlas-01 --logs /var/log/robot.log
    
  3. Stream real-time logs:

    failbot-cli stream --robot atlas-01 --port /dev/ttyUSB0
    

Commands

failbot-cli login

Authenticate with your Failbot token. The token is saved locally for future use.

failbot-cli upload

Upload log files to Failbot.

Options:

  • --robot, -r: Robot identifier (required)
  • --logs, -l: Path to log file(s) or directory (required)
  • --sensor-log: Include sensor data logs

Examples:

# Upload a single file
failbot-cli upload --robot atlas-01 --logs /var/log/robot.log

# Upload all log files in a directory
failbot-cli upload --robot atlas-01 --logs /var/logs/

# Upload with sensor data
failbot-cli upload --robot atlas-01 --logs /var/log/robot.log --sensor-log

failbot-cli stream

Stream real-time logs from a serial port.

Options:

  • --robot, -r: Robot identifier (required)
  • --port, -p: Serial port (e.g., /dev/ttyUSB0) (required)
  • --baudrate, -b: Serial baudrate (default: 115200)
  • --sensor-log: Include sensor data logs

Examples:

# Basic streaming
failbot-cli stream --robot atlas-01 --port /dev/ttyUSB0

# With custom baudrate
failbot-cli stream --robot atlas-01 --port /dev/ttyUSB0 --baudrate 9600

# Include sensor logs
failbot-cli stream --robot atlas-01 --port /dev/ttyUSB0 --sensor-log

failbot-cli init

Initialize project configuration (legacy command).

Supported File Types

  • .log - Log files
  • .txt - Text files
  • .json - JSON data
  • .csv - CSV data

Sensor Log Format

For sensor data, use JSON format:

{"sensor": "battery", "voltage": 4.2}
{"sensor": "temperature", "value": 25.5}

Configuration

The CLI uses a simple token-based authentication system. Your token is stored in ~/.failbot_auth.

Troubleshooting

  • Serial port access denied: Make sure you have permission to access the serial port
  • Upload failed: Check your internet connection and token validity
  • No logs found: Verify the file path and supported file extensions

License

This project is licensed under the MIT License - see the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

failbot_cli-0.1.1-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file failbot_cli-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: failbot_cli-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for failbot_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8531f593e0f749a74cd565cb8392ac7d46d72394139b227b8b9e3a5472ebe7ee
MD5 4e0b6870d09cf4f8cc1482ca3559daa0
BLAKE2b-256 32074007d924419ff9e62f82a6c4c0018dec848b48c12313748ebd8fe88dd11f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page