A command-line interface for Argo Workflows
Project description
Argo CLI
A command-line interface for interacting with Argo.
This project uses UV for dependency management.
Installation
pip install argocli
Authentication
On first-run, you'll be prompted for an Argo API token. This will be stored in your system credential store (e.g. Keychain on Mac OS) in an item called argocli.
Configuration
On first-run, a configuration file will be generated at ~/.config/argocli/config.yaml. In this file you'll need to replace the values of server, namespace, and username with appropriate values.
server: https://your-argo-instance.server.tld
namespace: YOUR_PROJECT_NAMESPACE
username: your.email@example.com
Environment Variables
You can also override configuration values using environment variables. The naming pattern is:
ARGOCLI_<UPPERCASE_CONFIG_KEY>
For example:
ARGOCLI_SERVERoverrides theserverconfig optionARGOCLI_NAMESPACEoverrides thenamespaceconfig optionARGOCLI_USERNAMEoverrides theusernameconfig option
This is useful for CI/CD pipelines or for switching between different Argo instances without modifying the config file.
Usage
The Argo CLI follows a command-action pattern for all operations:
argocli <command> <action> [options]
Available Commands
| Command | Action | Description |
|---|---|---|
| workflow | status | Show the status of a specific workflow |
| workflow | list | List all workflows with optional name filtering |
| workflow | view | View detailed information about a specific workflow |
Global Options
--verbose: Enable debug output--output [table|json]: Control output format (default: table)--help: Show command help
Examples
Workflow Commands
Show the status of a workflow:
argocli workflow status -n WORKFLOW_NAME
List all workflows:
argocli workflow list
Filter workflows by name (fuzzy match):
argocli workflow list -n cron
List workflows with JSON output:
argocli workflow list --output json
View detailed information about a specific workflow:
argocli workflow view -n WORKFLOW_NAME
View workflow information in JSON format (this will dump the entire workflow object, which is useful for further API work):
argocli workflow view -n WORKFLOW_NAME --output json
Development
Setup Development Environment
# Install dependencies including dev dependencies
uv sync
# Activate the venv
source .venv/bin/activate
# Run tests
uv run pytest
# Run tests with coverage report
uv run pytest --cov=argocli --cov-report=term
Testing
The project uses pytest for unit testing. Tests are organized in a structure that mirrors the main codebase:
tests/unit/- Unit testscommands/- Tests for command implementationsworkflow/- Tests for workflow-related commands
core/- Tests for core functionality
To run specific tests:
# Run tests in a specific file
pytest tests/unit/core/test_client.py
# Run a specific test class
pytest tests/unit/commands/workflow/test_list.py::TestWorkflowList
# Run a specific test method
pytest tests/unit/commands/workflow/test_list.py::TestWorkflowList::test_execute_filtered_list
Project Structure
argocli/commands/- Command implementationsworkflow/- Workflow-related commands
argocli/cli/- CLI entry point and argument parsingtests/- Test directory
Adding New Commands
- Create a new action module in the appropriate command directory.
- Define a class that inherits from the command's base class.
- Implement
define_arguments()andexecute()methods.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file argocli-0.4.0.tar.gz.
File metadata
- Download URL: argocli-0.4.0.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f13a5b5d2f09dd98c95b7924e5f28e2cd14394a6757d251d0597017e23b19902
|
|
| MD5 |
9ad008e034853b4b51792276700819c9
|
|
| BLAKE2b-256 |
f5b0b0e50d33611966c555ff5bdbfad1eeb2d2d59e117d2d078d3af6d166b944
|
Provenance
The following attestation bundles were made for argocli-0.4.0.tar.gz:
Publisher:
create_artifacts_and_publish.yaml on rpunt/argocli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
argocli-0.4.0.tar.gz -
Subject digest:
f13a5b5d2f09dd98c95b7924e5f28e2cd14394a6757d251d0597017e23b19902 - Sigstore transparency entry: 306026347
- Sigstore integration time:
-
Permalink:
rpunt/argocli@9f341a63082d6cb124a51e7651a195667aca23dc -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/rpunt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_artifacts_and_publish.yaml@9f341a63082d6cb124a51e7651a195667aca23dc -
Trigger Event:
push
-
Statement type:
File details
Details for the file argocli-0.4.0-py3-none-any.whl.
File metadata
- Download URL: argocli-0.4.0-py3-none-any.whl
- Upload date:
- Size: 15.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11c8d926b4e69ed69dc2f3391b83561a35cf23c60bf148e618d763ace579c3a2
|
|
| MD5 |
ed02f0b041c6a27788e4b55085a8fb69
|
|
| BLAKE2b-256 |
cc6e06f462746cabcc120d52fad40ef17977484ff8fd8892420f8b17a9ab2777
|
Provenance
The following attestation bundles were made for argocli-0.4.0-py3-none-any.whl:
Publisher:
create_artifacts_and_publish.yaml on rpunt/argocli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
argocli-0.4.0-py3-none-any.whl -
Subject digest:
11c8d926b4e69ed69dc2f3391b83561a35cf23c60bf148e618d763ace579c3a2 - Sigstore transparency entry: 306026354
- Sigstore integration time:
-
Permalink:
rpunt/argocli@9f341a63082d6cb124a51e7651a195667aca23dc -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/rpunt
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
create_artifacts_and_publish.yaml@9f341a63082d6cb124a51e7651a195667aca23dc -
Trigger Event:
push
-
Statement type: