Command line instrument for managing Artipie server
artipie / artipie-cli Goto Github PK
View Code? Open in Web Editor NEWCommand line instrument for managing Artipie server
License: MIT License
Command line instrument for managing Artipie server
License: MIT License
Add get repository
command to list all repositories (in optional organization) where current user has access:
artictl get repository
- works in a "flat" modearticlt get repository orgname
- for "org" modeThe output could include these fields: name, type, user access mode, e.g.
NAME | TYPE | ACCESS
my-registry | docker | RW
mvn | maven | R
js | npm | RW
API documentation is here: https://github.com/artipie/maven-adapter/
Ticket: #2
Add update repository
command to apply new changes to repository or create new one.
This command takes mandatory --file
or -f
parameter with repository config, see: https://github.com/artipie/artipie/wiki/Configuration-Repository. And it takes mandatory repository key (it's just repository name for flat
layout, e.g. mydocker
; or org+name for org
layout, e.g. artipie/mydocker
).
API docs: https://github.com/artipie/maven-adapter/
Ticket: #2
Artipie CLI should parse configuration file and same global configuration options.
The file could be checked in order $HOME/.config/artictl/config.yaml
, /etc/artictl/config.yaml
. File should contain different context sections (for different servers), and ID of current context. Each context should have mandatory endpoint URI and authentication options. Endpoint is just a URI string, authentication options could be different, it's either user+password or auth token.
Example:
currentContext: "default"
contexts:
default:
auth:
token: "123456"
endpoint: https:/central.artipie.com
myLocal:
auth:
username: test
password: qwerty
endpoint: http://artipie.local/artipie
CLI uses currentContext
but can choose another one: articl --context=myLocal get repo
The same parameters could be provided as global options for CLI:
endpoint
for endpoint URIauth-user
user for authauth-password
password for authauth-token
token for authCLI options has higher priority that config file options and CLI should use options on conflict.
auth-user
and auth-password
should be used only together.
It should be not possible to use auth-token
with auth-user
or auth-password
.
Examples:
artictl --endpoint=https://central.artipie.com get repo
artictl --auth-token=12345 get repo
artictl --auth-user=test --auth-password=qwerty get repo
Solution for #1 meta proposal.
Let's implement a CLI for Artipie with required commands to manage Artipie resources, such as repositories, users, permissions, storages.
Each resource type initially support these commands (but may support some additional commands too):
get
- to show information about resource or list resourcesupdate
- to create or update resource configurationdelete
- delete resourceInitial resource to be supported:
Current scope of work:
Artipie API reference: https://github.com/artipie/management-api/blob/master/REST_API.md
For now, there is no way for a user to troubleshoot a common problems he faces by himself. Artipie should definitely have it. A command-line utility, plugins for various IDEs and text editors, direct feedback in the logs would improve it.
CLI should send API requests to endpoint from configuration, and use authentication options from configuration.
Endpoint should be base URI of each API request.
Auth options should generate valid header for request, e.g. user and password should create valid HTTP basic auth: https://datatracker.ietf.org/doc/html/rfc7617
Depends-on: #5
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.