Skip to content

Reference

usage: hidos [-h] [--version] [--cache CACHE] [--offline] {cache,get,git,info} ...

positional arguments:
  {cache,get,git,info}
    cache               subcommands for working with the Hidos cache
    get                 get snapshot contents of document succession edition
    git                 subcommands for working with a Git repository
    info                get document succession information

options:
  -h, --help            show this help message and exit
  --version             show program's version number and exit
  --cache CACHE         Hidos cache path
  --offline             run in offline mode

Basic hidos commands:

Advanced hidos commands:

Basic Subcommands

Subcommand info

Display information about a document succession or edition of.

usage: hidos info [-h] [dsi:]DSI[/EDITION]

positional arguments:
  [dsi:]DSI[/EDITION]  Document Succession Identifier (and optional edition number)

Examples

hidos info wk1LzCaCSKkIvLAYObAvaoLNGPc
hidos info wk1LzCaCSKkIvLAYObAvaoLNGPc/2.1

Subcommand get

usage: hidos get [-h] [-o OUTPUT] [dsi:]DSI[/EDITION]

positional arguments:
  [dsi:]DSI[/EDITION]  Document Succession Identifier (and optional edition number)

options:
  -h, --help           show this help message and exit
  -o, --output OUTPUT  output destination path for snapshot contents

Examples

hidos get HKSI5NPzMFmgRlb4Vboi71OTKYo --output latest_copy_here
hidos get HKSI5NPzMFmgRlb4Vboi71OTKYo/1.1 --output old_minor_edition

Advanced hidos cache Subcommands

The hidos get and hidos info commands will download and cache data for document successions. The clear, list, and path subcommands operate on this cache.

usage: hidos cache [-h] {clear,list,path} ...

positional arguments:
  {clear,list,path}
    clear            clear (delete) the Hidos cache
    list             list document successions in the Hidos cache
    path             print the file system path of the Hidos cache

Using the hidos --cache CACHE ... option will use a cache location other than the default cache location.

Advanced hidos git Subcommands

In order to create and amend document successions, you need to use the hidos git subcommands with a Git repository along with the application Git (git or equivalent application).

usage: hidos git [-h] [--git-dir GIT_DIR] {add,commit,create,dsi,get,info,list} ...

positional arguments:
  {add,commit,create,dsi,get,info,list}
    add                 add remote branches of document succession to local Git repository
    commit              commit file or directory to document succession
    create              create new document succession
    dsi                 print document succession identifier
    get                 from Git repository, get snapshot contents of document succession edition
    info                get document succession information
    list                list Git branches of document successions

options:
  -h, --help            show this help message and exit
  --git-dir GIT_DIR     path to the .git repository directory

Option --git-dir

If your current directory is a git repository, Hidos will use it by default if no --git-dir option is given. Alternatively, you can use the --git-dir option to explicitly point to the git repository.

hidos git --git-dir GIT_DIR ...

Subcommand hidos git add

Add remote branches of a document succession to a local Git repository.

Subcommand hidos git commit

Amend the contents of a document snapshot as a new edition in a document succession.

hidos git commit PATH_TO_CONTENTS BRANCH_NAME EDITION_NUMBER

Subcommand hidos git create

Create a document succession.

hidos git create --keys <ssh_public_key_file> <new_branch_name>

See the guide to Create Signing Key for instructions on creating an SSH public key file.

A new Document Succession Identifier (DSI) will be displayed, and the git branch name can be used for further operations. The branch name is not intrinsic to the document succession and is for convenient identification of successions stored in a git repository.

Warning

For long-term public usage, it is necessary for document successions to be signed. Otherwise, anybody can amend your document succession once it is public. Use the create subcommand with the --keys option to create a signed document succession.

Tip

You might not like a DSI that you create. Maybe you don't want 0 or O characters, or maybe you don't want l or I characters, because some fonts do not visually distinguish them. Or maybe you don't want - or _ characters. Whatever the reason, every second you can regenerate a new DSI by:

  1. Deleting the just-created DSI: git branch -D my_succession
  2. Creating a new DSI: hidos git create my_succession

Subcommand hidos git dsi

Display the DSI for a specific branch.

hidos git dsi BRANCH_NAME

Subcommand hidos git get

Similar to the hidos get command, but instead of identifying an archived document succession with a DSI, a document succession is identified by Git branch name of a local Git repository.

Subcommand hidos git info

Similar to the hidos info command, but instead of identifying an archived document succession with a DSI, a document succession is identified by Git branch name of a local Git repository.

Subcommand hidos git list

List all document successions found in a git repository.

hidos git list

Both a DSI and branch names will be printed for each document succession.