{"id":15042424,"url":"https://github.com/juev/ok","last_synced_at":"2025-04-14T20:33:18.648Z","repository":{"id":52880104,"uuid":"243930631","full_name":"juev/ok","owner":"juev","description":".ok folder profiles","archived":false,"fork":false,"pushed_at":"2022-09-14T21:03:15.000Z","size":27,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-28T08:51:15.365Z","etag":null,"topics":["bash","cli","rust","zsh"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/juev.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":"2020-02-29T08:17:55.000Z","updated_at":"2023-11-17T22:52:59.000Z","dependencies_parsed_at":"2022-08-23T12:31:31.193Z","dependency_job_id":null,"html_url":"https://github.com/juev/ok","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/juev%2Fok","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juev%2Fok/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juev%2Fok/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/juev%2Fok/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/juev","download_url":"https://codeload.github.com/juev/ok/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248956203,"owners_count":21189313,"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","cli","rust","zsh"],"created_at":"2024-09-24T20:47:17.402Z","updated_at":"2025-04-14T20:33:18.613Z","avatar_url":"https://github.com/juev.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# ok\n\n[![Crates.io](https://img.shields.io/crates/v/ok)](https://crates.io/crates/ok) [![Crates.io](https://img.shields.io/crates/l/ok.svg?maxAge=2592000)](https://github.com/juev/ok/blob/master/LICENSE)\n\nThis is Rust fork of [ok-bash](https://github.com/secretGeek/ok-bash).\n\n## \"ok\" gives you .ok folder profiles for bash\n\n`ok` makes you smarter and more efficient.\n\nDo you work on many different projects? And in each project, are there commands you use that are specific to that project? You need a `.ok` file.\n\nAn `.ok` file holds a bunch of handy one-liners, specific to the folder it is in. It can be viewed with a simple command. Any command can be executed with the command `ok \u003cnumber\u003e` (example, `ok 3` to run the 3rd command.)\n\nImagine your `.ok` file contains these three lines:\n\n    ./build.sh # builds the project\n    ./deploy.sh # deploys the project\n    ./commit_push.sh \"$1\" # commit with comment, rebase and push\n\nYou can run those commands with \"`ok 1`\", \"`ok 2`\" or \"`ok 3 'oops!'`\", respectively.\n\nAn `.ok` file acts as a neat place to document how a given project works. This is useful if you have many projects, or many people working on a project. It's such a little file; it's so quick to write and so easy to edit.\n\nIt's better than normal documentation: it's executable.\n\nIf you run the command `ok` (with no parameters) you'll see the file listed, with numbers against each command:\n\n    $ ok\n    1. ./build.sh            # builds the project\n    2. ./deploy.sh           # deploys the project\n    3. ./commit_push.sh \"$1\" # commit with comment, rebase and push\n\n(It will also be stylishly formatted, to make it easier to read at a glance)\n\nThen if you run `ok \u003cnumber\u003e` (ok followed by a number) you'll execute that line of the file.\n\n    $ ok 1\n    $ ./build.sh # builds the project\n    building.....\n\nAnd you can pass simple arguments to the commands. For example:\n\n    $ ok 3 \"Added laser guidance system\"\n    $ ./commit_push.sh \"$1\" # commit with comment, rebase and push\n\n    Committing with comment \"Added laser guidance system\"\n    Commit succeeded.\n    Rebase successful\n    Pushing to master.\n\n\n## Getting started\n\n### Installation\n\nPut binary file from [release](https://github.com/juev/ok/releases/latest) page to your `PATH`.\n\nOr use `Cargo`:\n\n```\ncargo install ok\n```\n\n### First steps after installing\n\nYou can try out the included `.ok` file by navigating to `~/path/to/ok` and type `ok`. Explore some of the options.\n\nNext you can create your own `.ok` file. Navigate to any folder where you want to use `ok`, and run for example:\n\n    echo '# My first ok-command'\u003e\u003e.ok\n    echo 'echo \"Hi $USER, the time when pressed enter was $(date \"+%H:%M:%S\")\"'\u003e\u003e.ok\n\nThe first line adds a \"heading\" to the `.ok` file, which is nice to keep the file organized. I used append redirect (`\u003e\u003e.ok`) to append a line to the `.ok` file. When the file doesn't exist, it's created.\n\nAlso, I use single quotes `'`, so no funny things happen to the string, before it ends up in your `.ok` file. This way, `$USER` and `$(date...)` are evaluated when the `ok` command is run, not when you add the line to the `.ok` file.\n\nWhat to put in these `.ok` files? A good place to start is the projects documentation: search for all commands that are buried in there. Even add running a script file with a comment (and grouped under the correct heading) can be really helpfull. And whenever you `man` a command or search Google for it, remember to check if it's worth to add it to your `.ok` file. It probably is. And it's easy to remove again.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuev%2Fok","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuev%2Fok","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuev%2Fok/lists"}