Interact with Canonical's Launchpad platform via the Launchpad API (api.launchpad.net) using the lp-api CLI tool...
This skill enables interaction with Canonical's Launchpad platform (https://launchpad.net) through direct API calls using the lp-api command-line tool. It provides full CRUD capabilities (Create, Read, Update, Delete) for querying and managing bugs, people, projects, builds, and other Launchpad resources via the official API at https://api.launchpad.net/devel.html.
API-First Approach: This skill focuses on direct API interaction using lp-api, not the web UI or Python launchpadlib. All operations are performed via HTTP requests to api.launchpad.net.
Important Note: All lp-api commands return JSON responses except using with ws.show==total_size, or using download and pipe subcommands. Parse these outputs to extract meaningful information.
If lp-api is not found, use the GitHub API to find and download the correct binary for your system.
1. Find download URL:
# Get the browser_download_url for your OS (linux/darwin/windows) and Architecture (amd64/arm64)
# Example for Linux AMD64:
curl -s https://api.github.com/repos/fourdollars/lp-api/releases | \
jq -r '.[0].assets[] | select(.name | endswith("linux-amd64.tar.gz")) | .browser_download_url'
2. Download and Install:
curl -L -o lp-api.tar.gz <URL>
tar -xzf lp-api.tar.gz
chmod +x lp-api
mkdir -p bin
mv lp-api bin/
export PATH=$PWD/bin:$PATH
The tool handles OAuth authentication automatically:
Environment Variable (preferred for CI/CD):
export LAUNCHPAD_TOKEN="oauth_token:oauth_secret:consumer_key"
Config File (for interactive use):
.lp-api.toml in the current directory (recommended)-conf .lp-api.toml to specify the locationRefer to the documentation in references/ for detailed usage, patterns, and workflows:
It shall check '
To find bugs you're involved with across all projects and distributions, use searchTasks on the person resource:
# Get your person link
ME_LINK=$(lp-api get people/+me | jq -r '.self_link')
# All bugs assigned to you (across all projects)
lp-api get people/+me ws.op==searchTasks assignee==$ME_LINK
# Filter by status
lp-api get people/+me ws.op==searchTasks assignee==$ME_LINK status=="In Progress"
# Bugs you reported, subscribed to, or have activity on
lp-api get people/+me ws.op==searchTasks bug_reporter==$ME_LINK
lp-api get people/+me ws.op==searchTasks bug_subscriber==$ME_LINK
lp-api get people/+me ws.op==searchTasks bug_commenter==$ME_LINK # includes any activity
lp-api get people/+me ws.op==searchTasks affected_user==$ME_LINK
Note: bug_commenter includes any bug activity (comments, status changes, field updates), not just message comments.
This is equivalent to the web UI at https://launchpad.net/~username/+assignedbugs.