Command line interface for AI Memoria API. The CLI is designed to be simple and memorable with the command mem.
curl -sSL https://raw.githubusercontent.com/bitcoiners/ai-memoria-cli/main/get.sh | bash
-
Download the binary for your platform from releases
-
Install manually:
Linux/macOS:
# Download (example for Linux amd64)
wget https://github.com/bitcoiners/ai-memoria-cli/releases/download/v0.2.0/mem-linux-amd64 -O mem
# Make executable
chmod +x mem
# Move to a directory in your PATH
mkdir -p ~/.local/bin
mv mem ~/.local/bin/
# Verify installation
mem --version
Windows:
# Download mem-windows-amd64.exe
# Rename to mem.exe
# Move to a directory in your PATH, e.g., C:\Users\YourName\bin\
# Add that directory to your PATH environment variable
git clone git@github.com:bitcoiners/ai-memoria-cli.git
cd ai-memoria-cli
make install
go install github.com/bitcoiners/ai-memoria-cli@latest
make buildThis creates a binary at bin/mem
make build-allThis creates binaries for:
- Linux (amd64, arm64)
- macOS (amd64, arm64)
- Windows (amd64, arm64)
Binaries will be in the bin/ directory:
mem-linux-amd64mem-linux-arm64mem-darwin-amd64mem-darwin-arm64mem-windows-amd64.exemem-windows-arm64.exe
# Build with version tag
./release.sh v1.0.0
# Or use make
make release VERSION=v1.0.0This creates a releases/ directory with all platform binaries and checksums.
# Build for your current platform
go build -o mem main.go
# Build for specific platform
GOOS=linux GOARCH=amd64 go build -o mem-linux-amd64 main.go
GOOS=darwin GOARCH=arm64 go build -o mem-darwin-arm64 main.go
GOOS=windows GOARCH=amd64 go build -o mem-windows-amd64.exe main.go-
Install GitHub CLI:
# Ubuntu/Debian curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null sudo apt update sudo apt install gh # macOS brew install gh # Windows (using winget) winget install --id GitHub.cli
-
Authenticate with GitHub:
gh auth login
Follow the prompts to authenticate with your GitHub account.
git status
git add .
git commit -m "Your commit message"
git push origin main# Create a tag (using semantic versioning)
git tag v0.1.0
# Push the tag to GitHub
git push origin v0.1.0# Build all platform binaries
./release.sh v0.1.0
# Or use make
make release VERSION=v0.1.0Using GitHub CLI (automated):
# Create release with all binaries
gh release create v0.1.0 \
--title "AI Memoria CLI v0.1.0" \
--notes "Initial release
Features:
- Token-based authentication
- User management
- Status checks
- JSON output support
- Profile support
Installation:
```bash
curl -sSL https://raw.githubusercontent.com/bitcoiners/ai-memoria-cli/main/get.sh | bash
```" \
releases/v0.1.0/*Using GitHub Web Interface (manual):
- Go to: https://github.com/bitcoiners/ai-memoria-cli/releases
- Click "Create a new release"
- Select the tag you created (e.g.,
v0.1.0) - Enter a title: "AI Memoria CLI v0.1.0"
- Add release notes
- Drag and drop all files from
releases/v0.1.0/into the attachments area - Click "Publish release"
Use the included release.sh script to automate the entire process:
# Make the script executable
chmod +x release.sh
# Create release (automates steps 1-4)
./release.sh v0.1.0
# Or use make
make release VERSION=v0.1.0- All tests passing (
make test) - Code is committed and pushed
- Version tag is created and pushed
- Binaries are built for all platforms
- Checksums are generated
- Release notes are written
- Release is published on GitHub
- Installation instructions are tested
Follow Semantic Versioning:
- MAJOR version (v1.0.0): Incompatible API changes
- MINOR version (v0.1.0): Backward-compatible functionality
- PATCH version (v0.1.1): Backward-compatible bug fixes
Make sure ~/.local/bin is in your PATH. Add this to your ~/.bashrc or ~/.zshrc:
export PATH="$PATH:$HOME/.local/bin"Then reload your shell:
source ~/.bashrc # or source ~/.zshrcThe CLI stores configuration in ~/.ai-memoria/config.json
AI_MEMORIA_API_KEY- API key for authenticationAI_MEMORIA_API_URL- API base URL (default: http://localhost:3000)AI_MEMORIA_PROFILE- Configuration profile (development/production)
# Login
mem auth login --email user@example.com --password secret
# Show current user
mem auth whoami
# Logout
mem auth logout# Create a new user (public signup)
mem users create --email new@example.com --username newuser --name "New User" --password secret# Check API health
mem statusUse --json flag for machine-readable output:
mem --json auth whoamiSwitch between development and production:
# Use production profile
mem --profile production auth whoami
# Or set environment variable
export AI_MEMORIA_PROFILE=production
mem auth whoami# Build
make build
# Run tests
make test
# Run unit tests only
make test-unit
# Run integration tests only
make test-integration
# Install locally
make install
# Uninstall
make uninstall
# Build for all platforms
make build-all
# Create release package
make release VERSION=v1.0.0
# Clean build artifacts
make clean
# Run with coverage
make coverage.
├── bin/ # Compiled binaries
├── cmd/ # Command implementations
│ ├── auth/ # Authentication commands
│ ├── users/ # User management commands
│ └── status/ # Status command
├── internal/ # Internal packages
│ ├── api/ # API client
│ ├── config/ # Configuration management
│ ├── models/ # Data models
│ └── utils/ # Utility functions
├── tests/ # Test files
│ ├── integration/ # Integration tests
│ └── mock/ # Mock server for testing
├── releases/ # Release packages
├── Makefile # Build automation
├── go.mod # Go module definition
├── main.go # Entry point
├── install.sh # Binary installer (for source builds)
├── get.sh # One-liner installer
├── release.sh # GitHub release automation
├── CHANGELOG.md # Version history
└── README.md # This file
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests:
make test - Commit and push
- Create a pull request
To completely remove AI Memoria CLI:
# If you have the CLI installed
mem uninstall
# Or manually remove
rm -f ~/.local/bin/mem
rm -rf ~/.ai-memoriaMIT
make test-unitIntegration tests require a running Rails API server at http://localhost:3000.
First, start the Rails API:
cd ../api
rails serverThen run the integration tests:
make test-integrationmake testmake coverage