xapi-cli/Makefile
Soldier 94635e7ace feat: MVP release - OAuth 1.0a CLI for X API
Complete CLI tool with 4 core commands:
- xapi login: Configure OAuth credentials via editor
- xapi status: Test authentication
- xapi search: Search tweets with preview/execute modes
- xapi create: Post tweets with preview/execute modes

Features:
- OAuth 1.0a authentication with HMAC-SHA1 signing
- OAuth 2.0 Client ID/Secret support (for future features)
- TOML-based configuration
- Editor integration for config management
- Helpful error messages for permission issues
- Quota-aware design (no caching to avoid complexity)

Built for developers on Free/Basic X API tiers.
2025-11-13 21:46:18 +00:00

38 lines
822 B
Makefile

# Makefile for xapi-cli
VERSION := 0.1.0
BINARY := xapi
INSTALL_PATH := /usr/local/bin
.PHONY: build install uninstall clean
build:
go build -o $(BINARY) .
install: build
@echo "Installing $(BINARY) to $(INSTALL_PATH)..."
@sudo cp $(BINARY) $(INSTALL_PATH)/
@sudo chmod 755 $(INSTALL_PATH)/$(BINARY)
@echo "Installed! Run 'xapi --help' to get started."
install-user: build
@echo "Installing $(BINARY) to ~/.local/bin..."
@mkdir -p ~/.local/bin
@cp $(BINARY) ~/.local/bin/
@chmod 755 ~/.local/bin/$(BINARY)
@echo "Installed for current user!"
@echo "Make sure ~/.local/bin is in your PATH"
uninstall:
@echo "Removing $(BINARY) from $(INSTALL_PATH)..."
@sudo rm -f $(INSTALL_PATH)/$(BINARY)
@echo "Uninstalled!"
clean:
rm -f $(BINARY)
# Development helpers
run: build
./$(BINARY)
test:
go test ./...