ak-cli icon indicating copy to clipboard operation
ak-cli copied to clipboard

:bookmark: Collection of useful cli commands

List of some daily used commands for tech geeks.

Give us a :star: if you like our work :heart:

Github Repo Size LICENSE Contributors Commit Issues Pull Requests

Contents

  • Docker
  • Git
  • Heroku
  • Kafka
  • Linux
  • Mongo
  • NPM
  • PSQL
  • Python
  • SCP
  • SSH
  • tar
  • zip
  • pm2

Docker

  • Build image - Build docker image using Dockerfile.
  • Commit container - Commit current state of docker container to save as a new image.
  • Copy to container - Copy file/directory to docker container.
  • Copy from container - Copy file/directory from docker container.
  • Create and run mongo - Pull mongo docker image from docker registry and create & run mongo container.
  • Create and run postgres - Pull postgres docker image from docker registry and create & run postgres container.
  • Create and run redis - Pull redis docker image from docker registry and create & run redis container.
  • Create container - Create container using a docker image.
  • Delete container - Delete a stopped docker container.
  • Delete image - Delete an unused docker image.
  • Get Container IP - Get docker container's local IP Address.
  • Import image - Import docker image from a tar ball package.
  • Inspect Container - Inspect docker container to list down complete configuration.
  • List Containers - List all the running & stopped containers
  • List Images - List all the docker images available locally
  • Load Saved Image - Load a docker image from a tar ball package.
  • Login to container - Login to docker container bash.
  • Login to docker registry - Login to docker registry in local terminal.
  • Push docker image - Push docker image to remote registry.
  • Rename container - Rename a running or stopped docker container
  • Run docker container - Run a docker container using docker image id.
  • Save docker image - Save a docker image into a tar package.
  • Tail container logs - Tail running or stopped docker container logs.

GIT

  • Clone repository - Clone a repository to any location.
  • Cherry Pick Commit - Copy one commit from one branch to another
  • Commit changes - Commit the local changes.
  • Configure Author - Configure author name and email.
  • Configured Author - Check configured author name or email.
  • Create branch - Create a new branch.
  • Delete branch - Delete a branch from remote git repository.
  • Git RefLog - Gives the complete activity trace of the repository.
  • Modify Commit - Modify last commit details (commit message, author...).
  • Pull changes - Pull remote changes to local repository.
  • Push changes - Push changes from local respository to remote.
  • RM Cached - Remove cached files which are added in .gitignore later.
  • Reset File - Reset committed changes of a file.
  • Restore Branch - Restore a deleted branch.
  • Status - Git status to check the file list in which changes are made.
  • Stage - Stage (add) the new changes done to commit those changes.
  • Stash - Stash all the current changes, pushes all the changes to stash stack and goes back to last commit.
  • Stash File - Stash a particular file, push changes done to a file into stash stack and goes back to last commit for that file.
  • Stash List - Check stash stack list.
  • Stash Revert - Revert stashed changes from stash stack.
  • Switch Branch - Switch current working branch.

Heroku

  • List dynos - List all the running dynos

Kafka

  • Create Topic - Create a new topic in zookeeper to be used by Kafka.

Linux

  • Clear Terminal - Clear current visible terminal.
  • Get Flavor & Version - Get current running Linux OS flavor and version details.
  • List contents of directory - List all the contents of the current directory
  • Search Application Process - Search for running application process by name.
  • Tail File - Live tail any file.
  • Tail Multiple Files - Live tail multiple files in a directory.

Mongo

  • Dump collection from MongoDB - Dump all the collections of all the databases from Mongo to a directory in JSON files.
  • Dump database from MongoDB - Dump all the collections of a single database from Mongo to specified location.
  • Restore collection to MongoDB - Restore all database with all of its dumped collection from a specified location to Mongo.
  • Restore database to MongoDB - Restore a particular database and all of its collection from specified location to Mongo.

NPM

  • Login - Login to NPM in your terminal.
  • Init - Initialze a npm project.
  • Publish - Publish a package to npm repository.

PM2

  • pm2 start - Start an application using pm2

PSQL

  • Login to database - Login to a database using username / password.
  • Import Dump - Import SQL dump to a database in Postgres.
  • Export Dump - Export a database to a SQL dump file.

Python

  • Build python project - Build the python project to deploy on pypi.
  • Python deploy to pypi - Deploy the build python project to pypi.

SCP

  • Copy from local to server - Copy files from local system to remote server.
  • Copy from server to local - Copy files from remote server to local system.

SSH

  • Login Remote Server - Login into a remote server.

tar

  • Tar Extract - Extract a tar package to specified location.

zip

  • Zip directory - Pack a directory into a zip package.
  • Zip directory Encryption - Pack a directory into a zip package with encryption.
  • Unzip file - Unzip a zip package to a specified location.

Contributing Guide

Interested in contributing to this project, check some of our open issues here.

Read our contrubtion guide here.

Help us

We would love to get some suggestions or feedbacks for this project.

If you have any suggestion about the project, let us know by adding a comment here