{"id":13647586,"url":"https://github.com/sepulworld/aptly_cli","last_synced_at":"2025-07-31T17:05:35.289Z","repository":{"id":27912062,"uuid":"31403969","full_name":"sepulworld/aptly_cli","owner":"sepulworld","description":"Aptly client","archived":false,"fork":false,"pushed_at":"2022-03-08T01:02:36.000Z","size":411,"stargazers_count":43,"open_issues_count":2,"forks_count":14,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-27T10:26:13.203Z","etag":null,"topics":["aptly","aptly-server","docker","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sepulworld.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-27T04:49:13.000Z","updated_at":"2024-11-30T14:14:57.000Z","dependencies_parsed_at":"2022-07-24T15:32:02.039Z","dependency_job_id":null,"html_url":"https://github.com/sepulworld/aptly_cli","commit_stats":null,"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/sepulworld/aptly_cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepulworld%2Faptly_cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepulworld%2Faptly_cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepulworld%2Faptly_cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepulworld%2Faptly_cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sepulworld","download_url":"https://codeload.github.com/sepulworld/aptly_cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sepulworld%2Faptly_cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267512873,"owners_count":24099626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-28T02:00:09.689Z","response_time":68,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aptly","aptly-server","docker","ruby"],"created_at":"2024-08-02T01:03:39.738Z","updated_at":"2025-07-31T17:05:35.267Z","avatar_url":"https://github.com/sepulworld.png","language":"Ruby","funding_links":[],"categories":["Ruby"],"sub_categories":[],"readme":"# AptlyCli\n\n[![Build Status](https://travis-ci.org/sepulworld/aptly_cli.svg)](https://travis-ci.org/sepulworld/aptly_cli)\n[![Gem Version](https://badge.fury.io/rb/aptly_cli.svg)](http://badge.fury.io/rb/aptly_cli)\n[![Coverage Status](https://coveralls.io/repos/github/sepulworld/aptly_cli/badge.svg?branch=master)](https://coveralls.io/github/sepulworld/aptly_cli?branch=master)\n[![](https://images.microbadger.com/badges/image/sepulworld/aptly-cli.svg)](http://microbadger.com/images/sepulworld/aptly-cli \"Get your own image badge on microbadger.com\")\n[![](https://images.microbadger.com/badges/version/sepulworld/aptly-cli.svg)](http://microbadger.com/images/sepulworld/aptly-cli \"Get your own version badge on microbadger.com\")\n\nA command line interface 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.\n\n\n## Installation\n\n### Install Gem:\n\n    $ gem install aptly_cli\n\nor...\n\n### Install and run aptly-cli from Docker:\n\n    # Optional: If you don't pull explicitly, `docker run` will do it for you\n    $ docker pull sepulworld/aptly-cli\n\n    $ alias aptly-cli='\\\n      docker run \\\n        -v /etc/aptly-cli.conf:/etc/aptly-cli.conf \\\n        -it --rm --name=aptly-cli \\\n        sepulworld/aptly-cli'\n\n(Depending on how your system is set up, you might have to add `sudo` in front of the above `docker` commands or add your user to the `docker` group).\n\nIf you don't do the `docker pull`, the first time you run `aptly-cli`, the `docker run` command will automatically pull [the `sepulworld/aptly-cli` image on the Docker Hub](https://hub.docker.com/r/sepulworld/aptly-cli/). Subsequent runs will use a locally cached copy of the image and will not have to download anything.\n\nCreate a configuration file with aptly server and port, `/etc/aptly-cli.conf` (YAML syntax):\n\n```yaml\n---\n:proto: http\n:server: 127.0.0.1\n:port: 8082\n:debug: false\n```\n\nIf you use Basic Authentication to protect your API, add username and password:\n\n```yaml\n:username: api-user\n:password: api-password\n```\n\nThe username and password can also be configured for prompt entry using\nthe following in `aptly-cli.conf`:\n\n```yaml\n:username: ${PROMPT}\n:password: ${PROMPT_PASSWORD}\n```\n\nThe tool will prompt for the specified values, where `${PROMPT}` results\nin a regular prompt and `${PROMPT_PASSWORD}` results in a password\nprompt where the input is replaced by asterisks, e.g.:\n\n    $ aptly-cli version\n      Enter a value for username:\n      zane\n      Enter a value for password:\n      ********\n\nAnother possibility for storing passwords is `${KEYRING}`. To use this feature,\nyou must have the [`keyring` gem](https://github.com/jheiss/keyring) installed\nand also have a system that is set up to use one of the backends that the\n`keyring` gem supports, such as Mac OS X Keychain or GNOME 2 Keyring (Note:\nOnly Mac OS X Keychain has been tested thus far):\n\n    $ gem install keyring\n\nThen you can put something like this in `aptly-cli.conf`:\n\n```yaml\n:username: zane\n:password: ${KEYRING}\n```\n\nThe first time you run an `aptly-cli` command, you will be prompted to enter a\npassword.\n\n    $ aptly-cli version\n    Enter a value for password:\n    ***************\n\nThe entered password will be stored in your keyring so that future uses of\n`aptly-cli` can get the password from your keyring:\n\n    $ aptly-cli version\n    {\"Version\"=\u003e\"0.9.7\"}\n\nAlso make sure that your config file isn't world readable (```chmod o-rw /etc/aptly-cli.conf```)\n\nIf a configuration file is not found, the defaults in the example\nconfiguration file above will be used.\n\n## Usage - available aptly-cli commands\n\nThe `--config` (`-c`) option allows specifying an alternative config file, e.g.:\n\n    $ aptly-cli -c ~/.config/aptly-cli/aptly-cli.conf repo_list\n\nThe `--server`, `--port`, `--username`, and `--password` options allow specifying\nthose things on the command-line and not even requiring a config file.\n\n    $ aptly-cli --server 10.3.0.46 --port 9000 --username marca --password '${PROMPT_PASSWORD}' repo_list\n\nNote that you can use `${PROMPT}`, `${PROMPT_PASSWORD}`, and `${KEYRING}` in\nthe values of these options, just as you can in a config file. Note that you\nmight have to quote them to prevent the shell from trying to expand them.\n\n    $ aptly-cli --help\n      NAME:\n\n        aptly-cli\n\n      DESCRIPTION:\n\n        Aptly repository API client (https://github.com/sepulworld/aptly_cli)\n\n      COMMANDS:\n\n        file_delete         File delete\n        file_list           List all directories\n        file_upload         File upload\n        graph               Download an svg or png graph of repository layout\n        help                Display global or [command] help documentation\n        publish_drop        Delete published repository\n        publish_list        List published repositories\n        publish_repo        Publish local repository or snapshot under specified prefix\n        publish_update      Update published repository\n        repo_create         Create a new repository, requires --name\n        repo_delete         Delete a local repository, requires --name\n        repo_edit           Edit a local repository metadata, requires --name\n        repo_list           Show list of currently available local repositories\n        repo_package_add    Add existing package to local repository\n        repo_package_delete Delete package from local repository\n        repo_package_query  List all packages or search on repo contents, requires --name\n        repo_show           Returns basic information about local repository\n        repo_upload         Import packages from files\n        snapshot_create     Create snapshot, require --name\n        snapshot_delete     Delete snapshot, require --name\n        snapshot_diff       Calculate difference between two snapshots\n        snapshot_list       Return list of all snapshots created in the system\n        snapshot_search     List all packages in snapshot or perform search\n        snapshot_show       Get information about snapshot by name\n        snapshot_update     Update snapshot’s description or name\n        version             Display aptly server version\n\n      GLOBAL OPTIONS:\n\n        -c, --config FILE\n            Path to YAML config file\n  \n        --no-config\n            Don't try to read YAML config file\n \n        -s, --server SERVER\n            Host name or IP address of Aptly API server\n\n        -p, --port PORT\n            Port of Aptly API server\n \n        --username USERNAME\n            User name or '${PROMPT}'\n\n        --password PASSWORD\n            Password or '${PROMPT_PASSWORD}' or '${KEYRING}'\n\n        --debug\n            Enable debug output\n\n        -h, --help\n            Display help documentation\n\n        -v, --version\n            Display version information\n\n        -t, --trace\n            Display backtrace when an error occurs\n\n\n### To see more options for each command\n\n    $ aptly-cli \u003ccommand\u003e --help\n\n\n## Development\n\n### Measuring coverage locally\n\n```\n$ rake docker_pull\n$ rake docker_run\n$ bundle exec rake test\n...\nCoverage report generated for Unit Tests to /Users/marca/dev/git-repos/aptly_cli/coverage. 521 / 566 LOC (92.05%) covered.\n[Coveralls] Outside the CI environment, not sending data.\n\n$ open coverage/index.html\n```\n\n\u003cimg width=\"1201\" alt=\"screen shot 2016-07-25 at 8 38 28 pm\" src=\"https://cloud.githubusercontent.com/assets/538171/17125383/d421fa5a-52a7-11e6-8f56-f1ffb8a67ff7.png\"\u003e\n\n### Rubocop syntax and style check\n\n```bash\n$ bundle exec rake rubocop\nRunning RuboCop...\nInspecting 24 files\nWCCCWC..CCCC.CCC.WCWCCCC\n...\n```\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\nRuby Minitest are implemented using a Docker container for functional tests.\n\nRake tasks available:\n\n```bash\nrake build                 # Build aptly_cli-\u003cversion\u003e.gem into the pkg directory\nrake clean                 # Remove any temporary products\nrake clobber               # Remove any generated files\nrake docker_build          # Docker build image\nrake docker_list_aptly     # List Docker Aptly running containers\nrake docker_pull           # Pull Docker image to Docker Hub\nrake docker_push           # Push Docker image to Docker Hub\nrake docker_restart        # Restart Aptly docker container\nrake docker_run            # Start Aptly Docker container on port 8082\nrake docker_show_logs      # Show running Aptly process Docker stdout logs\nrake docker_stop           # Stop running Aptly Docker containers\nrake install               # Build and install aptly_cli-\u003cversion\u003e.gem into system gems\nrake install:local         # Build and install aptly_cli-\u003cversion\u003e.gem into system gems without network access\nrake rubocop               # Run RuboCop\nrake rubocop:auto_correct  # Auto-correct RuboCop offenses\nrake test                  # Run tests\n```\n\n\n## Contributing\n\n1. Fork it ( https://github.com/[my-github-username]/aptly_cli/fork )\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create a new Pull Request\n\n\n## Related\n\n- [ruby-aptly](https://github.com/ryanuber/ruby-aptly) - Ruby client library\n- [aptly-web-ui](https://github.com/sdumetz/aptly-web-ui) - Web interface for aptly (JavaScript, React, Redux)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepulworld%2Faptly_cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsepulworld%2Faptly_cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsepulworld%2Faptly_cli/lists"}