{"id":15292502,"url":"https://github.com/elhmn/ckp","last_synced_at":"2025-05-07T04:01:34.456Z","repository":{"id":46266926,"uuid":"173599445","full_name":"elhmn/ckp","owner":"elhmn","description":"Store and reuse your history and one liner scripts from anywhere, better than gists","archived":false,"fork":false,"pushed_at":"2023-04-07T10:25:39.000Z","size":381,"stargazers_count":21,"open_issues_count":11,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T17:58:26.547Z","etag":null,"topics":["bash","bash-alias","bash-script","bash-scripting","cli"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elhmn.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,"governance":null}},"created_at":"2019-03-03T16:24:16.000Z","updated_at":"2024-12-21T12:56:49.000Z","dependencies_parsed_at":"2023-01-22T13:31:25.138Z","dependency_job_id":null,"html_url":"https://github.com/elhmn/ckp","commit_stats":{"total_commits":138,"total_committers":4,"mean_commits":34.5,"dds":0.572463768115942,"last_synced_commit":"d48e5d5bbd0fddc2d2fa4315268c2d6b1954f1d6"},"previous_names":["elhmn/codekeeper"],"tags_count":38,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elhmn%2Fckp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elhmn%2Fckp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elhmn%2Fckp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elhmn%2Fckp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elhmn","download_url":"https://codeload.github.com/elhmn/ckp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252810269,"owners_count":21807759,"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":["bash","bash-alias","bash-script","bash-scripting","cli"],"created_at":"2024-09-30T16:18:26.187Z","updated_at":"2025-05-07T04:01:33.738Z","avatar_url":"https://github.com/elhmn.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# codekeeper : (ckp)\nCLI that helps you store and reuse your history and one liner scripts from anywhere, better than gists.\n\n## Overview\n\nIf you ever found yourself using a bunch of complex scripts or useful bash oneliners and you find it hard to manually add them to a file, send them to a server and then fetch this scripts to that new machine you have recently acquired or ssh-ed into, this tool is for you. Store and fetch your scripts, your terminal history and your notes from anywhere.\n\n![ckp_demo](https://user-images.githubusercontent.com/5704817/120272338-39377a80-c2ad-11eb-9058-a16f98745bb1.gif)\n\n## Prerequisite\n`ckp` uses several dependencies such as:\n1. `git` version \u003e= 2.24.3 you can follow this [steps](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git) to install git\n2. only `bash` compatible commands can be run using `ckp`, you can use the tool without `bash` but you won't be able to run your commands using the CLI\n\n## Install\n\n#### Using the install script:\n\nRun\n```sh\n$\u003e curl https://raw.githubusercontent.com/elhmn/ckp/master/install.sh | bash\n```\nIt will create a `./bin/ckp` binary on your machine\nIn order to run the command add it to your `/usr/local/bin`\n```sh\n$\u003e cp ./bin/ckp /usr/local/bin\n```\n\n#### Using homebrew:\n\nRun\n```sh\n $\u003e brew tap elhmn/ckp https://github.com/elhmn/ckp\n $\u003e brew install ckp\n```\n\n#### Download\n\nDownload the lastest version [here](https://github.com/elhmn/ckp/releases)\nThen copy the binary to your system binary `/usr/local/bin` folder\n\n\n## Usage\n\n#### How to `Init`-ialize `ckp`\n\n1. You first need to create an empty git repository that `ckp` will use as a storage. we higly recommend to keep this repository private\n\n2. Once the repository is created you can initialise `ckp` using the init command.\n    Copy the ssh or https url and pass it as an argument to the `ckp init` command\n\n```sh\n$\u003e ckp init git@github.com:elhmn/store.git\n```\n\nThis will create a `~/.ckp` folder, and clone the storage repository\n\n#### How to set your text editor\n\nVim is the default text editor to use a different code editor you might need to create a `~/.ckp/config.yaml` file,\nthen open the file and set the `editor` field as follows.\n\n```yaml\neditor: nano\n```\n\n\n#### How to `Add` your scripts and solutions\n\nThe `add code` command will store your script as a code entry in ckp.\n\n```sh\n$\u003e ckp add code 'echo say hi!' --alias=\"sayHi\" --comment=\"a script that says hi\"\n```\n\nThe `add solution` command will store your script as a solution entry in ckp.\n\n```sh\n$\u003e ckp add solution 'https://career-ladders.dev/engineering/' --comment=\"carreer ladders\"\n```\n\n#### How to add scripts from my `bash_history` or `zh_history`\n\nThe `add history` command will read scripts from your history files and store them in ckp.\nthe `--skip-secrets` flag will force ckp to skip scripts that potentially contains secrets.\n\n```sh\n$\u003e ckp add history --skip-secrets\n```\n\n#### How to `Push` your scripts to your remote storage repository\n\nThe `push` command will be commited and pushed to your remote repoitory.\n\n```sh\n$\u003e ckp push\n```\n\n#### How to `Pull` your scripts from your remote storage repository\n\nThe `pull` command will pull changes from your remote storage repository.\n\n```sh\n$\u003e ckp pull\n```\n\n#### How to `Find` a script or solution\n\nThe `find` command will prompt a search and selection UI, that can be used to find.\n\n```sh\n$\u003e ckp find\n```\n\nTo find a script in your history.\n\n```sh\n$\u003e ckp find --from-history\n```\n\n\n#### How to `Run` a script or solution\n\nThe `run` command will prompt a search and selection UI, that can be used to find and run a specific script.\n\n```sh\n$\u003e ckp run\n```\n\nTo run a script from your history.\n\n```sh\n$\u003e ckp run --from-history\n```\n\n\n#### How to `Remove` a script or solution\n\nThe `rm` command will prompt a search and selection UI, that can be used to find and run a specific script.\n\n```sh\n$\u003e ckp rm\n```\n\nTo remove a script from your history.\n\n```sh\n$\u003e ckp rm --from-history\n```\n\n\n## License\n\nMIT.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felhmn%2Fckp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felhmn%2Fckp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felhmn%2Fckp/lists"}