Statistics
| Branch: | Tag: | Revision:

root / docs / usage.rst @ 7ae842c2

History | View | Annotate | Download (22.9 kB)

1
Usage
2
=====
3

    
4
Kamaki offers command line interfaces that implement specific command specifications. A detailed list of the command specifications can be found in `Commands <commands.html>`_ section. This guide covers the generic usage of both interfaces.
5

    
6
What's more, kamaki offers a clients API that allows the development of external applications for synnefo. The clients API is listed in the `Clients lib <developers/code.html#the-clients-api>`_ section. The recommended method of utilizing this API is explained in the present.
7

    
8
Quick Setup
9
-----------
10

    
11
Kamaki interfaces rely on a list of configuration options. In the initial state, kamaki is configured to communicate with the Okeanos IaaS. A detailed guide for setting up kamaki can be found in the `Setup <setup.html>`_ section.
12

    
13
It is essential for users to get a configuration token (okeanos.grnet.gr users go `here <https://accounts.okeanos.grnet.gr/im/>`_) and provide it to kamaki:
14

    
15
.. code-block:: console
16
    :emphasize-lines: 1
17

    
18
    Example 1.1: Set user token to myt0k3n==
19

    
20
    $ kamaki set token myt0k3n==
21

    
22
Shell vs one-command
23
--------------------
24
Kamaki users can access synnefo services through either the interactive shell or the one-command behaviors. In practice, both systems rely on the same command set implementations and API clients, with identical responses and error messages. Still, there are some differences.
25

    
26
In favor of interactive shell behavior:
27

    
28
* tab completion for commands
29
* session history with "up" / "down" keys
30
* shorter commands with command context switching
31

    
32
In favor of one-command behavior:
33

    
34
* can be used along with advanced shell features (pipelines, redirection, etc.)
35
* can be used in shell scripts
36
* prints debug and verbose messages if needed
37

    
38
Run as shell
39
^^^^^^^^^^^^
40
To use kamaki as a shell, run:
41

    
42
* without any parameters or arguments
43

    
44
.. code-block:: console
45
    :emphasize-lines: 1
46

    
47
    Example 2.2.1: Run kamaki shell
48

    
49
    $ kamaki
50

    
51
* with any kind of '-' prefixed arguments, except '-h', '--help'.
52

    
53
.. code-block:: console
54
    :emphasize-lines: 1
55

    
56
    Example 2.2.2: Run kamaki shell with custom configuration file
57

    
58
    $ kamaki --config myconfig.file
59

    
60

    
61
Run as one-command
62
^^^^^^^^^^^^^^^^^^
63
To use kamaki as an one-command tool, run:
64

    
65
* with the '-h' or '--help' arguments (help for kamaki one-command)
66

    
67
.. code-block:: console
68
    :emphasize-lines: 1
69

    
70
    Example 2.3.1: Kamaki help
71

    
72
    $kamaki -h
73

    
74
* with one or more command parameters:
75

    
76
.. code-block:: console
77
    :emphasize-lines: 1
78

    
79
    Example 2.3.2: List VMs managed by user
80

    
81
    $ kamaki server list
82

    
83
One-command interface
84
---------------------
85

    
86
Kamaki usage as a one-command tool is detailed in this section
87

    
88
Using help
89
^^^^^^^^^^
90

    
91
Kamaki help is used to see available commands, with description, syntax and their corresponding optional arguments.
92

    
93
To see the command groups, users should use -h or --help like in example 1.3.1. In the same way, help information for command groups and commands is printed. In the following examples, the help messages of kamaki, of a command group (server) and of a command in that group (list) are shown.
94

    
95
.. code-block:: console
96
    :emphasize-lines: 1
97

    
98
    Example 3.1.1: kamaki help shows available parameters and command groups
99

    
100

    
101
    $ kamaki -h
102
    usage: kamaki <cmd_group> [<cmd_subbroup> ...] <cmd>
103
        [-s] [-V] [-i] [--config CONFIG] [-o OPTIONS] [-h]
104

    
105
    optional arguments:
106
      -v, --verbose         More info at response
107
      -s, --silent          Do not output anything
108
      -V, --version         Print current version
109
      -d, --debug           Include debug output
110
      -i, --include         Include protocol headers in the output
111
      --config CONFIG       Path to configuration file
112
      -o OPTIONS, --options OPTIONS
113
                            Override a config value
114
      -h, --help            Show help message
