-
Notifications
You must be signed in to change notification settings - Fork 70
π€ Add Comprehensive AI Agent Friendly CLI Support #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
7e4e6ef
2d8b46a
eb40511
bce8619
988c9a6
805473f
10345a9
38d6f36
6b149a3
5ecd958
7025771
d55bd3f
b5112b9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,90 @@ | ||||||||||||||||||||||||||||||||
name: Generate LLM.txt | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
on: | ||||||||||||||||||||||||||||||||
# Trigger on releases | ||||||||||||||||||||||||||||||||
release: | ||||||||||||||||||||||||||||||||
types: [published] | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
# Trigger on pushes to main branch | ||||||||||||||||||||||||||||||||
push: | ||||||||||||||||||||||||||||||||
branches: [main] | ||||||||||||||||||||||||||||||||
paths: | ||||||||||||||||||||||||||||||||
- 'src/mcpm/commands/**' | ||||||||||||||||||||||||||||||||
- 'src/mcpm/cli.py' | ||||||||||||||||||||||||||||||||
- 'scripts/generate_llm_txt.py' | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
# Allow manual trigger | ||||||||||||||||||||||||||||||||
workflow_dispatch: | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
jobs: | ||||||||||||||||||||||||||||||||
generate-llm-txt: | ||||||||||||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
steps: | ||||||||||||||||||||||||||||||||
- name: Checkout code | ||||||||||||||||||||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||
token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||
fetch-depth: 0 | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Set up Python | ||||||||||||||||||||||||||||||||
uses: actions/setup-python@v4 | ||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update GitHub Actions to latest versions. The static analysis indicates these actions are outdated. Update to the latest versions for better security and compatibility. - uses: actions/setup-python@v4
+ uses: actions/setup-python@v5 - uses: peter-evans/create-pull-request@v5
+ uses: peter-evans/create-pull-request@v6 Also applies to: 66-66 π§° Toolsπͺ actionlint (1.7.7)31-31: the runner of "actions/setup-python@v4" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) π€ Prompt for AI Agents
|
||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||
python-version: '3.11' | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Install dependencies | ||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||
python -m pip install --upgrade pip | ||||||||||||||||||||||||||||||||
pip install -e . | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Generate llm.txt | ||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||
python scripts/generate_llm_txt.py | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Check for changes | ||||||||||||||||||||||||||||||||
id: check_changes | ||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||
if git diff --quiet llm.txt; then | ||||||||||||||||||||||||||||||||
echo "no_changes=true" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||
else | ||||||||||||||||||||||||||||||||
echo "no_changes=false" >> $GITHUB_OUTPUT | ||||||||||||||||||||||||||||||||
fi | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Commit and push changes | ||||||||||||||||||||||||||||||||
if: steps.check_changes.outputs.no_changes == 'false' | ||||||||||||||||||||||||||||||||
run: | | ||||||||||||||||||||||||||||||||
git config --local user.email "[email protected]" | ||||||||||||||||||||||||||||||||
git config --local user.name "GitHub Action" | ||||||||||||||||||||||||||||||||
git add llm.txt | ||||||||||||||||||||||||||||||||
git commit -m "docs: update llm.txt for AI agents [skip ci]" | ||||||||||||||||||||||||||||||||
git push | ||||||||||||||||||||||||||||||||
env: | ||||||||||||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
- name: Create Pull Request (for releases) | ||||||||||||||||||||||||||||||||
if: github.event_name == 'release' && steps.check_changes.outputs.no_changes == 'false' | ||||||||||||||||||||||||||||||||
uses: peter-evans/create-pull-request@v5 | ||||||||||||||||||||||||||||||||
with: | ||||||||||||||||||||||||||||||||
token: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||||||||||||
commit-message: "docs: update llm.txt for release ${{ github.event.release.tag_name }}" | ||||||||||||||||||||||||||||||||
title: "π Update llm.txt for AI agents (Release ${{ github.event.release.tag_name }})" | ||||||||||||||||||||||||||||||||
body: | | ||||||||||||||||||||||||||||||||
## π€ Automated llm.txt Update | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
This PR automatically updates the llm.txt file for AI agents following the release of version ${{ github.event.release.tag_name }}. | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### Changes | ||||||||||||||||||||||||||||||||
- Updated command documentation | ||||||||||||||||||||||||||||||||
- Refreshed examples and usage patterns | ||||||||||||||||||||||||||||||||
- Updated version information | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
### What is llm.txt? | ||||||||||||||||||||||||||||||||
llm.txt is a comprehensive guide for AI agents to understand how to interact with MCPM programmatically. It includes: | ||||||||||||||||||||||||||||||||
- All CLI commands with parameters and examples | ||||||||||||||||||||||||||||||||
- Environment variables for automation | ||||||||||||||||||||||||||||||||
- Best practices for AI agent integration | ||||||||||||||||||||||||||||||||
- Error handling and troubleshooting | ||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
This file is automatically generated from the CLI structure using `scripts/generate_llm_txt.py`. | ||||||||||||||||||||||||||||||||
branch: update-llm-txt-${{ github.event.release.tag_name }} | ||||||||||||||||||||||||||||||||
delete-branch: true | ||||||||||||||||||||||||||||||||
Comment on lines
+21
to
+90
Check warningCode scanning / CodeQL Workflow does not contain permissions Medium
Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
Copilot AutofixAI 9 days ago To fix the problem, you should explicitly specify a The minimal permissions required for this workflow include:
Therefore, at the top of the file (below permissions:
contents: write
pull-requests: write No other sections, imports, or definitions are required.
Suggested changeset
1
.github/workflows/generate-llm-txt.yml
Copilot is powered by AI and may make mistakes. Always verify output.
Positive FeedbackNegative Feedback
Refresh and try again.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add explicit permissions block for security.
Add minimal required permissions for the workflow to follow security best practices.
π Committable suggestion
π§° Tools
πͺ YAMLlint (1.37.1)
[error] 22-22: trailing spaces
(trailing-spaces)
π€ Prompt for AI Agents