Add pygisceclient CLI for scripting and AI agent use#27
Open
Add pygisceclient CLI for scripting and AI agent use#27
pygisceclient CLI for scripting and AI agent use#27Conversation
Open
Agent-Logs-Url: https://github.com/gisce/py-gisce-client/sessions/4db6edc5-ddfb-4827-85c2-a757ffb9fbe7 Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add command line util for ai agents skills
Add Apr 3, 2026
pygisceclient CLI for scripting and AI agent use
Member
|
@copilot arregla els tests per python2 |
Agent-Logs-Url: https://github.com/gisce/py-gisce-client/sessions/e83dad12-4a4c-44ef-8eec-7c38abe224d6 Co-authored-by: ecarreras <294235+ecarreras@users.noreply.github.com>
Contributor
Author
... Fixed in a6b8129. Changed the mock import to use the same Python 2/3 compatible pattern as the existing tests: try:
from unittest.mock import patch, MagicMock
except ImportError:
from mock import patch, MagicMockAlso added |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds a command-line interface to the package so ERP methods can be called from shell scripts and AI agent skills without writing Python.
Changes
gisce/cli.py— argparse-based CLI; connects via the existingconnect()function, calls a model method, and prints the result as JSON to stdout. Errors go to stderr with a non-zero exit code.setup.py— registerspygisceclientas aconsole_scriptsentry point.tests/test_cli.py— 18 tests covering argument parsing, auth variants, JSON validation, error paths, and successful calls.README.md— CLI usage section with options table and examples.Usage
Result is printed as indented JSON to stdout, making it straightforward to pipe into
jqor consume in agent tool calls.