From 0ba622741209cc6698fbb387cd12b0328f2bc87f Mon Sep 17 00:00:00 2001 From: Your Name Date: Sat, 19 Jul 2025 15:43:38 +1200 Subject: [PATCH] Modify README.md --- README.md | 278 +++++++++++++++-------------------------------- getpkg/README.md | 192 ++++++++++++++++++++++++++++++++ 2 files changed, 278 insertions(+), 192 deletions(-) create mode 100644 getpkg/README.md diff --git a/README.md b/README.md index 80fa482..4efdbea 100644 --- a/README.md +++ b/README.md @@ -1,192 +1,86 @@ -# getpkg - Package Manager for Dropshell Tools - -getpkg is a command-line package manager that simplifies tool installation, management, and publishing for the dropshell ecosystem. Tools are installed to `~/.getpkg/` with executable symlinks in `~/.local/bin/getpkg/` and automatically added to your PATH with bash completion. - -## Installation - -Install getpkg with a single command: - -```bash -curl https://getbin.xyz/getpkg-install | bash -``` - -After installation, restart your shell or run `source ~/.bashrc` to enable the new PATH and completion settings. - -## Basic Usage - -### Installing Tools - -Install any tool from the getpkg registry: - -```bash -# Install a tool -getpkg install whatsdirty -``` - -### Managing Installed Tools - -```bash -# List all available commands -getpkg help - -# Update all installed tools -getpkg update - -# Uninstall a tool -getpkg uninstall whatsdirty - -# Check getpkg version -getpkg version -``` - -## Available Commands - -### Core Package Management - -- **`getpkg install `** - Install or update a tool -- **`getpkg uninstall `** - Remove an installed tool -- **`getpkg update`** - Update getpkg and all installed tools - -### Publishing (Requires SOS_WRITE_TOKEN) - -- **`getpkg publish `** - Upload a tool to getpkg.xyz -- **`getpkg unpublish `** - Remove a published tool -- **`getpkg unpublish `** - Remove a published tool by hash - -### Development Tools - -- **`getpkg create `** - Create a new tool project -- **`getpkg hash `** - Calculate hash of files/directories - -### Information - -- **`getpkg list`** - List all available packages with status -- **`getpkg clean`** - Clean up orphaned configs and symlinks -- **`getpkg version`** - Show getpkg version -- **`getpkg help`** - Show detailed help -- **`getpkg autocomplete`** - Show available commands for completion - -## How It Works - -### Installation Process - -When you install a tool, getpkg: - -1. **Downloads** the tool archive from getpkg.xyz -2. **Extracts** it to `~/.getpkg//` -3. **Creates symlinks** for all executables in `~/.local/bin/getpkg/` -4. **Ensures PATH** includes `~/.local/bin/getpkg` (one-time setup) -5. **Enables completion** for the tool -6. **Runs setup** if a `setup_script.sh` exists -7. **Stores metadata** in `~/.config/getpkg/.json` - -### Architecture Support - -getpkg supports multiple architectures: -- `x86_64` (Intel/AMD 64-bit) -- `aarch64` (ARM 64-bit) -- `universal` (cross-platform tools) - -Tools are automatically downloaded for your architecture, with fallback to universal versions. - -### File Locations - -- **Tool files**: `~/.getpkg//` (actual tool installation) -- **Executable symlinks**: `~/.local/bin/getpkg/` (in your PATH) -- **Configuration**: `~/.config/getpkg/` -- **PATH setup**: `~/.bashrc_getpkg` (sourced by `~/.bashrc`) - -## Examples - -### Installing Popular Tools - -```bash -# Install available tools -getpkg install dehydrate # File to C++ code generator -getpkg install bb64 # Bash base64 encoder/decoder - -# Development tools (for repository development) -getpkg install whatsdirty # Check git repo status -getpkg install sos # Simple object storage client -getpkg install gp # Git push utility -``` - -### Publishing Your Own Tools - -```bash -# Set your publishing token -export SOS_WRITE_TOKEN="your-token-here" - -# Create a new tool project -getpkg create mytool ./mytool-project - -# Publish architecture-specific build -getpkg publish mytool:x86_64 ./build/ - -# Publish universal tool -getpkg publish mytool ./build/ - -# Remove published tool -getpkg unpublish mytool:x86_64 -``` - -### Development Workflow - -```bash -# Create tool structure -getpkg create awesome-tool ./awesome-tool -cd awesome-tool - -# Build your tool... -# Add executable to the directory - -# Test locally -./awesome-tool --version - -# Publish when ready -getpkg publish awesome-tool:x86_64 . -``` - -## Environment Variables - -- **`SOS_WRITE_TOKEN`** - Authentication token for publishing tools - -## Troubleshooting - -### Tool Not Found -If a tool isn't found after installation, ensure your shell has loaded the new PATH: -```bash -source ~/.bashrc -``` - -### Permission Issues -getpkg installs to your home directory and doesn't require root access. If you encounter permission issues, check that `~/.local/bin/` is writable. - -### Network Issues -All tools are downloaded from `getpkg.xyz`. Ensure you have internet connectivity and the domain is accessible. - -## Development - -### Building getpkg - -```bash -# Build debug version -cd getpkg && ./build.sh - -# Run tests -cd getpkg && ./test.sh - -# Publish (requires SOS_WRITE_TOKEN) -cd getpkg && ./publish.sh -``` - -### Tool Development - -When creating tools for getpkg: - -1. Create a directory with your tool binary -2. Optionally include a `setup_script.sh` for post-install setup -3. The tool should support `version` and `autocomplete` subcommands -4. Use `getpkg publish` to upload to the registry - -For more details, see the development documentation in each tool's directory. +# getpkg - Simple Package Manager + +getpkg is a command-line package manager that makes it easy to install and manage developer tools. Tools are automatically installed to your home directory and added to your PATH. + +## Quick Start + +Install getpkg with one command: + +```bash +curl https://getbin.xyz/getpkg-install | bash +``` + +After installation, restart your shell or run: +```bash +source ~/.bashrc +``` + +## Basic Commands + +### Install Tools +```bash +getpkg install # Install a tool +getpkg list # See all available tools +getpkg update # Update all installed tools +``` + +### Manage Tools +```bash +getpkg uninstall # Remove a tool +getpkg version # Check getpkg version +getpkg help # Show all commands +``` + +## Popular Tools + +Install these useful developer tools: + +```bash +getpkg install bb64 # Bash-compatible base64 encoder/decoder +getpkg install dehydrate # Convert files to C++ source code +getpkg install whatsdirty # Check git repository status +getpkg install sos # Simple object storage client +getpkg install gp # Git push utility +``` + +## How It Works + +When you install a tool: +1. Downloads from getpkg.xyz +2. Installs to `~/.getpkg//` +3. Creates shortcuts in `~/.local/bin/getpkg/` +4. Adds to your PATH automatically +5. Enables bash completion + +## File Locations + +- **Installed tools**: `~/.getpkg//` +- **Shortcuts**: `~/.local/bin/getpkg/` (in your PATH) +- **Settings**: `~/.config/getpkg/` + +## Architecture Support + +getpkg automatically downloads the right version for your system: +- Intel/AMD 64-bit (`x86_64`) +- ARM 64-bit (`aarch64`) +- Universal (works everywhere) + +## Troubleshooting + +**Tool not found after install?** +```bash +source ~/.bashrc +``` + +**Permission errors?** +getpkg installs to your home directory - no root access needed. + +**Network issues?** +Check your internet connection to `getpkg.xyz`. + +## Need Help? + +```bash +getpkg help # Show detailed help +getpkg list # See what's available +``` \ No newline at end of file diff --git a/getpkg/README.md b/getpkg/README.md new file mode 100644 index 0000000..2a4f084 --- /dev/null +++ b/getpkg/README.md @@ -0,0 +1,192 @@ +# getpkg - Package Manager for Dropshell Tools + +getpkg is a command-line package manager that simplifies tool installation, management, and publishing for the dropshell ecosystem. Tools are installed to `~/.getpkg/` with executable symlinks in `~/.local/bin/getpkg/` and automatically added to your PATH with bash completion. + +## Installation + +Install getpkg with a single command: + +```bash +curl https://getbin.xyz/getpkg-install | bash +``` + +After installation, restart your shell or run `source ~/.bashrc` to enable the new PATH and completion settings. + +## Basic Usage + +### Installing Tools + +Install any tool from the getpkg registry: + +```bash +# Install a tool +getpkg install whatsdirty +``` + +### Managing Installed Tools + +```bash +# List all available commands +getpkg help + +# Update all installed tools +getpkg update + +# Uninstall a tool +getpkg uninstall whatsdirty + +# Check getpkg version +getpkg version +``` + +## Available Commands + +### Core Package Management + +- **`getpkg install `** - Install or update a tool +- **`getpkg uninstall `** - Remove an installed tool +- **`getpkg update`** - Update getpkg and all installed tools + +### Publishing (Requires SOS_WRITE_TOKEN) + +- **`getpkg publish `** - Upload a tool to getpkg.xyz +- **`getpkg unpublish `** - Remove a published tool +- **`getpkg unpublish `** - Remove a published tool by hash + +### Development Tools + +- **`getpkg create `** - Create a new tool project +- **`getpkg hash `** - Calculate hash of files/directories + +### Information + +- **`getpkg list`** - List all available packages with status +- **`getpkg clean`** - Clean up orphaned configs and symlinks +- **`getpkg version`** - Show getpkg version +- **`getpkg help`** - Show detailed help +- **`getpkg autocomplete`** - Show available commands for completion + +## How It Works + +### Installation Process + +When you install a tool, getpkg: + +1. **Downloads** the tool archive from getpkg.xyz +2. **Extracts** it to `~/.getpkg//` +3. **Creates symlinks** for all executables in `~/.local/bin/getpkg/` +4. **Ensures PATH** includes `~/.local/bin/getpkg` (one-time setup) +5. **Enables bash completion** for the tool +6. **Runs setup** if a `setup_script.sh` exists +7. **Stores metadata** in `~/.config/getpkg/.json` + +### Architecture Support + +getpkg supports multiple architectures: +- `x86_64` (Intel/AMD 64-bit) +- `aarch64` (ARM 64-bit) +- `universal` (cross-platform tools) + +Tools are automatically downloaded for your architecture, with fallback to universal versions. + +### File Locations + +- **Tool files**: `~/.getpkg//` (actual tool installation) +- **Executable symlinks**: `~/.local/bin/getpkg/` (in your PATH) +- **Configuration**: `~/.config/getpkg/` +- **PATH setup**: `~/.bashrc_getpkg` (sourced by `~/.bashrc`) + +## Examples + +### Installing Popular Tools + +```bash +# Install available tools +getpkg install dehydrate # File to C++ code generator +getpkg install bb64 # Bash base64 encoder/decoder + +# Development tools (for repository development) +getpkg install whatsdirty # Check git repo status +getpkg install sos # Simple object storage client +getpkg install gp # Git push utility +``` + +### Publishing Your Own Tools + +```bash +# Set your publishing token +export SOS_WRITE_TOKEN="your-token-here" + +# Create a new tool project +getpkg create mytool ./mytool-project + +# Publish architecture-specific build +getpkg publish mytool:x86_64 ./build/ + +# Publish universal tool +getpkg publish mytool ./build/ + +# Remove published tool +getpkg unpublish mytool:x86_64 +``` + +### Development Workflow + +```bash +# Create tool structure +getpkg create awesome-tool ./awesome-tool +cd awesome-tool + +# Build your tool... +# Add executable to the directory + +# Test locally +./awesome-tool --version + +# Publish when ready +getpkg publish awesome-tool:x86_64 . +``` + +## Environment Variables + +- **`SOS_WRITE_TOKEN`** - Authentication token for publishing tools + +## Troubleshooting + +### Tool Not Found +If a tool isn't found after installation, ensure your shell has loaded the new PATH: +```bash +source ~/.bashrc +``` + +### Permission Issues +getpkg installs to your home directory and doesn't require root access. If you encounter permission issues, check that `~/.local/bin/` is writable. + +### Network Issues +All tools are downloaded from `getpkg.xyz`. Ensure you have internet connectivity and the domain is accessible. + +## Development + +### Building getpkg + +```bash +# Build debug version +cd getpkg && ./build.sh + +# Run tests +cd getpkg && ./test.sh + +# Publish (requires SOS_WRITE_TOKEN) +cd getpkg && ./publish.sh +``` + +### Tool Development + +When creating tools for getpkg: + +1. Create a directory with your tool binary +2. Optionally include a `setup_script.sh` for post-install setup +3. The tool should support `version` and `autocomplete` subcommands +4. Use `getpkg publish` to upload to the registry + +For more details, see the development documentation in each tool's directory.