aigogo

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 10, 2026 License: MPL-2.0 Imports: 3 Imported by: 0

README ΒΆ

aigogo

aigogo is a package manager for AI agents that uses Docker registries as a transport mechanism. Share, distribute, and reuse code packages across projects and agents without the overhead of full package ecosystems.

Features

  • πŸš€ Simple: Use Docker registries to distribute packages
  • πŸ“¦ Lightweight: No runtime dependencies, just pure file packaging
  • πŸ”’ Secure: Leverage Docker registry authentication and encryption
  • 🌐 Universal: Works with any Docker-compatible registry
  • πŸ”„ Version Control: Use Docker tags for versioning
  • βœ… Dependency Management: Automatically generate and display language-specific dependencies
  • πŸ” Validation: Scan source files and validate dependencies
  • πŸ”¨ Local-First: Build and test locally before pushing to registries
  • πŸ“‹ Lock Files: Reproducible installs with aigogo.lock
  • πŸ”— Namespace Imports: Use from aigogo.package_name (Python) or @aigogo/package-name (JS)

Table of Contents


Quick Start

1. Install aigg
# From source
git clone https://github.com/aupeachmo/aigogo.git
cd aigogo
make build
sudo make install  # Installs to /usr/local/bin
2. Use a Package (Consumer Workflow)
cd ~/my-project

# Add a package from Docker Hub
aigg add docker.io/org/my-utils:1.0.0

# Or from GitHub Container Registry
aigg add ghcr.io/org/my-utils:1.0.0

# Install packages (creates import symlinks)
aigg install

# Use in Python
python -c "from aigogo.my_utils import helper; print(helper())"

# Use in JavaScript
node -e "const utils = require('@aigogo/my-utils'); console.log(utils)"
3. Create a Package (Author Workflow)
# Create a directory
mkdir my-api-utils && cd my-api-utils

# Create a Python file
cat > api_client.py <<'EOF'
import requests

def fetch_json(url):
    response = requests.get(url)
    response.raise_for_status()
    return response.json()
EOF

# Initialize, add files, build
aigg init
aigg add file api_client.py
aigg add dep requests ">=2.31.0,<3.0.0"
aigg build

# Push to Docker Hub (optional)
aigg login docker.io
aigg push docker.io/yourusername/api-utils:1.0.0 --from api-utils:1.0.0

# Or push to GitHub Container Registry
aigg login ghcr.io
aigg push ghcr.io/yourusername/api-utils:1.0.0 --from api-utils:1.0.0

Installation

From Binary Release
# Download latest release for your platform
# Linux (AMD64)
wget https://github.com/aupeachmo/aigogo/releases/latest/download/aigg-linux-amd64.tar.gz
tar -xzf aigg-linux-amd64.tar.gz
sudo mv aigg-linux-amd64 /usr/local/bin/aigg

# Linux (ARM64)
wget https://github.com/aupeachmo/aigogo/releases/latest/download/aigg-linux-arm64.tar.gz
tar -xzf aigg-linux-arm64.tar.gz
sudo mv aigg-linux-arm64 /usr/local/bin/aigg

# macOS (Intel)
wget https://github.com/aupeachmo/aigogo/releases/latest/download/aigg-darwin-amd64.tar.gz
tar -xzf aigg-darwin-amd64.tar.gz
sudo mv aigg-darwin-amd64 /usr/local/bin/aigg

# macOS (Apple Silicon)
wget https://github.com/aupeachmo/aigogo/releases/latest/download/aigg-darwin-arm64.tar.gz
tar -xzf aigg-darwin-arm64.tar.gz
sudo mv aigg-darwin-arm64 /usr/local/bin/aigg

# Verify
aigg version
From Source
git clone https://github.com/aupeachmo/aigogo.git
cd aigogo
make build
sudo make install  # Installs to /usr/local/bin + shell completion

# Or install to ~/bin (no sudo)
make install-user  # Also installs shell completion

# Installation automatically configures tab completion for bash/zsh
Build for Multiple Platforms
make build-all
ls -lh bin/

Workflows

Using Packages (Consumer)

The recommended workflow for using aigogo packages in your project:

cd ~/my-project

# Step 1: Add packages to your project (Docker Hub or ghcr.io)
aigg add docker.io/org/string-utils:1.0.0
aigg add ghcr.io/org/api-client:2.0.0

