-
Notifications
You must be signed in to change notification settings - Fork 76
π€ 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
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
7e4e6ef
feat: add comprehensive AI agent friendly CLI support
niechen 2d8b46a
refactor: simplify CLI help text to remove redundant information
niechen eb40511
fix: resolve linting errors and test failures after AI-agent CLI updates
niechen bce8619
test: add comprehensive non-interactive tests for AI-agent CLI commands
niechen 988c9a6
Merge branch 'main' into feature/ai-agent-friendly-cli
niechen 805473f
fix: resolve test failures in edit and client commands
niechen 10345a9
fix: resolve mypy errors and remove duplicate function
niechen 38d6f36
fix: resolve all remaining profile command test failures
niechen 6b149a3
fix: add missing mock for client edit test failing in CI
niechen 5ecd958
test: add assertion for remove_server method call in client edit test
niechen 7025771
test: add assertion for add_server method call in client edit test
niechen d55bd3f
Update tests/test_edit.py
JoJoJoJoJoJoJo b5112b9
test: add assertion for remove_server in set servers test
niechen 88f3d53
fix: update GitHub Actions to latest versions and add security permisβ¦
niechen 8c9fe60
fix: pass force parameter to add_server to enable proper server overwβ¦
niechen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
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 | ||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
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@v7 | ||
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 |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.