Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.

Commit b48b229

Browse files
authored
Merge pull request #156 from appwrite/fix-cli-docs
feat: update CLI docs
2 parents 3425201 + 531a466 commit b48b229

File tree

3 files changed

+22
-8
lines changed

3 files changed

+22
-8
lines changed

app/views/docs/command-line.phtml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,20 @@ appwrite client --debug // Prints your current configuration
324324
</code></pre>
325325
</div>
326326

327+
<div class="notice margin-bottom">
328+
<h3><a href="/docs/command-line#CIMode" id="CIMode">CI Mode</a></h3>
329+
330+
<p>The Appwrite CLI can also be used in a non-interactive mode. This is especially useful when you want to automate tasks on a CI Server. In order to enable CI mode on the CLI, you need to set your <b>project ID, endpoint and API Key</b> using</p>
331+
332+
<div class="ide margin-bottom" data-lang="bash" data-lang-label="CLI">
333+
<pre class="line-numbers"><code class="prism language-bash" data-prism>appwrite client --endpoint http://192.168.1.6/v1 --projectId YOUR_PROJECT_ID --key YOUR_API_KEY</code></pre>
334+
</div>
335+
336+
<p>When you set the global configuration parameters using the <b>client</b> service, they take precedence over the local configuration parameters in your <b>appwrite.json</b> thereby switching the CLI to non-interactive mode. </p>
337+
338+
<p>In this mode, the CLI can only interact with one project at a time. If you look closely, you'll also notice that we use an <b>API Key</b> to autenticate which means the CLI behaves like Appwrite's server SDK. You can learn more about API Keys in the <a href="/docs/getting-started-for-server#apiKey">Appwrite for Server</a> docs.</p>
339+
</div>
340+
327341
<h3><a href="/docs/command-line#help" id="help">Help</a></h3>
328342

329343
<p>If you get stuck anywhere, you can always use the <b>help</b> command to get the usage examples. All the examples are also available on the Appwrite API specs docs, and you can view them by switching the examples to the "Appwrite CLI" from the top dropdown.</p>

app/views/docs/database.phtml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ void main() async {
135135
</li>
136136
<li>
137137
<h3>Android</h3>
138-
<div class="ide" data-lang="android" data-lang-label="Android SDK">
139-
<pre class="line-numbers"><code class="prism language-android" data-prism>import androidx.appcompat.app.AppCompatActivity
138+
<div class="ide" data-lang="kotlin" data-lang-label="Android SDK">
139+
<pre class="line-numbers"><code class="prism language-kotlin" data-prism>import androidx.appcompat.app.AppCompatActivity
140140
import android.os.Bundle
141141
import kotlinx.coroutines.GlobalScope
142142
import kotlinx.coroutines.launch
@@ -238,8 +238,8 @@ void main() async {
238238
</li>
239239
<li>
240240
<h3>Android</h3>
241-
<div class="ide" data-lang="android" data-lang-label="Android SDK">
242-
<pre class="line-numbers"><code class="prism language-android" data-prism>import androidx.appcompat.app.AppCompatActivity
241+
<div class="ide" data-lang="kotlin" data-lang-label="Android SDK">
242+
<pre class="line-numbers"><code class="prism language-kotlin" data-prism>import androidx.appcompat.app.AppCompatActivity
243243
import android.os.Bundle
244244
import kotlinx.coroutines.GlobalScope
245245
import kotlinx.coroutines.launch
@@ -372,8 +372,8 @@ void main() async {
372372
</li>
373373
<li>
374374
<h3>Android</h3>
375-
<div class="ide" data-lang="android" data-lang-label="Android SDK">
376-
<pre class="line-numbers"><code class="prism language-android" data-prism>import androidx.appcompat.app.AppCompatActivity
375+
<div class="ide" data-lang="kotlin" data-lang-label="Android SDK">
376+
<pre class="line-numbers"><code class="prism language-kotlin" data-prism>import androidx.appcompat.app.AppCompatActivity
377377
import android.os.Bundle
378378
import kotlinx.coroutines.GlobalScope
379379
import kotlinx.coroutines.launch

app/views/docs/storage.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ void main() { // Init SDK
122122
</li>
123123
<li>
124124
<h3>Android</h3>
125-
<div class="ide" data-lang="android" data-lang-label="Android SDK">
126-
<pre class="line-numbers"><code class="prism language-android" data-prism>import androidx.appcompat.app.AppCompatActivity
125+
<div class="ide" data-lang="kotlin" data-lang-label="Android SDK">
126+
<pre class="line-numbers"><code class="prism language-kotlin" data-prism>import androidx.appcompat.app.AppCompatActivity
127127
import android.os.Bundle
128128
import kotlinx.coroutines.GlobalScope
129129
import kotlinx.coroutines.launch

0 commit comments

Comments
 (0)