josefdolezal/xcman
`xcman` is an command line tool written in Swift for managing Xcode file templates and code snippets.
Install
<details open> <summary>Brew</summary>
$ brew tap josefdolezal/formulae
$ brew install xcman</details>
<details> <summary>Compiling from source</summary>
$ git clone https://github.com/josefdolezal/xcman.git
$ cd xcman
$ swift build</details>
Usage
xcman supports managing of both file templates and code snippets. These functions are namespaced using templates and snippets subcommands. Run the tool with --help option to see documentation.
Templates
Templates are managed using caching git repositories inside your home directory. For each installed group of templates, new folder is created inside Xcode templates directory. This new folder contains links to your fetched git folder.
Supported commands:
install
$ xcman templates install [--use-url] [--name <name>] <repo> Installs templates from given repository to Xcode. By default, given repository is interpreted as GitHub handle. If you would like to install from other source, use --use-url flag. Templates group name visible in Xcode may configured using --name option.
Examples:
$ xcman templates install --name "My Templates" me/my-templates
# Install templates from arbitrary url
$ xcman templates install --use-url https://gitlab.com/company/repo.gitlist
$ xcman templates listLists all installed templates groups.
remove
$ xcman templates remove <group>Removes given templates group from Xcode.
Snippets
Snippets are managed similary as file templates using repository cache inside your home directory. Xcode currently does not support structured format for snippets, so the file system structure is flat.
install
$ xcman snippets install [--use-url] <repo>Installs templates from given GitHub repository. By default, the repository argument is interpreted as GitHub handle. Use --use-url to install templates from arbitrary git repository.
Dependencies
This tool is build on top following dependencies:
- Commander, licensed under BSD 3-Clause
License
This repository is licensed under MIT.
Package Metadata
Repository: josefdolezal/xcman
Default branch: master
README: README.md