# Step 2: Install packages (creates symlinks in .aigogo/)
aigg install

# Step 3: Commit the lock file to version control
git add aigogo.lock
git commit -m "Add aigogo packages"

# Step 4: Use the packages in your code

Python usage:

# aigg install auto-configures your Python path via .pth file
from aigogo.string_utils import titlecase, reverse
from aigogo.api_client import fetch_json

print(titlecase("hello world"))
data = fetch_json("https://api.example.com/data")

JavaScript usage:

require('./.aigogo/register'); // auto-configures module resolution

const stringUtils = require('@aigogo/string-utils');
const apiClient = require('@aigogo/api-client');

console.log(stringUtils.titlecase("hello world"));

Team workflow:

# When a teammate clones the project
git clone <repo>
cd <project>
aigg install  # Recreates .aigogo/ from aigogo.lock
Creating Packages (Author)
# Step 1: Create and initialize
mkdir my-utils && cd my-utils
aigg init

# Step 2: Add your code
aigg add file "*.py"              # Add Python files
aigg add dep requests ">=2.31.0"  # Add dependencies

# Step 3: Validate and build
aigg validate                     # Check dependencies match code
aigg build                        # Build locally (auto-versions)

# Step 4: Test locally
cd ~/test-project
aigg add ../my-utils/my-utils:0.1.1  # Add from local cache
aigg install
python -c "from aigogo.my_utils import ..."

# Step 5: Share (optional - Docker Hub or ghcr.io)
aigg login docker.io          # or: aigg login ghcr.io
aigg push docker.io/you/my-utils:0.1.1 --from my-utils:0.1.1
Local-Only Usage

You don't need any Docker registry to use aigogo! Perfect for personal tools or private development.

# Machine 1: Create a utility package
mkdir ~/string-utils && cd ~/string-utils

cat > string_helpers.py <<'EOF'
def titlecase(text):
    return text.title()

def reverse(text):
    return text[::-1]
EOF

aigg init
aigg add file string_helpers.py
aigg build string-utils:1.0.0

# Machine 1: Use in another project
cd ~/my-project
aigg add string-utils:1.0.0  # Local reference (no registry)
aigg install

python -c "from aigogo.string_utils import titlecase; print(titlecase('hello'))"

Sharing locally without a registry:

# Machine 1: Package the local build
cd ~/.aigogo/cache
tar -czf string-utils-1.0.0.tar.gz string-utils_1.0.0/

# Transfer via USB, network share, or scp
scp string-utils-1.0.0.tar.gz colleague@machine2:~

# Machine 2: Import the build
mkdir -p ~/.aigogo/cache && cd ~/.aigogo/cache
tar -xzf ~/string-utils-1.0.0.tar.gz

# Machine 2: Use it
cd ~/my-project
aigg add string-utils:1.0.0
aigg install

Tab Completion

aigg supports tab completion for bash, zsh, and fish shells.

Bash
# Persistent (recommended)
aigg completion bash | sudo tee /etc/bash_completion.d/aigg > /dev/null
source ~/.bashrc

# Or add to ~/.bashrc
echo 'source <(aigg completion bash)' >> ~/.bashrc
Zsh
mkdir -p ~/.zsh/completions
aigg completion zsh > ~/.zsh/completions/_aigg
echo 'fpath=(~/.zsh/completions $fpath)' >> ~/.zshrc
echo 'autoload -Uz compinit && compinit' >> ~/.zshrc
exec zsh
Fish
mkdir -p ~/.config/fish/completions
aigg completion fish > ~/.config/fish/completions/aigg.fish

Command Reference

Consumer Commands
# Add packages to aigogo.lock
aigg add <registry/repo:tag>     # Add from registry
aigg add <name:tag>              # Add from local cache

# Install packages from lock file
aigg install                     # Creates .aigogo/imports/ with symlinks

# Remove installed packages and import configuration
aigg uninstall                   # Removes .aigogo/, .pth file, register.js
Author Commands
# Initialize and manage manifest
aigg init                        # Create aigogo.json
aigg add file <path>...          # Add files to package
aigg add dep <pkg> <ver>         # Add runtime dependency
aigg add dep --from-pyproject    # Import deps from pyproject.toml
aigg add dev <pkg> <ver>         # Add dev dependency
aigg rm file <path>...           # Remove files
aigg rm dep <pkg>                # Remove dependency
aigg scan                        # Auto-detect dependencies
aigg validate                    # Verify dependencies match code