115

    
116
    Options:
117
     - - - -
118
    astakos:  Astakos API commands
119
    config :  Configuration commands
120
    flavor :  Compute/Cyclades API flavor commands
121
    history:  Command history
122
    image  :  Compute/Cyclades or Plankton API image commands
123
    network:  Compute/Cyclades API network commands
124
    server :  Compute/Cyclades API server commands
125
    store  :  Pithos+ storage commands
126

    
127
.. code-block:: console
128
    :emphasize-lines: 1
129

    
130
    Example 3.1.2: Cyclades help contains all first-level commands of Cyclades command group
131

    
132

    
133
    $ kamaki server -h
134
    usage: kamaki server <...> [-v] [-s] [-V] [-d] [-i] [--config CONFIG]
135
                               [-o OPTIONS] [-h]
136

    
137
    optional arguments:
138
      -v, --verbose         More info at response
139
      -s, --silent          Do not output anything
140
      -V, --version         Print current version
141
      -d, --debug           Include debug output
142
      -i, --include         Include protocol headers in the output
143
      --config CONFIG       Path to configuration file
144
      -o OPTIONS, --options OPTIONS
145
                            Override a config value
146
      -h, --help            Show help message
147

    
148
    Options:
149
     - - - -
150
    addmeta :  Add server metadata
151
    addr    :  List a server's nic address
152
    console :  Get a VNC console
153
    create  :  Create a server
154
    delete  :  Delete a server
155
    delmeta :  Delete server metadata
156
    firewall:  Set the server's firewall profile
157
    info    :  Get server details
158
    list    :  List servers
159
    meta    :  Get a server's metadata
160
    reboot  :  Reboot a server
161
    rename  :  Update a server's name
162
    setmeta :  Update server's metadata
163
    shutdown:  Shutdown a server
164
    start   :  Start a server
165
    stats   :  Get server statistics
166
    wait    :  Wait for server to finish [BUILD, STOPPED, REBOOT, ACTIVE]
167

    
168
.. code-block:: console
169
    :emphasize-lines: 1
170

    
171
    Example 3.1.3: Help for command "server list" with syntax, description and available user options
172

    
173

    
174
    $ kamaki server list -h
175
    usage: kamaki server list [-V] [-i] [--config CONFIG] [-h] [-l]
176

    
177
    List servers
178

    
179
    optional arguments:
180
      -v, --verbose         More info at response
181
      -s, --silent          Do not output anything
182
      -V, --version         Print current version
183
      -d, --debug           Include debug output
184
      -i, --include         Include protocol headers in the output
185
      --config CONFIG       Path to configuration file
186
      -o OPTIONS, --options OPTIONS
187
                            Override a config value
188
      -h, --help            Show help message
189
      -l                    show detailed output
190

    
191
.. _using-history-ref:
192

    
193
Using history
194
^^^^^^^^^^^^^
195

    
196
Kamaki command history is stored in a file at user home (".kamaki.history" by default). To set a custom history file path users must set the history.file config option (see `available config options <setup.html#editing-options>`_).
197

    
198
Every syntactically correct command is appended at the end of that file. In order to see how to use history, use the kamaki help system:
199

    
200
.. code-block:: console
201
    :emphasize-lines: 1
202

    
203
    Example 3.2.1: Available history options
204

    
205

    
206
    $ kamaki history -h
207
    ...
208
    clean:  Clean up history
209
    show :  Show history
210

    
211
The following example showcases how to use history in kamaki
212

    
213
.. code-block:: console
214
    :emphasize-lines: 1
215

    
216
    Example 3.2.2: Clean up everything, run a kamaki command, show full and filtered history
217
    
218

    
219
    $ kamaki history clean
220
    $ kamaki server list
221
    ...
222
    $ kamaki history show
223
    1.  kamaki server list
224
    2.  kamaki history show
225
    $ kamaki history show --match server
226
    1. kamaki server list
227
    3. kamaki history show --match server
228

    
229
Debug
230
^^^^^
231

    
232
In case of errors, kamaki in debug mode shows useful debug information, like the stack trace, instead of a user-friendly error message. Kamaki also suppresses various warning messages that are also allowed in debug mode.
233

    
234
To run kamaki in debug mode use the -d or --debug option
235

    
236
Verbose
237
"""""""
238

    
239
Most kamaki commands are translated into http requests. Kamaki clients API translated the semantics to REST and handles the response. Users who need to have access to these commands can use the verbose mode that presents the HTTP Request details as well as the full server response.
240

    
241
To run kamaki in verbose mode use the -v or --verbose option
242

    
243
One-command features
244
^^^^^^^^^^^^^^^^^^^^
245

    
246
Kamaki commands can be used along with advanced shell features.
247

    
248
.. code-block:: console
249
    :emphasize-lines: 1
