<htmllang="en"><head><metacharset="UTF-8"/><metaname="viewport"content="width=device-width, initial-scale=1.0"/><title>Home · PkgTemplates.jl</title><linkhref="https://cdnjs.cloudflare.com/ajax/libs/normalize/4.2.0/normalize.min.css"rel="stylesheet"type="text/css"/><linkhref="https://fonts.googleapis.com/css?family=Lato|Roboto+Mono"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css"rel="stylesheet"type="text/css"/><linkhref="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/default.min.css"rel="stylesheet"type="text/css"/><script>documenterBaseURL="."</script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.2.0/require.min.js"data-main="assets/documenter.js"></script><scriptsrc="siteinfo.js"></script><scriptsrc="../versions.js"></script><linkhref="assets/documenter.css"rel="stylesheet"type="text/css"/></head><body><navclass="toc"><h1>PkgTemplates.jl</h1><selectid="version-selector"onChange="window.location.href=this.value"style="visibility: hidden"></select><formclass="search"id="search-form"action="search.html"><inputid="search-query"name="q"type="text"placeholder="Search docs"/></form><ul><liclass="current"><aclass="toctext"href="index.html">Home</a><ulclass="internal"><li><aclass="toctext"href="#Installation-1">Installation</a></li><li><aclass="toctext"href="#Usage-1">Usage</a></li><li><aclass="toctext"href="#Comparison-to-PkgDev-1">Comparison to PkgDev</a></li><li><aclass="toctext"href="#Contributing-1">Contributing</a></li></ul></li><li><aclass="toctext"href="pages/package_generation.html">Package Generation</a></li><li><aclass="toctext"href="pages/plugins.html">Plugins</a></li><li><aclass="toctext"href="pages/plugin_development.html">Plugin Development</a></li><li><aclass="toctext"href="pages/licenses.html">Licenses</a></li><li><aclass="toctext"href="pages/index.html">Index</a></li></ul></nav><articleid="docs"><header><nav><ul><li><ahref="index.html">Home</a></li></ul><aclass="edit-page"href="https://github.com/invenia/PkgTemplates.jl/blob/master/docs/src/index.md#L"><spanclass="fa"></span> Edit on GitHub</a></nav><hr/><divid="topbar"><span>Home</span><aclass="fa fa-bars"href="#"></a></div></header><h1><aclass="nav-anchor"id="PkgTemplates-1"href="#PkgTemplates-1">PkgTemplates</a></h1><p><ahref="https://invenia.github.io/PkgTemplates.jl/stable"><imgsrc="https://img.shields.io/badge/docs-stable-blue.svg"alt="Stable"/></a><ahref="https://invenia.github.io/PkgTemplates.jl/latest"><imgsrc="https://img.shields.io/badge/docs-latest-blue.svg"alt="Latest"/></a><ahref="https://travis-ci.org/invenia/PkgTemplates.jl"><imgsrc="https://travis-ci.org/invenia/PkgTemplates.jl.svg?branch=master"alt="Build Status"/></a><ahref="https://ci.appveyor.com/project/christopher-dG/pkgtemplates-jl/branch/master"><imgsrc="https://ci.appveyor.com/api/projects/status/r24xamruqlm88uti/branch/master?svg=true"alt="Build Status"/></a><ahref="https://codecov.io/gh/invenia/PkgTemplates.jl"><imgsrc="https://codecov.io/gh/invenia/PkgTemplates.jl/branch/master/graph/badge.svg"alt="CodeCov"/></a></p><p><strong>PkgTemplates is a Julia package for creating new Julia packages in an easy, repeatable, and customizable way.</strong></p><h2><aclass="nav-anchor"id="Installation-1"href="#Installation-1">Installation</a></h2><pre><codeclass="language-julia">(v1.0) pkg> add PkgTemplates</code></pre><h2><aclass="nav-anchor"id="Usage-1"href="#Usage-1">Usage</a></h2><p>The simplest template requires no arguments.</p><pre><codeclass="language-julia-repl">julia> using PkgTemplates
julia> t = Template()
Template:
→ User: travis
→ Host: github.com
→ License: MIT (Travis 2018)
→ Package directory: ~/.julia/dev
→ Minimum Julia version: v1.0
→ SSH remote: No
→ Plugins: None
julia> generate("MyPkg", t)
Generating project MyPkg:
/home/travis/.julia/dev/MyPkg/Project.toml
/home/travis/.julia/dev/MyPkg/src/MyPkg.jl
[ Info: Initialized git repo at /home/travis/.julia/dev/MyPkg
[ Info: Set remote origin to https://github.com/travis/MyPkg.jl
test/runtests.jl</code></pre><p>However, we can also configure a number of keyword arguments to <ahref="pages/package_generation.html#PkgTemplates.Template"><code>Template</code></a>:</p><pre><codeclass="language-julia-repl">julia> using PkgTemplates
julia> t = Template(;
user="myusername",
license="MIT",
authors=["Chris de Graaf", "Invenia Technical Computing Corporation"],
dir=joinpath(homedir(), "code"),
julia_version=v"0.7",
ssh=true,
plugins=[
TravisCI(),
CodeCov(),
Coveralls(),
AppVeyor(),
GitHubPages(),
],
)
Template:
→ User: myusername
→ Host: github.com
→ License: MIT (Chris de Graaf, Invenia Technical Computing Corporation 2018)
test/runtests.jl</code></pre><p>If that looks like a lot of work, you can also create templates interactively with <ahref="pages/package_generation.html#PkgTemplates.interactive_template"><code>interactive_template</code></a>:</p><p><ahref="https://asciinema.org/a/31bZqW9u8h5RHpd7gtsemioRV"><imgsrc="https://asciinema.org/a/31bZqW9u8h5RHpd7gtsemioRV.png"alt="asciicast"/></a></p><p>And if that's <strong>still</strong> too much work for you, you can call <code>interactive_template</code> with <code>fast=true</code> to use default values for everything but username and plugin selection.</p><p>You can also use <ahref="pages/package_generation.html#PkgTemplates.generate_interactive"><code>generate_interactive</code></a> to interactively generate a template and then immediately use it to create a new package.</p><h2><aclass="nav-anchor"id="Comparison-to-PkgDev-1"href="#Comparison-to-PkgDev-1">Comparison to PkgDev</a></h2><p><code>PkgTemplates</code> is similar in functionality to <ahref="https://github.com/JuliaLang/PkgDev.jl"><code>PkgDev</code></a>'s <code>generate</code> function. However, <code>PkgTemplates</code> offers more customizability in templates and more extensibility via plugins. For the package registration and release management features that <code>PkgTemplates</code> doesn't include, you are encouraged to use <ahref="https://github.com/apps/attobot">AttoBot</a> instead.</p><h2><aclass="nav-anchor"id="Contributing-1"href="#Contributing-1">Contributing</a></h2><p>It's extremely easy to extend <code>PkgTemplates</code> with new plugins. To get started, check out the <ahref="https://invenia.github.io/PkgTemplates.jl/stable/pages/plugin_development.html">plugin development guide</a>.</p><footer><hr/><aclass="next"href="pages/package_generation.html"><spanclass="direction">Next</span><spanclass="title">Package Generation</span></a></footer></article></body></html>