README.md in aptly_cli-0.1.5 vs README.md in aptly_cli-0.1.6

- old
+ new

@@ -1,12 +1,13 @@ # AptlyCli [![Build Status](https://travis-ci.org/sepulworld/aptly_cli.svg)](https://travis-ci.org/sepulworld/aptly_cli) [![Gem Version](https://badge.fury.io/rb/aptly_cli.svg)](http://badge.fury.io/rb/aptly_cli) -A command line interace to execute Aptly commands againts remote Aptly API servers. Aptly-cli will allow you to interact with the file, repo, snapshot, publish, packages, graph and version API endpoints of your Aptly server. +A command line interace to execute [Aptly](http://aptly.info) commands againts remote Aptly API servers. Aptly-cli will allow you to interact with the file, repo, snapshot, publish, packages, graph and version API endpoints of your Aptly server. + ## Installation Add this line to your application's Gemfile: $ ruby gem 'aptly_cli' @@ -18,554 +19,50 @@ Or install it yourself as: $ gem install aptly_cli -Create a configuration file with aptly server and port, /etc/aptly-cli.conf: +Create a configuration file with aptly server and port, /etc/aptly-cli.conf (YAML syntax): --- :server: 127.0.0.1 :port: 8082 If a configuration file is not found the defaults in the example configuration file above will be used -## Usage +## Usage - available aptly-cli commands -### aptly-cli version + aptly-cli --help - NAME: - - version - - SYNOPSIS: - - aptly-cli version - - DESCRIPTION: - - Display aptly server version - - EXAMPLES: - - # description - aptly-cli version - - -### aptly-cli file_list [options] - - NAME: - - file_list - - SYNOPSIS: - - aptly-cli file_list [options] - - DESCRIPTION: - -List all directories that contain uploaded files - - EXAMPLES: - - # List all directories for file uploads - aptly-cli file_list - # List all files in redis directory - aptly-cli file_list --directory redis - - OPTIONS: - - --directory DIRECTORY - Directory to list on server - -### aptly-cli file_upload [options] - - NAME: - - file_upload - - SYNOPSIS: - - aptly-cli file_upload [options] - - DESCRIPTION: - - File upload - - EXAMPLES: - - # upload file package.deb to apt server inside directory /aptlyserver_directory/ - aptly-cli file_upload --upload /local/copy/of/package.deb --directory /aptlyserver_directory/ - - OPTIONS: - - --directory DIRECTORY - Directory to load packages into - - --upload UPLOAD - Package(s) to upload - -### aptly-cli file_delete [options] - - NAME: - - file_delete - - SYNOPSIS: - - aptly-cli file_delete [options] - - DESCRIPTION: - - File delete - - EXAMPLES: - - # Delete package redis-server found in redis upload directory - aptly-cli file_delete --target /redis/redis-server_2.8.3_i386-cc1.deb - - OPTIONS: - - --target TARGET - Path to directory or specific package to delete - -### aptly-cli repo_create [options] - - NAME: - - repo_create - - SYNOPSIS: - - aptly-cli repo_create [options] - - DESCRIPTION: - - Create a new repository, requires --name + file_delete Deletes all files in upload directory and directory itself. Or delete just a file + file_list List all directories that contain uploaded files + file_upload Parameter --directory is upload directory name. Directory would be created if it doesn’t exist. + graph Download a graph of repository layout. Current options are "svg" and "png" + help Display global or [command] help documentation + publish_drop Delete published repository, clean up files in published directory. + publish_list List published repositories. + publish_repo Publish local repository or snapshot under specified prefix. Storage might be passed in prefix as well, e.g. s3:packages/. To supply empty prefix, just remove last part (POST /api/publish/:prefix/<:repos>or<:snapshots> + publish_update Update published repository. If local repository has been published, published repository would be updated to match local repository contents. If snapshots have been been published, it is possible to switch each component to new snapshot + repo_create Create a new repository, requires --name + repo_delete Delete a local repository, requires --name + repo_edit Edit a local repository metadata, requires --name + repo_list Show list of currently available local repositories + repo_package_query List all packages in local repository or perform search on repository contents and return result., requires --name + repo_show Returns basic information about local repository + repo_upload Import packages from files (uploaded using File Upload API) to the local repository. If directory specified, aptly would discover package files automatically.Adding same package to local repository is not an error. By default aptly would try to remove every successfully processed file and directory :dir (if it becomes empty after import). + snapshot_create Create snapshot of current local repository :name contents as new snapshot with name :snapname + snapshot_delete Delete snapshot. Snapshot can’t be deleted if it is published. aptly would refuse to delete snapshot if it has been used as source to create other snapshots, but that could be overridden with force parameter + snapshot_diff Calculate difference between two snapshots --name (left) and --withsnapshot (right). + snapshot_list Return list of all snapshots created in the system + snapshot_search List all packages in snapshot or perform search on snapshot contents and return result + snapshot_show Get information about snapshot by name + snapshot_update Update snapshot’s description or name + version Display aptly server - EXAMPLES: +### To see more options for each command - # creat repo - aptly-cli repo_create --name megatronsoftware - # creat repo with distribution set to 'trusty' - aptly-cli repo_create --name megatronsoftware --default_distribution trusty + aptly-cli <command> --help - OPTIONS: - - --name NAME - Local repository name, required - - --comment COMMENT - Text describing local repository for the user - - --default_distribution DISTRIBUTION - Default distribution when publishing from this local repo - - - --default_component COMPONENT - Default component when publishing from this local repo - -### aptly-cli repo_delete [options] - - NAME: - - repo_delete - - SYNOPSIS: - - aptly-cli repo_delete [options] - - DESCRIPTION: - - Delete a local repository, requires --name - - EXAMPLES: - - # description - aptly-cli repo_delete --name megatronsoftware - - OPTIONS: - - --name NAME - Local repository name, required - - --force - -### aptly-cli repo_edit [options] - - NAME: - - repo_edit - - SYNOPSIS: - - aptly-cli repo_edit [options] - - DESCRIPTION: - - Edit a local repository metadata, requires --name - - EXAMPLES: - - # description - aptly-cli repo_edit --name megatronsoftware --default_distribution trusty - - OPTIONS: - - --name NAME - Local repository name, required - - --comment COMMENT - Edit repository comment - - --default_distribution DISTRIBUTION - Edit DefaultDistribution for repo - - --default_component COMPONENT - Edit DefaultComponent for repo - -### aptly-cli repo_list [options] - - NAME: - - repo_list - - SYNOPSIS: - - aptly-cli repo_list [options] - - DESCRIPTION: - - Show list of currently available local repositories - - EXAMPLES: - - # description - aptly-cli repo_list - - -### aptly-cli repo_package_query [options] - - NAME: - - repo_package_query - - SYNOPSIS: - - aptly-cli repo_package_query [options] - - DESCRIPTION: - - List all packages or search on repo contents, requires --name - - EXAMPLES: - - # description - aptly-cli repo_package_query --name megatronsoftware -query geoipupdate - - OPTIONS: - - --name NAME - Local repository name, required - - --query QUERY - Package to query - - --with_deps - Return results with dependencies - - --format FORMAT - Format type to return, compact by default. "details" is an option - -### aptly-cli repo_show [options] - - NAME: - - repo_show - - SYNOPSIS: - - aptly-cli repo_show [options] - - DESCRIPTION: - - Returns basic information about local repository, require --name - - EXAMPLES: - - # description - aptly-cli repo_show --name megatronsoftware - - OPTIONS: - - --name NAME - Local repository name, required - -### aptly-cli repo_upload [options] - - NAME: - - repo_upload - - SYNOPSIS: - - aptly-cli repo_upload [options] - - DESCRIPTION: - - Import packages from files - - EXAMPLES: - - # description - aptly-cli repo_upload --name rocksoftware --dir rockpackages --noremove - - OPTIONS: - - --name NAME - Local repository name, required - - --dir DIR - Directory where packages are stored via File API - - --file FILE - Specific file to upload, if not provided the entire directory of files will be uploaded - - --noremove - Flag to not remove any files that were uploaded via File API after repo upload - - --forcereplace - flag to replace file(s) already in the repo - -### aptly-cli snapshot_create [options] - - NAME: - - snapshot_create - - SYNOPSIS: - - aptly-cli snapshot_create [options] - - DESCRIPTION: - - Create snapshot, require --name - - EXAMPLES: - - # Creating new snapshot megasoftware22-snap from megasoftware22 repo - aptly-cli snapshot_create --name megasoftware22-snap --repo meagsoftware22 - - OPTIONS: - - --name NAME - Name of new snapshot, required - - --repo REPO - Name of repo to snapshot - - --description DESCRIPTION - Set description for snapshot - -### aptly-cli snapshot_delete [options] - - NAME: - - snapshot_delete - - SYNOPSIS: - - aptly-cli snapshot_delete [options] - - DESCRIPTION: - - Delete snapshot, require --name - - EXAMPLES: - - # Deleting the snapshot megasoftware22 - aptly-cli snapshot_delete --name megatronsoftware22 - - # Deleting the snapshot megasoftware22 with force option - aptly-cli snapshot_delete --name megatronsoftware22 --force - - OPTIONS: - - --name NAME - Local snapshot name, required - - --force - Force - -### aptly-cli snapshot_diff [options] - - NAME: - - snapshot_diff - - SYNOPSIS: - - aptly-cli snapshot_diff [options] - - DESCRIPTION: - - Calculate difference between two snapshots, require --name, require --withsnapshot - - EXAMPLES: - - # Show difference between megatronsoftware and rocksoftware snapshots - aptly-cli snapshot_diff --name megatronsoftware --withsnapshot rocksoftware - - OPTIONS: - - --name NAME - Local snapshot name (left) - - --withsnapshot WITHSNAPSHOT - Snapshot to diff against (right) - -### aptly-cli snapshot_list [options] - - NAME: - - snapshot_list - - SYNOPSIS: - - aptly-cli snapshot_list [options] - - DESCRIPTION: - - Return list of all snapshots created in the system - - EXAMPLES: - - # Return list of all snapshots created in the system - aptly-cli snapshot_list - - # Return list sorted by time - aptly-cli snapshot_list --sort time - - OPTIONS: - - --sort - Set sort by - -### aptly-cli snapshot_search [options] - - NAME: - - snapshot_search - - SYNOPSIS: - - aptly-cli snapshot_search [options] - - DESCRIPTION: - - List all packages in snapshot or perform search - - EXAMPLES: - - # List all packages in snapshot megasoftware22-snap - aptly-cli snapshot_search --name megasoftware22-snap - - # List all packages in snapshot megasoftware22-snap with format set to details - aptly-cli snapshot_search --name megasoftware22-snap --format details - - # Search for package called nginx in snapshot megasoftware22-snap - aptly-cli snapshot_search --name megasoftware22-snap --query nginx - - OPTIONS: - - --name NAME - Name of snapshot to search, required - - --query QUERY - Specific package to query - - --withdeps - Include package dependencies - - --format FORMAT - Format the respone of the snapshot search results, compact by default. - -### aptly-cli snapshot_show [options] - - NAME: - - snapshot_show - - SYNOPSIS: - - aptly-cli snapshot_show [options] - - DESCRIPTION: - - Get information about snapshot by name., require --name - - EXAMPLES: - - # Show snapshot information for repo named megatronsoftware - aptly-cli snapshot_show --name megatronsoftware - - OPTIONS: - - --name NAME - Local snapshot name, required - -### aptly-cli snapshot_update [options] - - NAME: - - snapshot_update - - SYNOPSIS: - - aptly-cli snapshot_update [options] - - DESCRIPTION: - - Update snapshot’s description or name, require --name - - EXAMPLES: - - # Updating the snapshot megasoftware22 to a new name - aptly-cli snapshot_update --name megasoftware22 --new_name meagsoftware12-12-13 - - OPTIONS: - - --name NAME - Local snapshot name, required - - --new_name NEWNAME - New name for the snapshot - - --description DESCRIPTION - Update description for snapshot - -### aptly-cli graph [options] - - NAME: - - graph - - SYNOPSIS: - - aptly-cli graph [options] - - DESCRIPTION: - - Download an svg or png graph of repository layout - - EXAMPLES: - - # description - aptly-cli graph png > ~/repo_graph.png - - OPTIONS: - - --type GRAPH_TYPE - Type of graph to download, present options are png or svg ## Development After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.