Skip to main content

A command-line tool designed to help you relax from your terminal.

Project description

Deep Breath CLI

PyPI version Python versions Build Status Publication Status License

Deep Breath CLI is a command-line tool designed to help you relax, regain focus, and boost your energy—right from your terminal.

🌬️ What is Deep Breath CLI?

Whether you're coding, studying, or just need a quick break, Deep Breath CLI offers guided breathing exercises with visual progress bars and calming colors. With simple commands, you can access different breathing patterns to help you reset and recharge.

🚀 Features

  • Multiple breathing patterns (4-7-8, Box breathing)
  • Visual progress bars with calming colors
  • Customizable session lengths and cycles
  • Track your progress with detailed statistics
  • Create, modify, and delete custom breathing patterns
  • Clear, distraction-free interface
  • Easy preset management

🛠️ Installation

Install from PyPI:

pip install deep-breath-cli

⚡️ Usage

Start a breathing session

# Default session (4 cycles of 4-7-8 pattern)
breath start

# Custom number of cycles
breath start --cycle 8

# Different breathing pattern
breath start --pattern "4-4-4-4"

# Use a custom pattern
breath start --pattern "my-custom"

# Combined options
breath start --cycle 6 --pattern "4-4-4-4"

View available patterns (including custom ones)

breath presets

Output:

Available breathing patterns:
  4-7-8: 4s Breathe in..., 7s Hold..., 8s Breathe out... (built-in)
  4-4-4-4: 4s Breathe in..., 4s Hold..., 4s Breathe out..., 4s Hold... (built-in)
  my-custom: 3s Breathe in..., 5s Hold..., 4s Breathe out... (custom)

You can use these patterns with the --pattern option.

Track your progress

Monitor your breathing journey with detailed statistics:

# Basic stats overview
breath stats

Example output:

Your Breathing Stats
            Total sessions: 7
            Total time: 2 minutes
            Favorite pattern: 4-4-4-4 (2 sessions)
            Current streak: 2 days

Use 'breath stats --detailed' for charts and advanced analytics.

Advanced statistics

The --detailed flag shows beautiful ASCII charts including:

  • Sessions over last 7 days: Visual timeline of your daily practice
  • Pattern usage distribution: See which breathing techniques you use most
# Detailed view with beautiful ASCII charts
breath stats --detailed

Export your statistics

Export your breathing data for external analysis or backup:

# Export complete data as JSON
breath export-stats --format json

# Export session data as CSV
breath export-stats --format csv

# Custom output file
breath export-stats --format json --output my_backup.json

CSV Export includes: Date, Pattern, Cycles, Duration (seconds)
JSON Export includes: Complete statistics with all session details

Custom patterns

Create your own breathing patterns tailored to your needs:

Create a new pattern

breath create-pattern "my-custom"

This will guide you through an interactive process to define each phase of your breathing pattern.

Modify an existing pattern

breath modify-pattern "my-custom"

Delete a pattern

breath delete-pattern "my-custom"

Get help

breath --help
breath start --help

🌟 Breathing Patterns

  • 4-7-8: Relaxation pattern (inhale 4s, hold 7s, exhale 8s)
  • 4-4-4-4: Box breathing for focus (inhale 4s, hold 4s, exhale 4s, hold 4s)
  • Custom patterns: Create your own with any number of phases and durations

🤔 Why use Deep Breath CLI?

  • Quick: Take a break without leaving your terminal
  • Effective: Scientifically-backed breathing techniques
  • Customizable: Choose the pattern and duration that fits your needs
  • Progress tracking: Monitor your breathing journey with detailed statistics
  • Distraction-free: Clear your mind with simple, focused interface

🛠️ Development

Setup (with uv, which I used to develop this package)

git clone https://github.com/weart99/deep-breath-cli
cd deep-breath-cli
uv sync --extra dev

Running tests

uv run pytest tests/ --cov=src

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests and ensure they pass
  5. Submit a pull request

📄 License

MIT Licence MIT License

Authors

@weart99


Take a deep breath, and let's get started! 🌬️

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

deep_breath_cli-1.1.0.tar.gz (23.0 kB view details)

Uploaded Source

Built Distribution

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

deep_breath_cli-1.1.0-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

Details for the file deep_breath_cli-1.1.0.tar.gz.

File metadata

  • Download URL: deep_breath_cli-1.1.0.tar.gz
  • Upload date:
  • Size: 23.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.10

File hashes

Hashes for deep_breath_cli-1.1.0.tar.gz
Algorithm Hash digest
SHA256 71a5523cdd645c19d4bcd69acc08542ad0ec6db5d3c382c45127dea57ae38063
MD5 e559ce0467c11d4e6480c7d5d0bbd116
BLAKE2b-256 3b8c065e3e77c3d07b19c3635abbd74ab38fe7a276d080dc4276a093988e027e

See more details on using hashes here.

File details

Details for the file deep_breath_cli-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for deep_breath_cli-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5ab9dc0f4c79c49967896728c7c8e1444f02d31e5eae0d22cfbee844402c541
MD5 c2ad7d907ec70af11e8651ae0d0d33f7
BLAKE2b-256 ecefc2ec16d4eae348680816f8d0dba9d57532f732f20370ca05ec160e83d8af

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