{"id":16141332,"url":"https://github.com/rootsongjc/cloudinary-go","last_synced_at":"2025-10-07T22:40:29.535Z","repository":{"id":84638544,"uuid":"108710009","full_name":"rootsongjc/cloudinary-go","owner":"rootsongjc","description":"A Go client library and CLI tool to upload static assets to Cloudinary service.","archived":false,"fork":false,"pushed_at":"2017-10-29T08:22:07.000Z","size":22,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-05T13:40:44.602Z","etag":null,"topics":["cli","cloudinary","cloudinary-library","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rootsongjc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-29T06:14:44.000Z","updated_at":"2023-05-25T14:19:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"a58c3c74-1898-4a87-bfd1-65cfe782ad57","html_url":"https://github.com/rootsongjc/cloudinary-go","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsongjc%2Fcloudinary-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsongjc%2Fcloudinary-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsongjc%2Fcloudinary-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rootsongjc%2Fcloudinary-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rootsongjc","download_url":"https://codeload.github.com/rootsongjc/cloudinary-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247535087,"owners_count":20954570,"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","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":["cli","cloudinary","cloudinary-library","golang"],"created_at":"2024-10-09T23:55:05.483Z","updated_at":"2025-10-07T22:40:24.484Z","avatar_url":"https://github.com/rootsongjc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cloudinary-go\n=============\n\nA Go client library and CLI tool to upload static assets to the [Cloudinary](http://www.cloudinary.com) service.\n\nInstallation\n------------\n\nInstall the CLI tool and the library with:\n\n```\ngo get github.com/rootsongjc/cloudinary-go/cloudinary\n```\n\nOr download the release binary from [release](https://github.com/rootsongjc/cloudinary-go/releases).\n\n## Configuration\n\nCreate a default configuration file named `${HOME}/.cloudinary.toml` \n\n```\n[cloudinary]\nuri=cloudinary://api_key:api_secret@cloud_name # check your cloudinary dashboard to the the uri\nprepend = \"images\" # default cloudinary folder\n```\n\nUsage\n-----\n\n\n```\nA CLI tool to upload static assets to the Cloudinary service.\n\nUsage:\n  cloudinary [command]\n\nAvailable Commands:\n  help        Help about any command\n  ls          List files\n  put         Upload file\n  rm          Remove file\n\nFlags:\n      --config string   config file (default is $HOME/.cloudinary.toml)\n  -h, --help            help for cloudinary\n  -i, --image string    image filename or public id\n  -p, --path string     flle prepend path\n  -r, --raw string      raw filename or public id\n  -s, --simulate        simulate, do nothing (dry run)\n  -v, --verbose         verbose output\n\nUse \"cloudinary [command] --help\" for more information about a command.\n```\n\nType ``cloudinary`` in the terminal to get some help.\n\n### Upload\n\n```bash\n# upload image file\ncloudinary put -i abc.jpg -p images\n# upload raw file\ncloudinary put -r abc.js -p js\n```\n\nAs the local image uploaded to cloudinary, you will get a URL such like this:\n\n```bash\ncloudinary put -i cover.jpg\nUsing config file: /Users/jimmy/.cloudinary.toml\nWarning: database not set (upload sync disabled)\nDefault remote prepend path set to:  images/\n==\u003e PublicID: images/cover\n==\u003e Uploading as images\n2017/10/29 14:49:01 Uploading: cover.jpg\n2017/10/29 14:49:06 URL: https://res.cloudinary.com/jimmysong/image/upload/images/cover.jpg\n```\n\nThe URL `https://res.cloudinary.com/jimmysong/image/upload/images/cover.jpg` represent the laster version of the image.\n\nYou can use `ls` to get the upload version.\n\n### List\n\n```bash\n# list all resources\ncloudinary ls\n# list specified static file details\ncloudinary ls -i abc -p images\n```\n\nList raw file details not support.\n\nGet the upload version.\n\n```bash\ncloudinary ls -i cover.jpg\nUsing config file: /Users/jimmy/.cloudinary.toml\nWarning: database not set (upload sync disabled)\nDefault remote prepend path set to:  images/\n==\u003e PublicID: images/cover\n==\u003e Image Details:\npublic_id                      Format Version    Type  Size(KB) Width  Height Url\nimages/cover                   jpg    1509259745 image 297      1800   2360   http://res.cloudinary.com/jimmysong/image/upload/v1509259745/images/cover.jpg\n```\n\n**Note**: Whether You can specify the file name with extension name or not, that also works.\n\n### Delete\n\n```bash\n# delete image\ncloudinary delete -i abc -p images\n# delete raw resource\ncloudinary delete -r abc.js -p js\n```\n\n## Note\n\n1. Cloudinary prepend path should not start with  a \"/\" root path\n\n### PublicID\n\n1. PublicID of **Image resource** doesn't include their extension name\n2. PublicID of **Raw resource** include their extension name\n3. PublicID includes the prepend path\n\n**PublicID example**\n\n| Local file | Prepend path | PublicID   |\n| ---------- | ------------ | ---------- |\n| abc.jpg    | images       | images/abc |\n| abc.js     | js           | js/abc.js  |\n\nMore information see [Cloudinary Image upload API reference](https://cloudinary.com/documentation/image_upload_api_reference)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootsongjc%2Fcloudinary-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frootsongjc%2Fcloudinary-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frootsongjc%2Fcloudinary-go/lists"}