UI Commands

Available Commands

Usage: cli [OPTIONS] COMMAND [ARGS]...

  Nessie cli tool.

  Interact with Nessie branches and tables via the command line

Options:
  --json             write output in json format.
  -v, --verbose      Verbose output.
  --endpoint TEXT    Optional endpoint, if different from config file.
  --auth-token TEXT  Optional bearer auth token, if different from config file.
  --version
  --help             Show this message and exit.

Commands:
  branch       Branch operations.
  cherry-pick  Transplant HASHES onto another branch.
  config       Set and view config.
  contents     Contents operations.
  log          Show commit log.
  merge        Merge FROM_BRANCH into another branch.
  remote       Set and view remote endpoint.
  tag          Tag operations.

Config Command

Used to set config parameters found in default_config.yaml and to set the default context. To set default context use nessie config --add default_branch main, all operations that are ref specific will happen on that ref unless otherwise specified.

Usage: cli config [OPTIONS] [KEY]

  Set and view config.

Options:
  --get TEXT    get config parameter
  --add TEXT    set config parameter
  -l, --list    list config parameters
  --unset TEXT  unset config parameter
  --type TEXT   type to interpret config value to set or get. Allowed options:
                bool, int
  -h, --help    Show this message and exit.

Branch Command

Perform operations on branches: create, delete, modify and reassign.

Usage: cli branch [OPTIONS] [BRANCH] [BASE_REF]

  Branch operations.

  BRANCH name of branch to list or create/assign

  BASE_REF name of branch or tag from which to create/assign the new BRANCH

  Examples:

      nessie branch -> list all branches

      nessie branch -l -> list all branches

      nessie branch -l main -> list only main

      nessie branch -d main -> delete main

      nessie branch new_branch -> create new branch named 'new_branch' at
      current HEAD of the default branch

      nessie branch new_branch main -> create new branch named 'new_branch' at
      head of reference named 'main'

      nessie branch -o 12345678abcdef new_branch main -> create a branch named
      'new_branch' at hash 12345678abcdef on reference named 'main'

      nessie branch -f existing_branch main -> assign branch named
      'existing_branch' to head of reference named 'main'

      nessie branch -o 12345678abcdef -f existing_branch main -> assign branch
      named 'existing_branch' to hash 12345678abcdef on reference named 'main'

Options:
  -l, --list              list branches
  -d, --delete            delete a branch
  -f, --force             force branch assignment
  -o, --hash-on-ref TEXT  Hash on source-reference for 'create' and 'assign'
                          operations, if the branch shall not point to the HEAD
                          of the given source-reference.
  -c, --condition TEXT    Expected hash. Only perform the action if the branch
                          currently points to the hash specified by this option.
  --help                  Show this message and exit.

Tag Command

Perform operations on tags: create, delete, modify and reassign.

Usage: cli tag [OPTIONS] [TAG_NAME] [BASE_REF]

  Tag operations.

  TAG_NAME name of branch to list or create/assign

  BASE_REF name of branch or tag whose HEAD reference is to be used for the new
  tag

  Examples:

      nessie tag -> list all tags

      nessie tag -l -> list all tags

      nessie tag -l v1.0 -> list only tag "v1.0"

      nessie tag -d v1.0 -> delete tag "v1.0"

      nessie tag new_tag -> create new tag named 'new_tag' at current HEAD of
      the default branch

      nessie tag new_tag main -> create new tag named 'new_tag' at head of
      reference named 'main' (branch or tag)

      nessie tag -o 12345678abcdef new_tag test -> create new tag named
      'new_tag' at hash 12345678abcdef on reference named 'test'

      nessie tag -f existing_tag main -> assign tag named 'existing_tag' to head
      of reference named 'main'

      nessie tag -o 12345678abcdef -f existing_tag main -> assign tag named
      'existing_tag' to hash 12345678abcdef on reference named 'main'

Options:
  -l, --list              list branches
  -d, --delete            delete a branches
  -f, --force             force branch assignment
  -o, --hash-on-ref TEXT  Hash on source-reference for 'create' and 'assign'
                          operations, if the tag shall not point to the HEAD of
                          the given source-reference.
  -c, --condition TEXT    Expected hash. Only perform the action if the tag
                          currently points to the hash specified by this option.
  --help                  Show this message and exit.

Remote Command

Set and view the remote. The add command is a shortcut to nessie config --set endpoint <endpoint> and the show command functions similarly to the git remote show <remote> command to show the remote and remote refs.

Usage: cli remote [OPTIONS] COMMAND [ARGS]...

  Set and view remote endpoint.

Options:
  --help  Show this message and exit.

