{"id":17635939,"url":"https://github.com/mohawk2/app-cpanel","last_synced_at":"2025-10-16T17:14:40.968Z","repository":{"id":56835152,"uuid":"270368267","full_name":"mohawk2/App-cpanel","owner":"mohawk2","description":"CLI for cPanel UAPI and API 2","archived":false,"fork":false,"pushed_at":"2020-07-06T19:43:58.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T06:14:22.427Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://metacpan.org/pod/App::cpanel","language":"Perl","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/mohawk2.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-06-07T16:42:04.000Z","updated_at":"2020-07-06T19:43:54.000Z","dependencies_parsed_at":"2022-09-02T03:50:37.938Z","dependency_job_id":null,"html_url":"https://github.com/mohawk2/App-cpanel","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FApp-cpanel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FApp-cpanel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FApp-cpanel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mohawk2%2FApp-cpanel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mohawk2","download_url":"https://codeload.github.com/mohawk2/App-cpanel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246273515,"owners_count":20750904,"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":[],"created_at":"2024-10-23T02:24:43.039Z","updated_at":"2025-10-16T17:14:35.919Z","avatar_url":"https://github.com/mohawk2.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nApp::cpanel - CLI for cPanel UAPI and API 2\n\n# PROJECT STATUS\n\n[![CPAN version](https://badge.fury.io/pl/App-cpanel.svg)](https://metacpan.org/pod/App::cpanel)\n\n# SYNOPSIS\n\n    $ cpanel uapi Notifications get_notifications_count\n    $ cpanel uapi ResourceUsage get_usages\n    $ cpanel uapi Fileman list_files dir=public_html\n    $ cpanel uapi Fileman get_file_content dir=public_html file=index.html\n    $ cpanel download public_html/index.html\n    $ cpanel api2 Fileman fileop op=chmod metadata=0755 sourcefiles=public_html/cgi-bin/hello-world\n    $ cpanel api2 Fileman fileop op=unlink sourcefiles=public_html/cgi-bin/hello-world\n    $ cpanel api2 Fileman mkdir path= name=new-dir-at-top\n\n    # this one is one at a time but can overwrite files\n    $ cpanel api2 Fileman savefile dir=public_html/cgi-bin filename=hello-world content=\"$(cat public_html/cgi-bin/hello-world)\"\n    # this is multiple files but refuses to overwrite\n    $ cpanel upload public_html/cgi-bin hello-world\n\n    # download\n    $ cpanel mirror public_html public_html cpanel localfs\n    # upload\n    $ cpanel mirror public_html public_html localfs cpanel\n\n# DESCRIPTION\n\nCLI for cPanel UAPI and also API 2, due to missing functionality in UAPI.\n\nStores session token in `~/.cpanel-token`, a two-line file. First line\nis the URL component that goes after `cpsess`. Second is the `cpsession`\ncookie, which you can get from your browser's DevTools.\n\nStores relevant domain name in `~/.cpanel-domain`.\n\n# FUNCTIONS\n\nExportable:\n\n## dispatch\\_cmd\\_print\n\nWill print the return value, using [\"dumper\" in Mojo::Util](https://metacpan.org/pod/Mojo::Util#dumper) except for\n`download`.\n\n## dispatch\\_cmd\\_raw\\_p\n\nReturns a promise of the decoded JSON value or `download`ed content.\n\n## dir\\_walk\\_p\n\nTakes `$from_dir`, `$to_dir`, `$from_map`, `$to_map`. Copies the\ninformation in the first directory to the second, using the respective\nmaps. Assumes UNIX-like semantics in filenames, i.e. `$dir/$file`.\n\nReturns a promise of completion.\n\nThe maps are hash-refs whose values are functions, and the keys are:\n\n### ls\n\nTakes `$dir`. Returns a promise of two hash-refs, of directories and of\nfiles. Each has keys of relative filename, values are an array-ref\ncontaining a string octal number representing UNIX permissions, and a\nnumber giving the `mtime`. Must reject if does not exist.\n\n### mkdir\n\nTakes `$dir`. Returns a promise of having created the directory.\n\n### read\n\nTakes `$dir`, `$file`. Returns a promise of the file contents.\n\n### write\n\nTakes `$dir`, `$file`. Returns a promise of having written the file\ncontents.\n\n### chmod\n\nTakes `$path`, `$perms`. Returns a promise of having changed the\npermissions.\n\n# SEE ALSO\n\n[https://documentation.cpanel.net/display/DD/Guide+to+UAPI](https://documentation.cpanel.net/display/DD/Guide+to+UAPI)\n\n[https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+2](https://documentation.cpanel.net/display/DD/Guide+to+cPanel+API+2)\n\n# AUTHOR\n\nEd J\n\n# COPYRIGHT AND LICENSE\n\nThis is free software; you can redistribute it and/or modify it under\nthe same terms as the Perl 5 programming language system itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fapp-cpanel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmohawk2%2Fapp-cpanel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmohawk2%2Fapp-cpanel/lists"}