250

    
251
    Example 3.4.1: Print username for token us3rt0k3n== using grep
252
    
253

    
254
    $ kamaki astakos authenticate -o token=us3rt0k3n== | grep userame
255
    userame        : user@synnefo.org
256

    
257
The -o argument can be used to override temporarily various (set or unset) options. In one command, all -o options are forgotten just after the command had been completed, and the previous settings are restored (the configuration file is not modified).
258

    
259
The astakos-authenticate command in example 3.4.1 run against an explicitly provided token, which temporarily overrode the token provided in the configuration file.
260

    
261
Interactive shell
262
-----------------
263

    
264
Kamaki interactive shell is detailed in this section
265

    
266
Command Contexts
267
^^^^^^^^^^^^^^^^
268

    
269
The kamaki interactive shell implements the notion of command contexts. Each command group is also a context where the users can **enter** by typing the group name. If the context switch is successful, the kamaki shell prompt changes to present the new context ("store" in example 4.1.1).
270

    
271
.. code-block:: console
272
    :emphasize-lines: 1
273

    
274
    Example 4.1.1: Enter store commands context / group
275

    
276

    
277
    $ kamaki
278
    [kamaki]:store
279
    [store]:
280

    
281
Type **exit** or **ctrl-D** to exit a context and return to the context of origin. If already at the top context (kamaki), an exit is equivalent to exiting the program.
282

    
283
.. code-block:: console
284
    :emphasize-lines: 1
285

    
286
    Example 4.1.2: Exit store context and then exit kamaki
287

    
288
    [store]: exit
289
    [kamaki]: exit
290
    $
291

    
292
A user might **browse** through different contexts during one session.
293

    
294
.. code-block:: console
295
    :emphasize-lines: 1
296

    
297
    Example 4.1.3: Execute list command in different contexts
298

    
299
    $ kamaki
300
    [kamaki]:config
301
    [config]:list
302
    ... (configuration options listing) ...
303
    [config]:exit
304
    [kamaki]:store
305
    [store]:list
306
    ... (storage containers listing) ...
307
    [store]:exit
308
    [kamaki]:server
309
    [server]:list
310
    ... (VMs listing) ...
311
    [server]: exit
312
    [kamaki]:
313

    
314
Users have the option to avoid switching between contexts: all commands can run from the **top context**. As a result, examples 4.1.3 and 4.1.4 are equivalent.
315

    
316
.. code-block:: console
317
    :emphasize-lines: 1
318

    
319
    Example 4.1.4: Execute different "list" commands from top context
320

    
321

    
322
    [kamaki]:config list
323
    ... (configuration options listing) ...
324
    [kamaki]:store list
325
    ... (storage container listing) ...
326
    [kamaki]:server list
327
    ... (VMs listing) ...
328
    [kamaki]:
329

    
330
Using Help
331
^^^^^^^^^^
332

    
333
There are two help mechanisms: a context-level and a command-level.
334

    
335
**Context-level help** lists the available commands in a context and can also offer a short description for each command.
336

    
337
Context-level help syntax::
338

    
339
    * Show available commands in current context *
340
    [context]:help
341
    [context]:?
342

    
343
    * Show help for command cmd *
344
    [context]:help cmd
345
    [context]:?cmd
346

    
347
The context-level help results change from context to context
348

    
349
.. code-block:: console
350
    :emphasize-lines: 1
351

    
352
    Example 4.2.1: Get available commands, pick a context and get help there as well
353

    
354

    
355
    [kamaki]:help
356

    
357
    kamaki commands:
358
    ================
359
    astakos  config  flavor  history  image  network  server  store
360

    
361
    interactive shell commands:
362
    ===========================
363
    exit  help  shell
364

    
365
    [kamaki]:?config
366
    Configuration commands (config -h for more options)
367

    
368
    [kamaki]:config
369

    
370
    [config]:?
371

    
372
    config commands:
373
    ================
374
    delete  get  list  set
375

    
376
    interactive shell commands:
377
    ===========================
378
    exit  help  shell
379

    
380
    [config]:help set
381
    Set a configuration option (set -h for more options)
382

    
383
In context-level, there is a distinction between kamaki-commands and interactive shell commands. The former are available in one-command mode and are related to the cloud client setup and use, while the later are context-shell functions.
384

    
385
**Command-level help** prints the syntax, arguments and description of a specific (terminal) command
386

    
387
Command-level help syntax::
388

    
389
    * Get help for command cmd1 cmd2 ... cmdN *
390
    [context]:cmd1 cmd2 ... cmdN -h
391
    <syntax>
392

    
393
    <description>
394

    
395
    <arguments and possible extensions>
396

    
397
Command-level help mechanism is exactly the same as the one used in one-command mode. For example, it is invoked by using the -h or --help parameter at any point.
398

    
399
.. code-block:: console
400
    :emphasize-lines: 1
401

    
402
    Example 4.2.2: Get command-level help for config and config-set
403

    
404

    
405
    [kamaki]:config --help
406
    config: Configuration commands
407
    delete:  Delete a configuration option (and use the default value)
408
    get   :  Show a configuration option
409
    list  :  List configuration options
410
    set   :  Set a configuration option
411

    
412
    [kamaki]:config
413

    
414
    [config]:set -h
415
    usage: set <option> <value> [-v] [-d] [-h] [-i] [--config CONFIG] [-s]
416

    
417
    Set a configuration option
418

    
419
    optional arguments:
420
      -v, --verbose    More info at response
421
      -d, --debug      Include debug output
422
      -h, --help       Show help message
423
      -i, --include    Include protocol headers in the output
424
      --config CONFIG  Path to configuration file
425
      -s, --silent     Do not output anything
426

    
427
There are many ways of producing a help message, as shown in example 4.2.3
428

    
429
.. code-block:: console
430
    :emphasize-lines: 1
431

    
432
    Example 4.2.3: Equivalent calls of command-level help for config-set
433

    
434

    
435
    [config]:set -h
436
    [config]:set -help
437
    [kamaki]:config set -h
438
    [kamaki]:config set --help
439
    [store]:/config set -h
440
    [server]:/config set --help
441

    
442
.. _accessing-top-level-commands-ref:
443

    
444
Accessing top-level commands
445
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
446

    
447
When working in a context, it is often useful to access other contexts or top-level commands. Kamaki offers access to top-level commands by using the / prefix, as shown bellow::
448

    
449
    * access a command "anothercontext cmd1 cmd2 ... cmdN"
450
    [context]:/anothercontext cmd1 cmd2 ... cmdN
451

    
452
An example (4.3.1) that showcases how top-level access improves user experience is the creation of a VM. A VM is created with the command server-create. This command is called with three parameters:
453

    
454
* the name of the new VM
455
* the flavor id
456
* the image id
457

    
458
It is often the case that a user who works in the context command, needs to create a new VM, but doesn't know the flavor or image id of preference. Therefore, it is necessary to list all available flavors (flavor-list) or images (image-list. Both commands belong to different contexts.
459

    
460
.. code-block:: console
461
    :emphasize-lines: 1
462

    
463
    Example 4.3.1: Create a VM from server context
464

    
465
    [server]:create -h
466
    create <name> <flavor id> <image id> ...
467
    ...
468
    
469
    [server]:/flavor list
470
    ...
471
    43 AFLAVOR
472
        SNF:disk_template:  drbd
473
        cpu              :  4
474
        disk             :  10
475
        ram              :  2048
476
    
477
    [server]:/image list
478
    1580deb4-edb3-7a246c4c0528 (Ubuntu Desktop)
479
    18a82962-43eb-8f8880af89d7 (Windows 7)
480
    531aa018-9a40-a4bfe6a0caff (Windows XP)
481
    6aa6eafd-dccb-67fe2bdde87e (Debian Desktop)
482
    
483
    [server]:create 'my debian' 43 6aa6eafd-dccb-67fe2bdde87e
484
    ...
485

    
486
An other example (4.3.2) showcases how to acquire and modify configuration settings from a different context. In this scenario, the user token expires at server side while the user is working. When that happens, the system responds with an *(401) UNAUTHORIZED* message. The user can acquire a new token (with a browser) which has to be set to kamaki.
487

    
488
.. code-block:: console
489
    :emphasize-lines: 1
490

    
491
    Example 4.3.2: Set a new token from store context
492

    
493

    
494
    [store]:list
495
    (401) UNAUTHORIZED Access denied
496

    
497
    [store]:/astakos authenticate
498
    (401) UNAUTHORIZED Invalid X-Auth-Token
499

    
500
    [store]:/config get token
501
    my3xp1r3dt0k3n==
502

    
503
    [store]:/config set token myfr35ht0k3n==
504

    
505
    [store]:/config get token
506
    myfr35ht0k3n==
507

    
508
    [store]:list
509
    1.  pithos (10MB, 2 objects)
510
    2.  trash (0B, 0 objects)
511

    
512
.. note:: actual kamaki error messages are more helpful and descriptive.
513

    
514
The following example compares some equivalent calls that run *astakos-authenticate* after a *store-list* 401 failure.
515

    
516
.. code-block:: console
517
    :emphasize-lines: 1,3,10,17,26
518

    
519
    Example 4.3.3: Equivalent astakos-authenticate calls after a store-list 401 failure
520

    
521
    * without kamaki interactive shell *
522
    $ kamaki store list
523
    (401) UNAUTHORIZED Access denied
524
    $ kamaki astakos authenticate
525
    ...
526
    $
527

    
528
    * from top-level context *
529
    [kamaki]:store list
530
    (401) UNAUTHORIZED Access denied
531
    [kamaki]:astakos authenticate
532
    ...
533
    [kamaki]
534

    
535
    * maximum typing *
536
    [store]:list
537
    (401) UNAUTHORIZED Access denied
538
    [store]:exit
539
    [kamaki]:astakos
540
    [astakos]:authenticate
541
    ...
542
    [astakos]:
543

    
544
    * minimum typing *
545
    [store]: list
546
    (401) UNAUTHORIZED Access denied
547
    [store]:/astakos authenticate
548
    ...
549
    [store]:
550

    
551
.. hint:: To exit kamaki shell while in a context, try */exit*
552

    
553
Using config
554
^^^^^^^^^^^^
555

    
556
The configuration mechanism of kamaki is detailed at the `setup section <setup.html>`_ and it is common for both interaction modes. In specific, the configuration mechanism is implemented as a command group, namely *config*. Using the config commands is as straightforward as any other kamaki commands.
557

    
558
It is often useful to set, delete or update a value. This can be managed either inside the config context or from any command context by using the / detour.
559

    
560
.. Note:: config updates in kamaki shell persist even after the session is over. All setting changes affects the physical kamaki config file (automatically created, if not set manually)
561

    
562
In example 4.4.1 the user is going to work with only one storage container. The store commands use the container:path syntax, but if the user could set a container as a default, the container name could be omitted in most cases. This is possible by setting a store.container setting.
563

    
564
.. code-block:: console
565
    :emphasize-lines: 1
566

    
567
    Example 4.4.1: Set default storage container
568

    
569

    
570
    [store]:list
571
    1.  mycontainer (32MB, 2 objects)
572
    2.  pithos (0B, 0 objects)
573
    3.  trash (2MB, 1 objects)
574

    
575
    [store]:list mycontainer
576
    1.  D mydir/
577
    2.  20M mydir/rndm_local.file
578
    
579
    [store]:/config set store.container mycontainer
580

    
581
    [store]: list
582
    1.  D mydir/
583
    2.  20M mydir/rndm_local.file
584

    
585
After a while, the user needs to work with multiple containers, therefore a default container is not longer needed. The store.container setting can be deleted, as shown in example 4.4.2 .
586

    
587
.. code-block:: console
588
    :emphasize-lines: 1
589

    
590
    Example 4.4.2: Delete a setting option
591

    
592

    
593
    [store]:/config delete store.container
594

    
595
    [store]:list
596
    1.  mycontainer (32MB, 2 objects)
597
    2.  pithos (0B, 0 objects)
598
    3.  trash (2MB, 1 objects)
599

    
600
Using history
601
^^^^^^^^^^^^^
602

    
603
There are two history modes: session and permanent. Session history keeps record of all actions in a kamaki shell session, while permanent history appends all commands to an accessible history file.
604

    
605
Session history is only available in interactive shell mode. Users can iterate through past commands in the same session by with the *up* and *down* keys. Session history is not stored, although syntactically correct commands are recorded through the permanent history mechanism
606

    
607
Permanent history is implemented as a command group and is common to both the one-command and shell interfaces. In specific, every syntactically correct command is appended in a history file (configured as *history.file* in settings, see `setup section <setup.html>`_ for details). Commands executed in one-command mode are mixed with the ones run in kamaki shell (also see :ref:`using-history-ref` section on this guide).
608

    
609
Scripting
610
^^^^^^^^^
611

    
612
Since version 6.2, the history-run feature allows the sequential execution of previously run kamaki commands in kamaki shell.
613

    
614
The following kamaki sequence copies and downloads a file from mycontainer1, uploads it to mycontainer2, then undo the proccess and repeats it with history-run
615

    
616
.. code-block:: console
617
    :emphasize-lines: 1,12,19,32
618

    
619
    * Download mycontainer1:myfile and upload it to mycontainer2:myfile
620
    [kamaki]: store
621

    
622
    [store]: copy mycontainer1:somefile mycontainer1:myfile
623

    
624
    [store]: download mycontainer1:myfile mylocalfile
625
    Download completed
626

    
627
    [store]: upload mylocalfile mycontainer2:myfile
628
    Upload completed
629

    
630
    * undo the process *
631
    [store]: !rm mylocalfile
632

    
633
    [store]: delete mycontainer1:myfile
634
 
635
    [store]: delete mycontainer2:myfile
636

    
637
    * check history entries *
638
    [store]: exit
639

    
640
    [kamaki]: history
641

    
642
    [history]: show
643
    1.  store
644
    2.  store copy mycontainer1:somefile mycontainer1:myfile
645
    3.  store download mycontainer1:myfile mylocalfile
646
    4.  store upload mylocalfile mycontainer2:myfile
647
    5.  history
648
    6.  history show
649

    
650
    *repeat the process *
651
    [history]: run 2-4
652
    store copy mycontainer1:somefile mycontainer1:myfile
653
    store download mycontainer1:myfile mylocalfile
654
    Download completed
655
    store upload mylocalfile mycontainer2:myfile
656
    Upload completed
657

    
658
The above strategy is still very primitive. Users are advised to take advantage of their os shell scripting capabilities and combine them with kamaki one-command for powerful scripting. Still, the history-run functionality might prove handy for kamaki shell users.
659

    
660
Tab completion
661
^^^^^^^^^^^^^^
662

    
663
Kamaki shell features tab completion for the first level of command terms of the current context. Tab completion pool changes dynamically when the context is switched. Currently, tab completion is not supported when the / detour is used (see :ref:`accessing-top-level-commands-ref` ).
664

    
665
OS Shell integration
666
^^^^^^^^^^^^^^^^^^^^
667

    
668
Kamaki shell features the ability to execute OS-shell commands from any context. This can be achieved by typing *!* or *shell*::
669

    
670
    [kamaki_context]:!<OS shell command>
671
    ... OS shell command output ...
672

    
673
    [kamaki_context]:shell <OS shell command>
674
    ... OS shell command output ...
675

    
676
.. code-block:: console
677
    :emphasize-lines: 1
678

    
679
    Example 4.7.1: Run unix-style shell commands from kamaki shell
680

    
681

    
682
    [kamaki]:!ls -al
683
    total 16
684
    drwxrwxr-x 2 username username 4096 Nov 27 16:47 .
685
    drwxrwxr-x 7 username username 4096 Nov 27 16:47 ..
686
    -rw-rw-r-- 1 username username 8063 Jun 28 14:48 kamaki-logo.png
687

    
688
    [kamaki]:shell cp kamaki-logo.png logo-copy.png
689

    
690
    [kamaki]:shell ls -al
691
    total 24
692
    drwxrwxr-x 2 username username 4096 Nov 27 16:47 .
693
    drwxrwxr-x 7 username username 4096 Nov 27 16:47 ..
694
    -rw-rw-r-- 1 username username 8063 Jun 28 14:48 kamaki-logo.png
695
    -rw-rw-r-- 1 username username 8063 Jun 28 14:48 logo-copy.png
696

    
697

    
698
Kamaki shell commits command strings to the outside shell and prints the results, without interacting with it. After a command is finished, kamaki shell returns to its initial state, which involves the current directory, as show in example 4.8.2 .
699

    
700
.. code-block:: console
701
    :emphasize-lines: 1
702

    
703
    Example 4.8.2: Attempt (and fail) to change working directory
704

    
705

    
706
    [kamaki]:!pwd
707
    /home/username
708

    
709
    [kamaki]:!cd ..
710

    
711
    [kamaki]:shell pwd
712
    /home/username