{"id":28715279,"url":"https://github.com/xuxinkun/littletools","last_synced_at":"2025-10-15T09:44:50.453Z","repository":{"id":15624252,"uuid":"18360995","full_name":"xuxinkun/littleTools","owner":"xuxinkun","description":"A set of short commands used to make the input of some commands simple.","archived":false,"fork":false,"pushed_at":"2020-07-06T01:57:24.000Z","size":16,"stargazers_count":145,"open_issues_count":0,"forks_count":53,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-06-15T02:01:48.373Z","etag":null,"topics":["autocomplete","docker","kubectl","kubernetes","shell-functions"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xuxinkun.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-02T09:20:16.000Z","updated_at":"2024-09-14T06:54:58.000Z","dependencies_parsed_at":"2022-09-07T01:40:28.684Z","dependency_job_id":null,"html_url":"https://github.com/xuxinkun/littleTools","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xuxinkun/littleTools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuxinkun%2FlittleTools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuxinkun%2FlittleTools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuxinkun%2FlittleTools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuxinkun%2FlittleTools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xuxinkun","download_url":"https://codeload.github.com/xuxinkun/littleTools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xuxinkun%2FlittleTools/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279067709,"owners_count":26096372,"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-10-15T02:00:07.814Z","response_time":56,"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":["autocomplete","docker","kubectl","kubernetes","shell-functions"],"created_at":"2025-06-15T02:01:25.473Z","updated_at":"2025-10-15T09:44:50.448Z","avatar_url":"https://github.com/xuxinkun.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# littleTools\n\nlittleTools contains a set of short commands used to make the input of some commands simple.\n\nlittleTools is written by shell function. So `tab` key can help the users to complete the command automaticly.\n\n#### docker-tools and kube-tools\n\nlittleTools has docker-tools and kube-tools to simplify the input of command `docker` and `kubectl`.\n\nFor example, if you want to exec into a container, you may enter the command `docker exec -it xxx bash`. With littleTools, just use `dt-exec xxx` can achieve it.\n\n#### azk8spull\n\nazk8spull is using to pull image from mirror registry azk8s.cn.\n\n**Since 2020, the proxy server is limited to Azure China IP, and no longer provides external services.** See more info at [http://mirror.azk8s.cn/help/docker-registry-proxy-cache.html](http://mirror.azk8s.cn/help/docker-registry-proxy-cache.html).\n\n## install \n\n```\ngit clone https://github.com/xuxinkun/littleTools\ncd littleTools\nchmod +x install.sh\n./install.sh\nsource /etc/profile\n```\n\n`azk8spull` function can not work with zsh. So, `bin/azk8spull` is provided for zsh. Install it as follow if using zsh or just using `azk8spull` without other tools.\n\n```\ncurl -Lo /usr/local/bin/azk8spull https://github.com/xuxinkun/littleTools/releases/download/v1.0.0/azk8spull \u0026\u0026 chmod +x /usr/local/bin/azk8spull\n```\n\n## usage\n\n#### docker tools(docker-tools)\n\n| command             | params        | description                                                  |\n| ------------------- | ------------- | ------------------------------------------------------------ |\n| dt-exec             | {containerid} | Exec into the container with bash.                           |\n| dt-exec-sh          | {containerid} | Exec into the container with sh.                             |\n| dt-show-pid         | {containerid} | Show the pid of the num 0 process of the container.          |\n| dt-show-pid-all     | {containerid} | Show the pids of all the processes of the container.         |\n| dt-show-flavor      | {containerid} | Show the flavor info such as cpu/memory of the container.    |\n| dt-show-flavor-all  | None          | Show the flavor info such as cpu/memory of all the containers. |\n| dt-show-volume      | {containerid} | Show the volume path on host of the container.               |\n| dt-show-volume-all  | {containerid} | Show the volume path on host and bind path in container of the container. |\n| dt-lookup-by-pid    | {pid}         | Look up the container which contains the process with the {pid} on host. |\n| dt-lookup-by-volume | {volume path} | Look up the container with volumes which contains the {volume path} on host. |\n\n\n#### kubernetes tools(kube-tools)\n\n| command              | params                                     | description                         |\n| -------------------- | ------------------------------------------ | ----------------------------------- |\n| kt-exec              | {pod name} or {namespace} {pod name}       | Exec into the pod with bash.        |\n| kt-exec-sh           | {pod name} or {namespace} {pod name}       | Exec into the pod with sh.          |\n| kt-get-node          | {node name}                                | Describe the node.                  |\n| kt-get-node-ready    | None                                       | List all the ready nodes.           |\n| kt-get-node-notready | None                                       | List all the not ready nodes.       |\n| kt-get-node-all      | None                                       | List all the nodes                  |\n| kt-get-pod           | {pod name} or {namespace} {pod name}       | Describe pod.                       |\n| kt-get-node-by-pod   | {pod name} or {namespace} {pod name}       | Get the pod and the node with pod.  |\n| kt-get-pod-all       | None                                       | Get all the pods of all namespaces. |\n| kt-get-pod-by-ns     | {namespace}                                | Get all the pods in the namespace.  |\n| kt-get-pod-by-rs     | {rs name} or {namespace} {rs name}         | Get all the pods of the rs.         |\n| kt-get-pod-by-deploy | {deploy name} or {namespace} {deploy name} | Get all the pods of the deploy.     |\n| kt-get-pod-by-svc    | {svc name} or {namespace} {svc name}       | Get all the pods of the svc.        |\n| kt-get-pod-by-ip     | {ip}                                       | Get pod with the ip.                |\n| kt-get-pod-by-node   | {nodeName}                                 | get pods on the node.               |\n\n#### azk8spull\n\n`azk8spull` makes use of azk8s.cn mirror to pull image from container registries like `docker.io`, `gcr.io`, `quay.io` in China. `azk8spull` will pull the image from azk8s.cn and then tag to the origin image name. Thanks to Azure China.\n\nFor more information, please visit [https://github.com/Azure/container-service-for-azure-china/tree/master/aks#22-container-registry-proxy](https://github.com/Azure/container-service-for-azure-china/tree/master/aks#22-container-registry-proxy).\n\n```\n[root@node-64-216 ~]# azk8spull quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1\n## azk8spull try to pull image from mirror quay.azk8s.cn/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1.\n0.24.1: Pulling from kubernetes-ingress-controller/nginx-ingress-controller\nDigest: sha256:76861d167e4e3db18f2672fd3435396aaa898ddf4d1128375d7c93b91c59f87f\nStatus: Image is up to date for quay.azk8s.cn/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1\n## azk8spull try to tag quay.azk8s.cn/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1 to quay.io/kubernetes-ingress-controller/nginx-ingress-controller:0.24.1.\n## azk8spull finish pulling.\n\n[root@node-64-216 ~]# azk8spull k8s.gcr.io/pause-amd64:3.1\n## azk8spull try to pull image from mirror gcr.azk8s.cn/google_containers/pause-amd64:3.1.\n3.1: Pulling from google_containers/pause-amd64\nDigest: sha256:59eec8837a4d942cc19a52b8c09ea75121acc38114a2c68b98983ce9356b8610\nStatus: Image is up to date for gcr.azk8s.cn/google_containers/pause-amd64:3.1\n## azk8spull try to tag gcr.azk8s.cn/google_containers/pause-amd64:3.1 to k8s.gcr.io/pause-amd64:3.1.\n## azk8spull finish pulling. \n```\n\n## examples\n\n#### kube-tools and docker-tools\n\nSee more [examples](examples.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuxinkun%2Flittletools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxuxinkun%2Flittletools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxuxinkun%2Flittletools/lists"}