# Build and share
aigg build                       # Build locally (auto-increments version)
aigg build <name>:<tag>          # Build with explicit version
aigg push <registry>/<name>:<tag> --from <local-name>:<tag>
Cache Management
aigg list                        # Show cached packages
aigg remove <name>:<tag>         # Delete from local cache
aigg remove-all                  # Delete all cached packages
Registry Commands
aigg login <registry>            # Authenticate (interactive)
aigg login --dockerhub           # Login to Docker Hub
aigg login ghcr.io               # Login to GitHub Container Registry
aigg pull <registry/repo:tag>    # Pull without installing
aigg delete <registry/repo:tag>  # Delete from registry
aigg search <query>              # Search registry

Supported registries: Docker Hub (docker.io), GitHub Container Registry (ghcr.io), and any Docker V2-compatible registry.

ghcr.io tip: Use a Personal Access Token with read:packages / write:packages scope as your password when logging in.

Utilities
aigg show-deps <path>            # Show dependencies from aigogo.json
aigg show-deps <path> --format pyproject  # Output in pyproject.toml format
aigg show-deps <path> --format poetry     # Output in Poetry format
aigg show-deps <path> --format requirements  # Output as requirements.txt
aigg show-deps <path> --format npm        # Output as package.json fragment
aigg show-deps <path> --format yarn       # Output as yarn add commands
aigg version                     # Show version
aigg completion <bash|zsh|fish>  # Generate shell completion
Command Summary
Command Purpose Example
add Add package or file/dep aigg add docker.io/org/utils:1.0.0
install Install from lock file aigg install
uninstall Remove imports & config aigg uninstall
init Create aigogo.json aigg init
build Package locally aigg build
push Upload to registry aigg push ghcr.io/me/utils:1.0.0 --from utils:1.0.0
list Show cached packages aigg list
remove Delete from cache aigg remove utils:1.0.0
validate Check dependencies aigg validate
scan Find dependencies aigg scan

Project Structure

After running aigg install, your project will have:

my-project/
β”œβ”€β”€ aigogo.lock              # Lock file - COMMIT THIS
β”œβ”€β”€ .aigogo/                 # Import links - GITIGNORED
β”‚   β”œβ”€β”€ register.js          # Node.js path registration script
β”‚   β”œβ”€β”€ .pth-location        # Tracks where aigogo.pth was installed
β”‚   └── imports/
β”‚       β”œβ”€β”€ aigogo/          # Python namespace
β”‚       β”‚   β”œβ”€β”€ __init__.py  # Namespace marker
β”‚       β”‚   β”œβ”€β”€ string_utils/  β†’ ~/.aigogo/store/sha256/ab/abc.../files/
β”‚       β”‚   └── api_client/    β†’ ~/.aigogo/store/sha256/cd/cde.../files/
β”‚       └── @aigogo/         # JavaScript scope
β”‚           β”œβ”€β”€ string-utils/  # Real dir with file symlinks + package.json
β”‚           └── api-client/    # Real dir with file symlinks + package.json
β”œβ”€β”€ .gitignore               # Contains: .aigogo/
└── your-code.py

Global store structure:

~/.aigogo/
β”œβ”€β”€ store/sha256/            # Content-addressable storage
β”‚   └── ab/abc123.../        # Package by hash
β”‚       β”œβ”€β”€ files/           # Package files (read-only)
β”‚       └── aigogo.json      # Package manifest
β”œβ”€β”€ cache/                   # Build cache
└── auth.json                # Registry credentials

aigogo.json Format

