planter [source] [dir] [options]
Create a new project using a planter or public repo.
Args
[source]
The name of a planter or a public repo. planter uses degit under the hood, so any valid repo URL for degit works.
If the source is a local planter, the .gitignore or .planterignore will be respected (see add
).
[dir]
Directory of the new project.
Options
-f
, --force
Force the created directory to overwrite an existing one.
Examples
# create is the default command in planter
planter
# Interative mode will guide you through create
planter create
# Quickly create by passing a planter name and dir
planter create my-planter my-project
# Passing the source only will prompt you for dir
planter create my-planter
# Create using a repo directly
planter create user/repo
planter create github:user/repo
planter create git@github.com:user/repo
planter create https://github.com/user/repo
planter add <name> <location> [options]
Add a planter to your list.
Args
<name>
The name of the planter to use as a reference.
<location>
The repo URL or name.
Options
-L
, --local
Treat the location as a “local repo” instead of a remote repo.
By using the local option, planter allows the location to be a local folder rather than a remote repo. When running create
with a local planter, the .gitignore
or .planterignore
will be respected.
Read more about Local Planters.
Examples
# Add a planter using a remote repo
planter add my-planter user/repo
planter add my-planter github:user/repo
planter add my-planter git@github.com:user/repo
planter add my-planter https://github.com/user/repo
# Add a planter using a local repo
planter add my-planter ./path/to/my-local-dir -L
planter list [options]
List available planters.
Options
-a
, --alphanumeric
Sorts list of planters alphanumerically (ignores pinned). By default planters are sorted by add date and pinned planters are at the top (see pin
).
Examples
# Usage
planter list
# Output
* my-pinned-planter
- my-planter
- my-other-planter
planter edit <name> [options]
Edit or delete an existing planter.
Args
<name>
Name of the planter to edit.
Description
Options
-n
, --name
Edit the name of a planter.
-l
, --location
Edit the location of a planter.
-d
, --delete
Remove a planter from your list.
-f
, --force
Edit something… dangerously. (Force the edit without any prompts).
-R
, --remote
Set the location type to remote.
-L
, --local
Set the location type to local. (See add
for more information.)
Examples
# Use options to edit your planter
planter edit old-name -n new-name
planter edit old-name -n new-name -l user/new-repo
# Set planter location type to local
planter edit my-planter -L
planter info <name>
Prints all info about a planter in your list.
Args
<name>
Name of the planter to show info for.
Examples
# Usage
planter info my-planter
# Output
Name: my-planter
Location: user/repo-name
Type: Remote
Pinned: 1
Date Added: Aug 24, 2022 7:40:08 PM
planter pin <name> [position]
Pins a planter to the top of your list.
Args
<name>
Name of the planter to pin.
[position]
Specific position to set the planter at. (1 being the top of the list).
Defaults to 1.
Options
-u
, --unpin
Removes position from the planter.
Examples
# Pin to top
planter pin my-planter
# Pin to position 5
planter pin my-planter 5
If the position is greater than the number of planters is passed, the highest possible number will be used instead.
# Pin to the bottom-most position (assuming there are only 5 planters)
planter pin my-planter 100
# Output
my-planter pinned to position 5.