{"id":29639308,"url":"https://github.com/kako-jun/cdand","last_synced_at":"2025-07-21T20:37:43.500Z","repository":{"id":64305130,"uuid":"172720616","full_name":"kako-jun/cdand","owner":"kako-jun","description":"a CLI command that makes it possible to execute every commands in your target directory without `cd`","archived":false,"fork":false,"pushed_at":"2019-03-19T09:55:02.000Z","size":7732,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-20T06:06:10.908Z","etag":null,"topics":["cli-command","golang-package"],"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/kako-jun.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":"2019-02-26T13:50:31.000Z","updated_at":"2019-04-22T21:54:21.000Z","dependencies_parsed_at":"2023-01-15T10:30:43.865Z","dependency_job_id":null,"html_url":"https://github.com/kako-jun/cdand","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kako-jun/cdand","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kako-jun%2Fcdand","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kako-jun%2Fcdand/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kako-jun%2Fcdand/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kako-jun%2Fcdand/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kako-jun","download_url":"https://codeload.github.com/kako-jun/cdand/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kako-jun%2Fcdand/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266375775,"owners_count":23919621,"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-07-21T11:47:31.412Z","response_time":64,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":["cli-command","golang-package"],"created_at":"2025-07-21T20:37:30.903Z","updated_at":"2025-07-21T20:37:43.476Z","avatar_url":"https://github.com/kako-jun.png","language":"Go","readme":"[日本語はこっち (Let's try reading in Japanese.)](https://github.com/kako-jun/cdand/blob/master/README_ja.md)\r\n\r\n# :file_folder: cdand\r\n\r\n[![Build Status](https://travis-ci.org/kako-jun/cdand.svg?branch=master)](https://travis-ci.org/kako-jun/cdand)\r\n\r\n`cdand` is a simple CLI command.\r\n\r\nIt can launch every commands(e.g. `git`, `yarn`) in your target directory without `cd`.\r\n\r\nIt's written in Go, so it will work on many operating systems.\r\n\r\n　\r\n\r\n## Description\r\n\r\n### Demo\r\n\r\n![demo](https://raw.githubusercontent.com/kako-jun/cdand/master/assets/screen_1.gif)\r\n\r\n### VS.\r\n\r\nThere are many commands that expect you already changed the current directory before launch.\r\n\r\nFor example, `pwd`.\r\n\r\n```sh\r\n$ pwd\r\n\r\n/media/removable/SD Card/current\r\n\r\n$ pwd subdir/subsubdir\r\n\r\n/media/removable/SD Card/current\r\n```\r\n\r\n　\r\n\r\nBy using `cdand`, you can type simply.\r\n\r\n```sh\r\n$ cdand subdir/subsubdir pwd\r\n\r\n/media/removable/SD Card/current/subdir/subsubdir\r\n```\r\n\r\nIf you don't use `cdand`, there is no way to get expected results without changing the current directory.\r\n\r\nAnd one more command will be required to restore the current directory.\r\n\r\n```sh\r\n$ cd subdir/subsubdir; pwd\r\n$ cd ../..\r\n```\r\n\r\nBy adding `cdand` to PATH, you can say good-bye to `cd ../..`.\r\n\r\n　\r\n\r\n## Installation\r\n\r\n### Requirements\r\n\r\n- Operating System\r\n\r\n    - Windows\r\n    - macOS\r\n    - Linux\r\n\r\n### Download binaries\r\n\r\n- Windows: [cdand_win.zip](https://github.com/kako-jun/cdand/releases/latest)\r\n- macOS: [cdand_mac.dmg](https://github.com/kako-jun/cdand/releases/latest)\r\n- Linux ( `chmod u+x cdand` required)\r\n\r\n    - x64: [cdand_linux_amd64.tar.gz](https://github.com/kako-jun/cdand/releases/latest)\r\n    - ARM: [cdand_linux_arm64.tar.gz](https://github.com/kako-jun/cdand/releases/latest)\r\n    - Raspberry Pi: [cdand_linux_armv7l.tar.gz](https://github.com/kako-jun/cdand/releases/latest)\r\n\r\n### go get\r\n\r\n```sh\r\n$ go get github.com/kako-jun/cdand\r\n```\r\n\r\n　\r\n\r\n## Features\r\n\r\n### Usage\r\n\r\n```sh\r\n$ cdand subdir/subsubdir ls -alF\r\n\r\ndrwxrwxr-x.  2 kako-jun kako-jun 4096  Apr  2 04:20 ./\r\ndrwxr-xr-x. 10 kako-jun kako-jun 4096  Apr  2 04:20 ../\r\n-rw-rw-r--.  1 kako-jun kako-jun    0  Apr  2 04:20 my_secrets.txt\r\n```\r\n\r\n　\r\n\r\n\"Why is `cdand` useful?\" Here are the examples.\r\n\r\n#### Examples\r\n\r\n##### e.g. No need to call `cd` before executing Git commands.\r\n\r\n```sh\r\n$ cdand your/git/repository git status\r\n```\r\n\r\n##### e.g. No need to call `cd` before executing Node commands.\r\n\r\n```sh\r\n$ cdand your/node/project yarn\r\n```\r\n\r\n　\r\n\r\nThe point is, you don't need to care the difference between options of each command.\r\n\r\ne.g.\r\n\r\n- `-C` option of `git`\r\n- `-prefix`, `-cwd` options of `node`\r\n\r\nThey are hard to remember, aren't they?\r\n\r\n　\r\n\r\nHow is the following?\r\n\r\n```sh\r\n$ (cd subdir/subsubdir; ls)\r\n```\r\n\r\nIt's a cool way for who likes typing many brackets.\r\n\r\n　\r\n\r\nAfter you typed `cd`, if you saw a troublesome future, let's append `and`.\r\n\r\nAfter that, use TAB key to autocomplete the target directory name.\r\n\r\n```sh\r\n$ cdand ../sister_project npm install\r\n```\r\n\r\nIt's also helpful to keep indoors(subdirectory).\r\n\r\n　\r\n\r\n##### e.g. appendix\r\n\r\n`cdand` can be called recursively.\r\n\r\n```sh\r\n$ cdand subdir cdand .. cdand subdir cdand .. ls\r\n```\r\n\r\nUmmmm...are there any merits? (Probably nothing.)\r\n\r\n　\r\n\r\n#### Unsupported\r\n\r\n##### Coloring on stdout will be disabled.\r\n\r\ne.g. `ls -G`\r\n\r\n##### For incomplete commands, you may get unexpected results.\r\n\r\n- `vim` can launch, but not shown in terminal.\r\n- `less` can launch, but cannnot paging.\r\n- The stdout from interactive command is shown at the same time.\r\n\r\n##### The target of pipe and redirect is `cdand` itself.\r\n\r\nFor example, in case you type as below\r\n\r\n```sh\r\n$ cdand subdir cat my_secrets.txt | grep treasure\r\n```\r\n\r\nAt first,\r\n\r\n```sh\r\n$ cdand subdir cat my_secrets.txt\r\n```\r\n\r\nruns.\r\n\r\nNext,\r\n\r\n```sh\r\n$ grep treasure\r\n```\r\n\r\nruns for the first result.\r\n\r\nIn pipe case, the above order may not be a problem.\r\n\r\n　\r\n\r\nBut in redirect case, a problem occurs.\r\n\r\n```sh\r\n$ cdand subdir cat my_secrets.txt \u003e my_will.txt\r\n```\r\n\r\n`my_will.txt` isn't created in `subdir` but in the current directory.\r\n\r\n　\r\n\r\nIf you want to get it in `subdir`, you have to create a script as below.\r\n\r\n```sh\r\ncat my_secrets.txt \u003e my_will.txt\r\n```\r\n\r\nAnd put the above script in `subdir`.\r\n\r\nLastly,\r\n\r\n```sh\r\n$ cdand subdir foo.sh\r\n```\r\n\r\nBut it probably has no benefit... :sob:\r\n\r\n　\r\n\r\n### Coding\r\n\r\n```golang\r\nimport \"github.com/kako-jun/cdand/cdand-core\"\r\n\r\ncdand.Exec(\"subdir/subsubdir\", \"ls\", \"-alF\")\r\n```\r\n\r\n### Contributing\r\n\r\nI'm always looking for new contributing.\r\n\r\n- Adding features\r\n- Overwriting with better code\r\n- Finding (and fixing) bugs\r\n- Improving translation\r\n\r\n　\r\n\r\n## Authors\r\n\r\nkako-jun\r\n\r\n- :octocat: https://github.com/kako-jun\r\n- :notebook: https://gist.github.com/kako-jun\r\n- :house: https://llll-ll.com\r\n- :bird: https://twitter.com/kako_jun_42\r\n\r\n### :lemon: Lemonade stand\r\n\r\nYour donation turns into my cat's food.\r\n\r\nPlease open the following link, and enter `kako.hydrajin@gmail.com` into 'To' box.\r\n\r\n　**[:hearts: Donate](https://www.amazon.com/gp/product/B004LLIKVU/ref=as_li_tl?ie=UTF8\u0026tag=llll-ll-20\u0026camp=1789\u0026creative=9325\u0026linkCode=as2\u0026creativeASIN=B004LLIKVU\u0026linkId=40379992af00bad986f2d38a4f0cf745)**\r\n\r\n- Tell me your impressions in 'Message' box.\r\n- The sender is hidden.\r\n- From $1\r\n\r\n　\r\n\r\n## License\r\n\r\nThis project is licensed under the MIT License.\r\n\r\nSee the [LICENSE](https://github.com/kako-jun/cdand/blob/master/LICENSE) file for details.\r\n\r\n## Acknowledgments\r\n\r\n- [Go](https://golang.org/)\r\n- and you\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkako-jun%2Fcdand","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkako-jun%2Fcdand","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkako-jun%2Fcdand/lists"}