https://github.com/ajhenry/goto
🪄 A cli tool to magically goto folders and clone github repos
https://github.com/ajhenry/goto
bash cd cli goto node typescript zsh
Last synced: about 2 months ago
JSON representation
🪄 A cli tool to magically goto folders and clone github repos
- Host: GitHub
- URL: https://github.com/ajhenry/goto
- Owner: ajhenry
- License: mit
- Created: 2022-07-15T01:58:13.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T18:49:48.000Z (over 1 year ago)
- Last Synced: 2025-03-06T05:49:46.397Z (about 2 months ago)
- Topics: bash, cd, cli, goto, node, typescript, zsh
- Language: TypeScript
- Homepage:
- Size: 1.15 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# goto
🪄 A cli tool to **magically** goto folders and clone github repos
[Getting started](#getting-started) •
[Installation](#installation) •
[Configuration](#configuration)## Getting Started
![]()
When you run goto for the first time, it will prompt for a default `dev` directory of your choice
After that it automatically jumps to folders and clones the github repo if needed
Some commands to get you started
```sh
# Jump to the dev directory
goto# Clone this repo and jump to the directory
goto ajhenry/goto# Add a new github org to the list of orgs to clone from with a single keyword
goto --owners --update# Update the default dev directory
goto --path --update# Jump to a directory and open in code
gotoc ajhenry/goto
```> `gotoc` is the same functionality with the added benefit of opening in vscode.
## Installation
> You will also need [the github cli](https://cli.github.com/) in order to list and clone repos
### _Step 1: Install goto_
```sh
npm i -g @ajhenry/goto
```### _Step 2: Add goto to your shell_
To start using goto, add it to your shell.
Add this to your configuration (usually `~/.zshrc` or `~/.bashrc`):
```sh
eval "$(goto-cli --init)"
```## How it works
You have to set a default dev directory like `~/dev` or `~/projects`.
After that, once you type in `goto project-name` it will first check if the directory exists.
If the directory does not exist, it will search github and clone the repo.
If that also fails, it will ask if you want to create it.
## Configuration
The following flags are available:
```sh
-> goto -h
USAGE
$ goto [PATH] [-l] [-p] [-u] [-d] [-i] [-v] [-o]FLAGS
-d, --debug Enable debug output
-i, --init Initializes the goto function for bash
-l, --list List all repos
-o, --owners Update the list of owners to search for repos from
-p, --path List the default dev directory
-u, --update Update the dev directory or GitHub owners
-v, --version Prints the version number
```## Developing
This setups a development environment for you
```sh
npm i
npm link
npm run dev# Now you can run the wrapper cli
goto-cli -v
```Any changes that you make will be available immediately via the wrapper
## Generating Pretty Terminal Output
Install these packages
```sh
brew install asciinema
npm i -g svg-term-cli
```Run these commands to generate the output
```sh
asciinema rec ~/.goto/test.json --overwrite
svg-term --in ~/.goto/test.json --out resources/terminal.svg --window
```## License
MIT