$npx -y skills add opendatahub-io/ai-helpers --skill acli-setup-checkVerify acli installation and authentication. Checks if acli is installed, authenticated to Jira, and can query projects. Use when troubleshooting acli issues or setting up acli for the first time.
| 1 | # ACLi Setup Check |
| 2 | |
| 3 | Verify that the `acli` CLI tool is installed, authenticated, and can access Jira. |
| 4 | |
| 5 | ## Implementation |
| 6 | |
| 7 | ### Step 1: Check if acli is Installed |
| 8 | |
| 9 | Run the following command to check if `acli` is available: |
| 10 | |
| 11 | ```bash |
| 12 | which acli |
| 13 | ``` |
| 14 | |
| 15 | If the command returns a path (e.g., `/usr/local/bin/acli`), proceed to Step 2. |
| 16 | |
| 17 | If the command returns nothing or "not found": |
| 18 | |
| 19 | 1. Inform the user that acli is not installed |
| 20 | 2. Provide installation instructions: |
| 21 | ```text |
| 22 | acli is not installed. Please install it from: |
| 23 | https://developer.atlassian.com/cloud/acli/guides/install-acli/ |
| 24 | |
| 25 | After installation, run: |
| 26 | acli jira auth |
| 27 | ``` |
| 28 | 3. Stop execution |
| 29 | |
| 30 | ### Step 2: Test Authentication |
| 31 | |
| 32 | Test if acli is authenticated by checking the authentication status: |
| 33 | |
| 34 | ```bash |
| 35 | acli jira auth status 2>&1 |
| 36 | ``` |
| 37 | |
| 38 | This command checks if acli is authenticated and can reach the Jira server without |
| 39 | requiring access to specific projects. |
| 40 | |
| 41 | Analyze the output: |
| 42 | |
| 43 | - **Success**: If the command shows "✓ Authenticated" along with site and email details, authentication is working. Proceed to Step 3. |
| 44 | - **Authentication Error**: If the output indicates no authentication or invalid credentials: |
| 45 | 1. Inform the user that authentication has failed |
| 46 | 2. Guide them to run: |
| 47 | ```text |
| 48 | acli jira auth |
| 49 | ``` |
| 50 | 3. Explain they'll need their Jira API token from https://id.atlassian.com/manage-profile/security/api-tokens |
| 51 | 4. Stop execution |
| 52 | |
| 53 | ### Step 3: Report Success |
| 54 | |
| 55 | If authentication is successful, report success to the user: |
| 56 | |
| 57 | ```text |
| 58 | ✓ acli is installed and authenticated |
| 59 | ✓ Connected to: https://redhat.atlassian.net |
| 60 | |
| 61 | You're ready to use acli-based Jira skills! |
| 62 | ``` |
| 63 | |
| 64 | ## Error Handling |
| 65 | |
| 66 | - **acli not found**: Provide installation instructions and stop |
| 67 | - **Authentication failure**: Guide user to run `acli jira auth` and stop |
| 68 | - **Network errors**: Report the error and suggest checking network connectivity |
| 69 | - **Permission denied**: Inform user they may not have access to the queried projects |
| 70 | |
| 71 | ## Examples |
| 72 | |
| 73 | ### Successful Setup Check |
| 74 | |
| 75 | ```text |
| 76 | User: /acli-setup-check |
| 77 | Assistant: |
| 78 | ✓ acli is installed at /usr/local/bin/acli |
| 79 | ✓ Connected to: https://redhat.atlassian.net |
| 80 | |
| 81 | You're ready to use acli-based Jira skills! |
| 82 | ``` |