Commands:
  add       Set current remote.
  set-head  Set current default branch.
  show      Show current remote.

Log Command

View the commit log. This operates similarly to git log and shows the log in the terminals pager. Revision range is specified as <hash>..<hash> or <hash/ref>.

Usage: cli log [OPTIONS] [REVISION_RANGE] [PATHS]...

  Show commit log.

  REVISION_RANGE optional hash to start viewing log from. If of the form
  <start_hash>..<end_hash> only show log for given range on the particular ref
  that was provided

  PATHS optional list of paths. If given, only show commits which affected the
  given paths

Options:
  -r, --ref TEXT                  branch to list from. If not supplied the
                                  default branch from config is used
  -n, --number INTEGER            number of log entries to return
  --since, --after TEXT           Only include commits newer than specific date,
                                  such as '2001-01-01T00:00:00+00:00'
  --until, --before TEXT          Only include commits older than specific date,
                                  such as '2999-12-30T23:00:00+00:00'
  --author TEXT                   Limit commits to a specific author (this is
                                  the original committer). Supports specifying
                                  multiple authors to filter by.
  --committer TEXT                Limit commits to a specific committer (this is
                                  the logged in user/account who performed the
                                  commit). Supports specifying multiple
                                  committers to filter by.
  --query, --query-expression TEXT
                                  Allows advanced filtering using the Common
                                  Expression Language (CEL). An intro to CEL can
                                  be found at https://github.com/google/cel-
                                  spec/blob/master/doc/intro.md. Some examples
                                  with usable variables 'commit.author' (string)
                                  / 'commit.committer' (string) /
                                  'commit.commitTime' (timestamp) /
                                  'commit.hash' (string) / 'commit.message'
                                  (string) / 'commit.properties' (map) are:
                                  commit.author=='nessie_author'
                                  commit.committer=='nessie_committer'
                                  timestamp(commit.commitTime) >
                                  timestamp('2021-06-21T10:39:17.977922Z')
  --help                          Show this message and exit.

Merge Command

Perform a merge operation. This takes commits on MERGE_BRANCH which not present on branch and adds them to branch.

Usage: cli merge [OPTIONS] [FROM_BRANCH]

  Merge FROM_BRANCH into another branch. FROM_BRANCH can be a hash or branch.

Options:
  -b, --branch TEXT       branch to merge onto. If not supplied the default
                          branch from config is used
  -f, --force             force branch assignment
  -c, --condition TEXT    Expected hash. Only perform the action if the branch
                          currently points to the hash specified by this option.
  -o, --hash-on-ref TEXT  Hash on merge-from-reference
  --help                  Show this message and exit.

Cherry-Pick Command

Perform a cherry-pick operation. This takes the list of commits HASHES and adds them to branch.

Usage: cli cherry-pick [OPTIONS] [HASHES]...

  Transplant HASHES onto another branch.

Options:
  -b, --branch TEXT      branch to cherry-pick onto. If not supplied the default
                         branch from config is used
  -f, --force            force branch assignment
  -c, --condition TEXT   Expected hash. Only perform the action if the branch
                         currently points to the hash specified by this option.
  -s, --source-ref TEXT  Name of the reference used to read the hashes from.
                         [required]
  --help                 Show this message and exit.

Contents Command

View and list contents.

Usage: cli contents [OPTIONS] [KEY]...

  Contents operations.

  KEY name of object to view, delete. If listing the key will limit by namespace
  what is included.

Options:
  -l, --list                      list tables
  -d, --delete                    delete a table
  -s, --set                       modify a table
  -c, --condition TEXT            Expected hash. Only perform the action if the
                                  branch currently points to the hash specified
                                  by this option.
  -r, --ref TEXT                  branch to list from. If not supplied the
                                  default branch from config is used
  -m, --message TEXT              commit message
  -t, --type TEXT                 entity types to filter on, if no entity types
                                  are passed then all types are returned
  --query, --query-expression TEXT
                                  Allows advanced filtering using the Common
                                  Expression Language (CEL). An intro to CEL can
                                  be found at https://github.com/google/cel-
                                  spec/blob/master/doc/intro.md. Some examples
                                  with usable variables 'entry.namespace'
                                  (string) & 'entry.contentType' (string) are:
                                  entry.namespace.startsWith('a.b.c')
                                  entry.contentType in
                                  ['ICEBERG_TABLE','DELTA_LAKE_TABLE']
                                  entry.namespace.startsWith('some.name.space')
                                  && entry.contentType in
                                  ['ICEBERG_TABLE','DELTA_LAKE_TABLE']
  --author TEXT                   The author to use for the commit
  --help                          Show this message and exit.