Skip to content

Latest commit

 

History

History
156 lines (113 loc) · 2.86 KB

INSTALL.md

File metadata and controls

156 lines (113 loc) · 2.86 KB

Installing abc (AI bash/zsh/tcsh Command)

This guide provides instructions for installing abc on your system using pipx.

Prerequisites

  • Linux or macOS
  • Python 3.8 or higher
  • bash 4.4+, zsh 5.0+, or tcsh 6.0+
  • An API key for the Claude AI model from Anthropic

Easy Installation

  1. Install the latest version of abc from GitHub using pipx:

    curl -fsSL https://getabc.sh/ | bash

    This will:

    • Prompt you before every action
    • Create backups of any modified files
    • Describe every change it makes
    • Install pipx using the method preferred by your OS
    • Install the abc app using pipx
    • Install abc shell integration scripts
    • Add an abc command block to your shell rc file(s)
    • Guide you through LLM API key setup
    • Create the abc configuration file
  2. Start a new terminal or reload your shell rc file to enable the abc command:

    # For bash:
    source ~/.bashrc
    
    # For zsh:
    source ~/.zshrc
    
    # For tcsh:
    source ~/.tcshrc
  3. Verify the installation:

    abc hi
    abc --version

Manual Installation

  1. Install pipx, if you haven't already:

    # macOS
    brew install pipx
    pipx ensurepath
    
    # Ubuntu 23.04 or above
    sudo apt install pipx
    pipx ensurepath
    
    # Fedora
    sudo dnf install pipx
    pipx ensurepath
    
    # Arch
    sudo pacman -S python-pipx
    pipx ensurepath
    
    # Alternative: using pip
    python3 -m pip install --user pipx
    python3 -m pipx ensurepath
  2. Install abc using pipx:

    From GitHub:

    pipx install git+https://github.com/alestic/abc.git
    abc_setup

    Alternative:

    git clone https://github.com/alestic/abc.git
    cd abc
    pipx install .
    abc_setup
  3. Start a new terminal or reload your shell rc file to enable the abc command:

    # For bash:
    source ~/.bashrc
    
    # For zsh:
    source ~/.zshrc
    
    # For tcsh:
    source ~/.tcshrc
  4. Verify the installation:

    abc hi
    abc --version

Updating

To update abc to the latest version:

pipx upgrade abc-cli
abc_setup

Uninstalling

To remove abc from your system:

abc_setup --uninstall
pipx uninstall abc-cli

Files and Locations

  • Shell integration: ~/.local/share/abc/
  • Shell configuration:
    • bash: ~/.bashrc
    • zsh: ~/.zshrc
    • tcsh: ~/.tcshrc
  • abc Configuration: ~/.abc.conf

Troubleshooting

  1. If you see "command not found: pipx" during installation:

    • Run: pipx ensurepath
    • Start a new terminal
  2. If abc commands don't work after installation:

    • Ensure your shell rc file was sourced
    • Check that ~/.abc.conf exists and contains your API key
    • Verify the shell integration with type abc
  3. For other issues:

    • Check the error message
    • Verify Python version: python3 --version
    • Ensure shell version meets requirements