bit) to create, query, update, delete short links, and view click data.bit create/list/get/update/delete/clicks.https://github.com/ParinLL/bit-cligit clone https://github.com/ParinLL/bit-cli.git
cd bit-cli
go build -o bit .
sudo mv bit /usr/local/bin/
BIT_API_KEY (required): Bit API authentication key.BIT_API_URL (optional): Bit API base URL, default http://localhost:4000.bit executable must be callable from PATH./usr/local/bin with sudo mv requires administrator privileges.bit Binarywhich bit
bit ping
export BIT_API_URL="http://localhost:4000"
export BIT_API_KEY="your-api-key"
bit [arguments] [flags] bit pingbit create bit list [--limit N] [--cursor X]bit get bit update bit delete bit clicks [--limit N] [--cursor X] # 1) Confirm service is reachable
bit ping
# 2) Create a short link
bit create https://example.com/docs
# 3) List links to find the new ID
bit list --limit 20
# 4) Inspect one link
bit get 1
# 5) Check click records
bit clicks 1 --limit 50
# 6) Update destination if needed
bit update 1 https://example.com/new-docs
# 7) Delete when no longer needed
bit delete 1
bit ping whenever requests fail unexpectedly.list/get to confirm IDs before update or delete.BIT_API_KEY in environment variables, not in command history or shared scripts.bit: command not foundgo build and verify which bit returns a valid path.401 Unauthorized / 403 ForbiddenBIT_API_KEY is missing or invalid.BIT_API_KEY and confirm the key is still valid on the server.connection refused / timeoutBIT_API_URL is incorrect, the Bit service is not running, or the network is unreachable.bit ping first, then verify API service status and URL.bit list or bit get , then retry.共 1 个版本