Skip to content

Command Line Interface#

browsr#

browsr 🗂️ a pleasant file explorer in your terminal

Navigate through directories and peek at files whether they're hosted locally, over SSH, in GitHub, AWS S3, Google Cloud Storage, or Azure Blob Storage. View code files with syntax highlighting, format JSON files, render images, convert data files to navigable datatables, and more.

browsr

Installation#

It's recommended to install browsr via pipx with all optional dependencies, this enables browsr to access remote cloud storage buckets and open parquet files.

pipx install "browsr[all]"

Usage Examples#

Local#

Browse your current working directory#

browsr

Browse a local directory#

browsr/path/to/directory

Cloud Storage#

Browse an S3 bucket#

browsr s3://bucket-name

Browse a GCS bucket#

browsr gs://bucket-name

Browse Azure Services#

browsr adl://bucket-name
browsr az://bucket-name

Pass Extra Arguments to Cloud Storage#

Some cloud storage providers require extra arguments to be passed to the filesystem. For example, to browse an anonymous S3 bucket, you need to pass the anon=True argument to the filesystem. This can be done with the -k/--kwargs argument.

browsr s3://anonymous-bucket -k anon=True

GitHub#

Browse a GitHub repository#

browsr github://juftin:browsr

Browse a GitHub Repository Branch#

browsr github://juftin:browsr@main

Browse a Private GitHub Repository#

export GITHUB_TOKEN="ghp_1234567890"
browsr github://juftin:browsr-private@main

Browse a GitHub Repository Subdirectory#

browsr github://juftin:browsr@main/tests

Browse a GitHub URL#

browsr https://github.com/juftin/browsr

Browse a Filesystem over SSH#

browsr ssh://user@host:22

Browse a SFTP Server#

browsr sftp://user@host:22/path/to/directory

Key Bindings#

  • Q - Quit the application
  • F - Toggle the file tree sidebar
  • T - Toggle the rich theme for code formatting
  • N - Toggle line numbers for code formatting
  • D - Toggle dark mode for the application
  • . - Parent Directory - go up one directory
  • R - Reload the current directory
  • C - Copy the current file or directory path to the clipboard
  • X - Download the file from cloud storage

Usage:

browsr [OPTIONS] PATH

Options:

Name Type Description Default
-l, --max-lines integer Maximum number of lines to display in the code browser 1000
-m, --max-file-size integer Maximum file size in MB for the application to open 20
--version boolean Show the version and exit. False
--debug / --no-debug boolean Enable extra debugging output False
-k, --kwargs text Key=Value pairs to pass to the filesystem None
--help boolean Show this message and exit. False