From 3afcf58397161f5db9c4419a99649157649bca7f Mon Sep 17 00:00:00 2001 From: Eric Hammond Date: Sun, 15 Dec 2024 13:41:50 -0800 Subject: [PATCH] clarify install in docs --- app/components/Installation.tsx | 101 ++++++++++++++++++++++-------- app/components/SafetyFeatures.tsx | 6 +- doc/tree.txt | 3 +- install-script-header.txt | 2 +- 4 files changed, 81 insertions(+), 31 deletions(-) diff --git a/app/components/Installation.tsx b/app/components/Installation.tsx index 8cb0119..4accacc 100644 --- a/app/components/Installation.tsx +++ b/app/components/Installation.tsx @@ -7,37 +7,86 @@ export default function Installation() { navigator.clipboard.writeText(text) } - const installationCode = `# Install pipx if needed -sudo apt install pipx # Linux -brew install pipx # macOS -pipx ensurepath + const installationCode = `curl -fsSL https://getabc.sh/ | bash` -# Install abc -pipx install git+https://github.com/alestic/abc.git -abc_setup` + const afterInstallCode = `# For bash: +source ~/.bashrc + +# For zsh: +source ~/.zshrc + +# For tcsh: +source ~/.tcshrc` + + const verifyCode = `abc --version +abc hi` return ( -
+

Quick Install

-
-
-          {installationCode}
-        
- + + {/* Installation Steps */} +
+

Install the latest version from GitHub using pipx

+
+
+            {installationCode}
+          
+ +
+
+ + {/* Reload your shell configuration */} +
+

Reload your shell configuration

+
+
+            {afterInstallCode}
+          
+ +
+
+ + {/* Verification */} +
+

Verify Installation

+
+
+            {verifyCode}
+          
+ +
+
+ + {/* More Info */} +
+

More Information

+

+ For more details, manual installation options, upgrade, uninstall, and troubleshooting, see the{' '} + + complete installation guide + + . +

-

- For alternative methods and troubleshooting, see the{' '} - - detailed installation guide - - . -

) } diff --git a/app/components/SafetyFeatures.tsx b/app/components/SafetyFeatures.tsx index cc06889..197ecce 100644 --- a/app/components/SafetyFeatures.tsx +++ b/app/components/SafetyFeatures.tsx @@ -10,7 +10,7 @@ export default function SafetyFeatures() { return (

Safety Features

-

abc uses the LLM to evaluate the potential danger of each generated command using a scale:

+

abc uses the LLM to evaluate the potential danger of each generated command using a risk scale:

    {dangerLevels.map(({ level, description, icon: Icon }) => (
  • @@ -22,9 +22,9 @@ export default function SafetyFeatures() { ))}

- Note: Commands the LLM evaluates with Level 2 risk are prefixed with a #DANGEROUS# comment, which requires removing before execution. + >#DANGEROUS# comment, which requires removal before execution. A brief justification is provided for its evaluation, helping the user understand the potential risk.

diff --git a/doc/tree.txt b/doc/tree.txt index 68ddf6d..ff05c5c 100644 --- a/doc/tree.txt +++ b/doc/tree.txt @@ -1,6 +1,7 @@ getabc.sh ├── .eslintrc.json ├── .gitignore +├── install-script-header.txt ├── Makefile ├── next.config.js ├── package.json @@ -35,4 +36,4 @@ getabc.sh └── workflows └── nextjs.yml -6 directories, 30 files +6 directories, 31 files diff --git a/install-script-header.txt b/install-script-header.txt index 81f6e7f..9ddd59c 100644 --- a/install-script-header.txt +++ b/install-script-header.txt @@ -2,7 +2,7 @@ bash -c ' tmp_dir=$(mktemp -d) && trap "rm -rf \"$tmp_dir\"" EXIT && - echo "Downloading the latest abc install script from Eric Hammond's Alestic organization on GitHub" && + echo "Downloading the latest abc install script from Eric Hammond\'s Alestic organization on GitHub" && curl -fsSL https://raw.githubusercontent.com/alestic/abc/refs/heads/main/install_from_github.sh \ -o "$tmp_dir/abc_install.sh" && chmod +x "$tmp_dir/abc_install.sh" &&