Skip to content
Snippets Groups Projects
Select Git revision
  • renovate/aiofiles-0.x
  • master default protected
2 results

cli

  • Clone with SSH
  • Clone with HTTPS
  • user avatar
    Georg Krause authored
    ff038a7a
    History

    A command line interface to interact with Funkwhale servers.

    Installation

    This package can be installed via pip:

    pip install funkwhale-cli

    We also provide some prebuilt binaries for Windows and Linux.

    On Linux:

    curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale?job=build-linux" -o /usr/local/bin/funkwhale
    chmod +x /usr/local/bin/funkwhale

    On Windows:

    curl -L "https://dev.funkwhale.audio/funkwhale/cli/-/jobs/artifacts/master/raw/funkwhale.exe?job=build-windows" -o funkwhale.exe

    Usage

    # get help
    funkwhale --help
    
    # get help on a specific command
    funkwhale tracks ls --help
    
    # get login
    funkwhale -H https://demo.funkwhale.audio login  # credentials are demo and demo on this server
    
    # Store the server URL to avoid specifying it on the CLI
    echo "FUNKWHALE_SERVER_URL=https://demo.funkwhale.audio" >> .env
    
    # Create a library
    funkwhale libraries create --visibility=me
    
    # Upload some content to the server
    funkwhale uploads create <library_id> ~/Music/**/*.mp3
    
    # Search some tracks
    funkwhale tracks ls jekk
    
    # Download a track to the ~/Music directory
    funkwhale tracks download -d ~/Music <track_id>
    
    # Download a track and customize the target directory
    funkwhale tracks download -d ~/Music -t "{artist}/{album} ({year})/{title}.{extension}" <track_id>
    
    # Download all tracks matching a search, in ogg format
    funkwhale tracks ls jekk --ids --limit 0 | xargs funkwhale tracks download -f ogg -d ~/Music
    
    # Download all favorite tracks
    funkwhale tracks ls --filter "favorites=true" --ids --limit 0 | xargs funkwhale tracks download -d ~/Music
    
    # Download a track and pipe the output directly to VLC
    funkwhale tracks download <track_id> | cvlc -
    
    # Generate a playlist-file from a funkwhale playlist in a custom directory
    funkwhale playlist tracks --ids <playlist_id> | funkwhale tracks generate-playlist -d ~/Music -t "{artist}/{album} ({year})/{title}.{extension}"
    
    # Delete your library
    funkwhale libraries rm <library_id>
    
    # Logout
    funkwhale logout

    Installation (from source)

    This cli requires python 3.6 or greater:

    git clone https://dev.funkwhale.audio/funkwhale/cli.git
    cd cli
    pip install .

    Build the binary

    You can build the binary for you platform using the following commands:

    pip install .[build]
    pyinstaller cli.spec

    This will output a binary in ./dist/funkwhale.