Command-line interface (CLI) · packagecloud
Install the CLI via RubyGems
What is the CLI?
It's a command-line interface to interact with packagecloud repositories.
Get detailed information on our command-line client, or visit the general docs for more help getting started.
$ gem install package_cloud Fetching: package_cloud-0.3.02.gem (100%) Successfully installed package_cloud-0.3.02 1 gem installed
Create a repository
Use the packagecloud CLI to create a repository.
$ package_cloud repository create prod Looking for repository at prod... success! Your repository has been created at: https://packagecloud.io/computology/prod
Show me how work
Select a package type to walk‑through:
- Uploading a package using the CLI
- Configuring a repository using the installation scripts
- Package installation
1. Push a package
2. Configure a repo
3.Install a package
Move packages
Promote packages between repositories using the CLI.
Quickly move packages between staging and production environments.
$ package_cloud promote user/repo/node test-0.1.0.tgz user/repo2 Looking for source repository at user/repo... Looking for destination repository at user/repo2... success! Attempting to promote: user/repo/node/1/test-0.1.0.tgz to user/repo2...done!
Delete packages
Remove a package from a repository using the CLI.
$ package_cloud yank user/repo/node ./tmp/test-0.1.0.tgz
Looking for repository at user/repo...
Attempting to yank package at user/repo/node/1/packagecloud-0.1.0.tgz...done!
Upload a package signing key
Upload the public key used to sign packages.
$ package_cloud gpg_key create user/repo ./gpg.key Looking for repository at user/repo... success! Attempting to upload key file ./gpg.key... success!
List GPG Keys
Use the CLI to list the associated GPG keys for a specific repository.
$ package_cloud gpg_key list user/repo
Looking for repository at user/repo... success!
GPG Keys for user/repo:
Key name: user-repo-75EA8E83A2A04BE5.pub.gpg
Key type: Repository signing key
Key fingerprint: 9A565EE4A2AE8A0E49A1CFF573EC8D83A2D04CA6
GPG key url: https://packagecloud.io/user/repo/gpgkey
Key name: user-repo-1FE0C.pub.gpg
Key type: Package signing key
Key fingerprint: CA15E7E083F277F12204EEE22EF0E33532F27999
GPG key url: https://packagecloud.io/user/repo/gpgkey/user-repo-1FE0C.pub.gpg
Delete a GPG key
Delete GPG keys for a repo using the CLI.
$ package_cloud gpg_key destroy user/repo user-repo-1FE0C.pub.gpg
Are you sure you want to delete the GPG key user-repo-1FE0C.pub.gpg? (y/n): y
Attempting to destroy GPG key named user-repo-1FE0C.pub.gpg... success!
Need extra customization?
Use the packagecloud API client for your language of choice
NodeJS
Use the JS client to interact with the packagecloud API. Load repo data on a server, or browser, using the JS client.
Ruby
Build more robust automation integrations using the Ruby client. Get data and interact with repositories using Ruby.
Java
Use the Java client to interact with the packagecloud API.