Unified Manifest
{
  "$schema": "https://github.com/aupeachmo/aigogo/blob/master/aigogo.schema.json",
  "name": "my-snippet",
  "version": "1.0.0",
  "description": "Description of your package",
  "author": "Your Name",
  "language": {
    "name": "python",
    "version": ">=3.8,<4.0"
  },
  "dependencies": {
    "runtime": [
      {"package": "requests", "version": ">=2.31.0,<3.0.0"}
    ],
    "dev": [
      {"package": "pytest", "version": ">=7.0.0"}
    ]
  },
  "files": {
    "include": "auto",
    "exclude": ["*.pyc", "__pycache__"]
  },
  "metadata": {
    "license": "MPL-2.0",
    "tags": ["http", "api", "client"]
  },
  "ai": {
    "summary": "Decorate Python functions to auto-generate OpenAI-compatible tool-calling schemas.",
    "capabilities": ["Generate tool schemas from type hints", "Dispatch tool calls by name"],
    "usage": "from aigogo.my_snippet import tool, get_tools\n\n@tool\ndef my_func(arg: str) -> str: ..."
  }
}
aigogo.lock Format
{
  "version": 1,
  "packages": {
    "my_utils": {
      "version": "1.0.0",
      "integrity": "sha256:abc123def456...",
      "source": "docker.io/org/my-utils:1.0.0",
      "language": "python",
      "files": ["utils.py", "helpers.py"]
    }
  }
}
Auto-Discovery

Set "files": {"include": "auto"} and aigogo will automatically discover source files based on your language:

  • Python: Finds all .py files
  • JavaScript/TypeScript: Finds .js, .ts, .jsx, .tsx, .mjs, .cjs
  • Go: Finds all .go files
  • Rust: Finds all .rs files
.aigogoignore File

Create a .aigogoignore file (like .gitignore) to exclude files:

# Build artifacts
dist/
build/

# Test files
tests/
*_test.py

# IDE files
.vscode/
.idea/

Python Setup

aigg install automatically configures your Python environment by writing an aigogo.pth file to your active Python's site-packages directory. This works with system Python, venv, Poetry, and uv virtualenvs β€” no manual setup required.

# Just works after aigg install
from aigogo.my_utils import helper

Manual fallback (if auto-configuration fails, e.g. python3 not installed):

export PYTHONPATH="$(pwd)/.aigogo/imports:$PYTHONPATH"
python your_script.py

JavaScript Setup

aigg install generates a register script at .aigogo/register.js that configures Node.js module resolution automatically.

Option 1: Require in your entry point (CommonJS)

require('./.aigogo/register');

const { countTokens } = require('@aigogo/token-budget-js');

Option 2: Preload flag (CommonJS and ESM)

node --require ./.aigogo/register.js app.js

Entry point resolution: aigg generates a package.json with a main field so that require('@aigogo/pkg') works. The entry point is resolved from top-level files only (priority: index.js > index.mjs > index.cjs > single file > first file alphabetically). Packages with JS files only in subdirectories will need explicit paths, e.g. require('@aigogo/pkg/sub/file').

Manual fallback (if the register script approach doesn't fit your setup):

export NODE_PATH="$(pwd)/.aigogo/imports:$NODE_PATH"
node your_script.js

Development Setup

Prerequisites
  • Go 1.24+: Install Go
  • Git: For version control
  • Make: For build automation
Setup
git clone https://github.com/aupeachmo/aigogo.git
cd aigogo
go mod download
make build
./bin/aigg version
Project Structure
aigogo/
β”œβ”€β”€ cmd/              # CLI commands
β”‚   β”œβ”€β”€ root.go       # Command routing
β”‚   β”œβ”€β”€ add.go        # Add packages/files/deps
β”‚   β”œβ”€β”€ install.go    # Install from lock file
β”‚   β”œβ”€β”€ build.go      # Build command
β”‚   └── ...
β”œβ”€β”€ pkg/              # Core packages
β”‚   β”œβ”€β”€ store/        # Content-addressable storage
β”‚   β”œβ”€β”€ lockfile/     # Lock file management
β”‚   β”œβ”€β”€ imports/      # Import namespace setup
β”‚   β”œβ”€β”€ docker/       # Registry interaction
β”‚   β”œβ”€β”€ manifest/     # Manifest parsing
β”‚   β”œβ”€β”€ depgen/       # Dependency generation
β”‚   └── auth/         # Authentication
β”œβ”€β”€ main.go           # Entry point
β”œβ”€β”€ Makefile          # Build automation
└── go.mod            # Go module
Running Tests
go test -v ./...
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

License

MPL-2.0 - See LICENSE for details.


AI Agent Integration

aigogo packages can include an optional ai field in aigogo.json that describes the package in terms AI agents can parse -- summary, capabilities, usage examples, and input/output descriptions. This enables agents to discover, evaluate, and use packages without reading source code.

A Claude Code skill (/aigogo) is also included for AI-assisted package creation and consumption.

See MACHINES.md for full documentation.

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL