awesome-cli Documentation

repository·master·Indexed 21 days ago

https://github.com/umutphp/awesome-cli

A command-line tool for exploring curated 'Awesome' lists on GitHub. It features an interactive mode for navigating categories, a random mode for discovery, and a surprise mode that suggests repositories based on user history. The tool fetches data from the sindresorhus/awesome repository and utilizes a local cache in the .awesomecache directory to improve performance.

Tokens
1.5K
Snippets
8
Records
11
Agent score
24%

What's inside awesome-cli

  1. How Awesome CLI works

    master

    Awesome CLI starts at the root sindresorhus/awesome repository and guides you through categories to specific repositories.

    Key behaviors:

    • Network Requirement: It fetches and parses README files from GitHub, so an active internet connection is required.
    • Caching: To improve performance, it caches README contents in a folder named .awesomecache located in your home directory.
  2. Use Awesome CLI in Interactive Mode

    master

    Running awesome-cli without any arguments launches the interactive mode. This mode allows you to navigate through categories and repositories using the arrow keys (↓ ↑ → ←).

    As you navigate, your choices are saved locally, which enables the use of surprise mode later.

    $ awesome-cli
  3. Install Awesome CLI

    master

    You can install Awesome CLI using three different methods: running directly from source, building a local binary, or using the official pre-compiled binary.

    Method 1: Basic (Run from source)

    Clone the repository and use go run to execute the main file.

    Method 2: Build as binary

    Clone the repository and build the binary directly into your local bin directory.

    Method 3: Download official binary

    Download the latest release zip from GitHub, extract it, and move the binary to your path.

    ### Basic
    ```bash
    $ git clone git@github.com:umutphp/awesome-cli.git
    $ cd awesome-cli
    $ go run main.go

    Build as binary

    $ git clone git@github.com:umutphp/awesome-cli.git
    $ cd awesome-cli
    $ sudo go build -o /usr/local/bin/awesome-cli .
    $ awesome-cli

    Download and use official binary

    $ cp /path/to/zip/extract/awesome-cli /usr/local/bin/awesome-cli
    $ awesome-cli
  4. How to use Interactive Mode (Walk)

    master
    If you run awesome-cli without any arguments, it enters an interactive 'Walk' mode. This mode allows you to traverse the awesome tree (up to three levels deep: Category $\rightarrow$ Subcategory $\rightarrow$ Repository) using a prompt. As you navigate, your choices are saved to your profile, which influences the surprise mode.
    awesome-cli
  5. Manage your profile and cache

    master

    You can manage your interaction history and the local data cache using the following commands:

    • View History: Use profile to see the categories and subcategories you have previously selected.
    • Clear History: Use reset to wipe your selection history.
    • Pre-cache Data: Use cache to download all reachable lists. This may take some time but ensures the CLI works efficiently without constant network requests.
  6. Use Surprise Mode based on history

    master

    The surprise option uses your previous selections made during interactive mode to find a random repository that aligns with your interests.

    $ awesome-cli surprise
    awesome-cli Version 0.3.0
    ✔ Back-End Development
    ✔ Docker
    ✔ Videos
    ✔ From Local Docker Development to Production Deployments
    https://www.youtube.com/watch?v=7CZFpHUPqXw
  7. Use Random Mode to find content

    master

    The random option picks a random category and then a random repository within that category from the Awesome lists.

    $ awesome-cli random
    awesome-cli Version 0.3.0
    ✔ Programming Languages
    ✔ Eta
    ✔ Community
    ✔ IRC
    https://kiwiirc.com/client/irc.freenode.net/#eta-lang
  8. Reference Awesome CLI command options

    master

    The following options are available for the awesome-cli command:

    Options of awesome-cli:
      help      To print this screen.
      random    To go to a random awesome content.
      surprise  To go to a surprise awesome content according to your previos choices.
      profile   To see your previous choices.
      reset     To clean your choices to start from the beginning.
      update    Update awesome-cli to the latest version.
  9. How to use Surprise Mode

    master

    Surprise mode uses your profile (previous choices) to intelligently suggest a repository. It selects a random category and subcategory from your history and then finds a repository within that context. If you have no history, it falls back to random mode.

    awesome-cli surprise
  10. How to use Random Mode

    master

    Random mode picks a random repository from the available awesome lists and opens it in your default browser. This is useful for discovering new tools without a specific category in mind.

    awesome-cli random
  11. CLI Commands for awesome-cli

    master

    The awesome-cli provides several commands to navigate awesome lists, view your history, or manage the local cache. Use these commands as arguments when running the CLI.

    CommandDescription
    helpPrints the help screen with available options.
    randomNavigates to a random awesome content.
    surpriseNavigates to a surprise awesome content based on your previous choices.
    profileDisplays your previous choices (your history).
    resetClears your choice history to start fresh.
    updateUpdates awesome-cli to the latest version.
    cacheDownloads all repository information to the local cache for faster access.