Installation
You can install `ogito` using either Cargo or npm. Make sure
you have the required package manager installed.
Run the following command in your terminal:
cargo install ogito
Run the following command in your terminal:
npm install -g ogito
Usage
Here are examples of how to use `ogito` from the command
line.
ogito new
Create a new project from a specified template or Git
repository.
By default, `ogito new` uses Git mode. If you specify
-m tar, it will use tar mode which
automatically caches the downloaded archives.
Important Note:
When creating a new project,
ogito now automatically updates
the name field in
package.json files to match the specified
directory name, but only for projects that contain a
package.json file. For other configuration
files or projects without package.json, you
may still need to manually update relevant fields.
| Command |
Description |
ogito new <repository URL | template name>
|
Basic usage to clone a repository using Git
mode or create a project from a locally
cached template.
|
ogito new https://github.com/user/repo -d dirname
|
Clone into a specific directory named
`dirname`.
|
ogito new https://github.com/user/repo -f
|
Force clone, overwriting the destination if
it exists.
|
ogito new https://github.com/user/repo --branch=dev
|
Clone a specific branch, in this case `dev`.
|
ogito new https://github.com/user/repo -m tar
|
Use tar mode to clone (automatically
cached).
|
ogito new https://github.com/user/repo --keep-history
|
Keep the git history of the repository.
|
ogito new my-template
|
Create a new project from a locally cached
template named `my-template`.
|
ogito add
Add a new template from a Git repository to the local
cache.
| Command |
Description |
ogito add <repository URL>
|
Add a template from a Git repository. The
template name will be derived from the URL
(e.g., owner/repo).
|
ogito add <repository URL> --name <name>
|
Add a template with a custom name.
|
ogito add <repository URL> --description <description>
|
Add a template with a description.
|
ogito add <repository URL> --alias <alias>
|
Add a template with an alias.
|
ogito add <repository URL> --force
|
Overwrite an existing template with the same
name.
|
ogito list
List all available templates in the local cache.
| Command |
Description |
ogito list
|
Display a table of all cached templates,
showing their name, description, and alias.
|
ogito update
Update one or more templates.
| Command |
Description |
ogito update <name1> <name2>
|
Update one or more specific templates by
name.
|
ogito update --all
|
Update all cached templates.
|
ogito update <name> -f
|
Force update the template(s) without
confirmation.
|
ogito update <name> --dry-run
|
Simulate update and show what would be
changed without changing any files.
|
ogito remove
Remove one or more templates.
| Command |
Description |
ogito remove <name1> <name2>
|
Remove one or more specific templates by
name.
|
ogito remove --all
|
Remove all cached templates.
|
ogito remove <name> -f
|
Force remove the template(s) without
confirmation.
|
ogito remove <name> --dry-run
|
Simulate removal and show what would be
deleted without changing any files.
|
ogito clear
Clear the local template cache.
| Command |
Description |
ogito clear
|
Clear the cache after confirmation.
|
ogito clear -f
|
Force clear the cache without confirmation.
|
ogito clear --dry-run
|
Show what would be removed without deleting
anything.
|
ogito clear -v
|
Show detailed output for each item removed.
|