๐Ÿš€ Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more โ†’
Socket
DemoInstallSign in
Socket

ethos-cli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ethos-cli

A cross-platform CLI music player delivering local and online music streaming with User's Spotify playlist integration.

0.1.0
PyPI
Maintainers
1

Ethos

Logo of Ethos

Python Version License PRs Welcome Code Coverage Downloads GitHub Issues GitHub Stars Last Commit

A modern, resource-efficient CLI music player that seamlessly integrates local music libraries with online streaming services. Experience high-quality audio playback, Spotify playlist synchronization, and an intuitive terminal interface designed for both developers and music enthusiasts.

View Demo ยท Report Bug ยท Request Feature ยท Send a Pull Request

Table of Contents

Features

๐ŸŽต Universal Accessibility

  • High-quality terminal music playback accessible to both developers and general users
  • Modern and feature-rich interface in your terminal
  • Support for multiple audio formats (MP3, FLAC, WAV, AAC)

๐Ÿ’ป Resource Efficient

  • Lightweight application with minimal system resource consumption
  • Can be used in devices like Raspberry Pi
  • Optimized for lower-end devices without compromising functionality

๐Ÿ”„ Unified Music Experience

  • Seamlessly bridges local music libraries with online streaming services
  • All your music needs handled from a single terminal interface
  • Import and sync your Spotify playlists
  • Offline playback for downloaded tracks

โšก Developer-Centric

  • Terminal-native music solution that integrates with your development workflow
  • Enhances productivity by keeping you in your preferred environment

Preview

Logo of Ethos

Technologies Used

  • Backend: yt-dlp, python-vlc, spotify API, spotipy
  • Frontend: Rich, Textual
  • Language: Python

Prerequisites

Make sure you have the following installed:

  • Python 3.8 or later
  • pip (Python package installer)
  • VLC media player

Quick Start

# Install Ethos
pip install ethos

# Start playing music
ethos

Installation

For Development:

  • Clone the Repository:

    git clone https://github.com//Itz-Agasta/ethos.git
    cd ethos
    
  • Install Poetry:

    pipx install poetry
    

    Note: It is recommended to use pipx for installing Poetry, but you can also use pip if pipx is not available. For more information, please refer to the official documentation.

  • Configure Poetry to Create Virtual Environment in Project Root:

    poetry config virtualenvs.in-project true
    
  • Install Dependencies:

    poetry install
    
  • Setup the .env file: see the .env.example for reference and create a .env file in the root.

  • Start the application:

    poetry run python ethos/main.py
    

For Distribution:

Coming Soon

Usage:

https://github.com/user-attachments/assets/e46a7585-ccf1-4e30-bc20-3c48b0767969

Basic Commands

/play <track name>     # Search and play a track
/pause                 # Pause current playback
/resume                # Resume playback
/volume <0-100>        # Set volume level

Queue Management

/queue-add <track>    # Add a track to queue
/show-queue           # Display current queue
/qp <number>          # Play track number from queue

Keyboard Shortcuts

ShortcutAction
Ctrl+C or Ctrl+QQuit application
Ctrl+MPause playback
Ctrl+RResume playback
Ctrl+1Increase volume
Ctrl+2Decrease volume

Basic Workflow

  • Search for a track:

    /play never gonna give you up
    
  • Select from search results by entering the track number (e.g. 1)

  • Control playback:

  • Use /pause and /resume to control playback
  • Adjust volume with /volume 75
  • View all commands with /help

Troubleshooting

Common Issues

IssueSolution
No audio outputCheck system volume and VLC installation
Spotify integration failsVerify .env configuration
Installation errorsUpdate pip: python -m pip install --upgrade pip

Repository Structure

ethos/
โ”œโ”€โ”€ .env.example
โ”œโ”€โ”€ .gitignore
โ”œโ”€โ”€ .github/
โ”‚   โ”œโ”€โ”€ ISSUE_TEMPLATE/
โ”‚   โ””โ”€โ”€ workflows/
โ”œโ”€โ”€ docker/
โ”‚   โ”œโ”€โ”€ dockerfile
โ”‚   โ”œโ”€โ”€ compose.yaml
โ”‚   โ””โ”€โ”€ readme.md
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ img/
โ”œโ”€โ”€ ethos/
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ main.py    # entry point of the application.
โ”‚   โ”œโ”€โ”€ config.py  # Manages configuration settings.
โ”‚   โ”œโ”€โ”€ player.py  # Handles the core functionality of the music player.
โ”‚   โ”œโ”€โ”€ utils.py   # Contains utility functions and other helper functions.
โ”‚   โ”œโ”€โ”€ spotify_importer.py # User's Spotify playlist integration
โ”œโ”€โ”€ โ”œโ”€โ”€ tools/         # Helper tools and utilities
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ endless_playback.py
โ”‚   โ”‚   โ””โ”€โ”€ helper.py
โ”‚   โ”œโ”€โ”€ ui/           # Terminal UI components
โ”‚   โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”‚   โ”œโ”€โ”€ rich_layout.py
โ”‚   โ”‚   โ”œโ”€โ”€ styles.tcss
โ”‚   โ”‚   โ”œโ”€โ”€ textual_app.py
โ”‚   โ”‚   โ””โ”€โ”€ ui.py
โ”œโ”€โ”€ tests/          # Test suite
โ”‚   โ”œโ”€โ”€ __init__.py
โ”‚   โ”œโ”€โ”€ conftest.py
โ”‚   โ””โ”€โ”€ test_player/
โ”‚       โ”œโ”€โ”€ __init__.py
โ”‚       โ””โ”€โ”€ test_playback.py
โ”œโ”€โ”€ LICENSE
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ pyproject.toml  # Project configuration and dependencies
โ”œโ”€โ”€ pytest.ini      # PyTest configuration
โ”œโ”€โ”€ setup.py        # Contains the setup script
โ””โ”€โ”€ requirements.txt

Contributors

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Feel free to Send a Pull Request if you have improvements or fixes.

Keywords

ethos

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts