-
Notifications
You must be signed in to change notification settings - Fork 126
/
Copy pathcommands.njk
65 lines (58 loc) · 2.11 KB
/
commands.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
---
title: Commands
layout: layouts/doc.njk
---
{# Welcome :wave:. The content of this page is automatically generated based on Bearer's CLI help files.
They can be found here: https://github.com/Bearer/bearer/tree/main/pkg/commands
#}
{% set items = [bearer_scan, bearer_init, bearer_ignore_add, bearer_ignore_show, bearer_ignore_remove, bearer_ignore_migrate, bearer_version] %}
{% renderTemplate "md" %}
# Commands
Bearer CLI offers a number of commands to use and customize the CLI to your needs.
{% endrenderTemplate %}
<ul>
{% for item in items %}
<li>
<a href="#{{ item.name | trim | replace(" ", "_") }}">{{ item.name | trim}}</a>: {{item.synopsis}}
</li>
{% endfor %}
</ul>
{% for item in items %}
<h2 class="inline-block text-neutral-100 bg-code p-1 rounded-md leading-none font-mono" id="{{ item.name | trim | e | replace(" ", "_")}}">{{ item.name | trim | escape }}</h2>
<p>{{item.synopsis}}</p>
<pre class="language-bash"><code class="language-bash">{{item.usage | trim}}</code></pre>
<h3 id="{{item.name | trim}}-flags">Flags</h3>
<table class="table-auto">
<thead>
<tr>
<th>Name</th>
<th>Description</th>
<th>Default Value</th>
<th>Environment Variables<th>
</tr>
</thead>
<tbody>
{% for option in item.options -%}
<tr>
<td>
{% if option.shorthand %}
<code class="">-{{option.shorthand}}</code>, {% endif %}
<code class="">--{{option.name}}</code>
</td>
<td>{{option.usage}}</td>
<td>{{option.default_value}}</td>
<td>{{ option.environment_variables }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if item.example %}
<h3 id="{{item.name | trim}}-usage">Usage</h3>
<pre class="language-bash"><code class="language-bash">{{item.example}}</code></pre>
{% endif %}
{% if item.aliases %}
<h3 id="{{item.name | trim}}-aliases">Aliases</h3>
<p>In addition to the primary <code>{{ item.name | trim }}</code> command, you can also use <code>{{ item.aliases }}</code> in place of it.
</p>
{% endif %}
{% endfor %}