CodeArtsRepo.CLI
0.1.1
dotnet tool install --global CodeArtsRepo.CLI --version 0.1.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local CodeArtsRepo.CLI --version 0.1.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=CodeArtsRepo.CLI&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package CodeArtsRepo.CLI --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
CodeArts Repo CLI
A command-line tool for managing Huawei Cloud CodeArts Repo service, built on the official HuaweiCloud.SDK.CodeArtsRepo SDK.
Features
- Repository management: create, delete, list, statistics, status
- Branch management: list, create, protect, unprotect
- Tag management: list, create, protect
- Commit management: list by branch, statistics, code line changes
- File operations: get file content (base64 decoded)
- Member management: list, add, remove
- WebHook management: list, create, delete
- Deploy key management: add, remove
- SSH key verification: test private key pull access
- Multi-format output: table (default), JSON, YAML
- Configuration: multi-profile YAML config with environment variable fallback
Installation
macOS / Linux
curl -fsSL https://raw.githubusercontent.com/Mingor/CodeArtsCli/main/scripts/install.sh | bash
From source
git clone https://github.com/Mingor/CodeArtsCli.git
cd CodeArtsCli
dotnet build -c Release
dotnet run --project src/CodeArtsRepo.CLI -- --help
Quick Start
# Configure credentials
codearts-repo config set ak YOUR_ACCESS_KEY
codearts-repo config set sk YOUR_SECRET_KEY
codearts-repo config set region cn-north-4
# List all repositories
codearts-repo repo list
# Create a repository
codearts-repo repo create <project-uuid> my-new-repo --visibility private
# List branches
codearts-repo branch list <repo-id>
# Create a WebHook
codearts-repo webhook create <group-name> <repo-name> https://example.com/hook --events push,merge_requests
Commands
| Command | Description |
|---|---|
config |
Manage configuration (set/get/list) |
repo |
Repository management |
branch |
Branch management |
tag |
Tag management |
commit |
Commit management |
file |
Repository file operations |
member |
Repository member management |
webhook |
WebHook management |
deploy-key |
Deploy key management |
ssh-key |
SSH key verification |
Use --help on any command for detailed usage.
Configuration
Configuration is stored in ~/.codearts/config (YAML format).
Supported config keys
| Key | Description | Environment Variable |
|---|---|---|
ak / access-key |
Access Key | HUAWEICLOUD_SDK_AK |
sk / secret-key |
Secret Key | HUAWEICLOUD_SDK_SK |
region |
Huawei Cloud region | HUAWEICLOUD_REGION |
endpoint |
Custom endpoint | HUAWEICLOUD_ENDPOINT |
project-id |
Default project ID |
Multiple profiles
codearts-repo config set ak prod-ak --profile prod
codearts-repo config set sk prod-sk --profile prod
codearts-repo repo list --profile prod
Output formats
# Table (default, human-readable)
codearts-repo repo list
# JSON (machine-readable, camelCase)
codearts-repo repo list --format json
# YAML
codearts-repo repo list --format yaml
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Parameter error |
| 3 | Configuration error |
| 4 | Resource not found |
| 5 | Permission denied |
| 6 | Network error |
| 7 | Resource conflict |
Development
# Build
dotnet build
# Run tests
dotnet test
# Publish self-contained
dotnet publish src/CodeArtsRepo.CLI/CodeArtsRepo.CLI.csproj -c Release -r osx-arm64 --self-contained true
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.