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 Distribution

failbot_cli-0.1.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

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

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

Uploaded Python 3

File details

Details for the file failbot_cli-0.1.0.tar.gz.

File metadata

  • Download URL: failbot_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for failbot_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c3cd2eef338f870fbb7e7a62d8dcaf6a06840e12c4078cd963e88a0e283bef3
MD5 9474986cccab36260e93525acb04e631
BLAKE2b-256 d23187bbb7988b874cb370eedcb1b2fc1c20443980ae11f21588662fbae17c6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: failbot_cli-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42b9df72e8bb3b283acb4122a968f13c8a94e1984bd6f5472fe7bcd9a4500be7
MD5 9dd1548a885267ce59385cfecb98a127
BLAKE2b-256 2f68fef18326ce0260c19e83bed3ab1dc41f638be98070f75f6c630a5540a9b9

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