GraphKnowledge

graph-studio

Getting Started with the Admin CLI

This topic provides instructions for configuring the admin command line interface, anzo, and viewing the help menu. The anzo client is in the <install_path>/Client directory.

The anzo CLI is an advanced administration tool for managing Graph Studio. It is primarily used for debugging and inspecting system configurations, executing batch operations, and aiding in migrations and deployments. To script user interface operations or control Graph Studio with the CLI, please contact Altair.

Add the CLI to the Graph Studio Service User PATH

Follow the instructions below to configure the PATH environment variable to include the Client directory so that the Graph Studio CLI can be called from any directory.

  1. If necessary, run the following command to become the Graph Studio service user:

    sudo su - <anzo_user_name>

    For example:

    sudo su - anzo

  2. Open ~/.bash_profile in a text editor.

  3. Change the PATH to the following value:

    PATH=$PATH:$HOME/.local/bin:$HOME/bin:<install_path>/Client

    For example:

    PATH=$PATH:$HOME/.local/bin:$HOME/bin:/opt/Anzo/Client

  4. Save and close the file, and then run the following command:

    source ~/.bash_profile

  5. Type anzo to verify that you can access the CLI. For example:

    [anzo@anzo-server ~]$ anzo Graph Studio Command Line Client. Copyright (c) 2017 - 2023 Cambridge Semantics Inc and others. All rights reserved. Version: 5.4.3.r202307131505 Type anzo help for usage

Configure the CLI

Follow the instructions below to configure a settings file that specifies the default CLI configuration values for parameters such as host, port, user, and password. Specifying these details in the settings file eliminates the need to include those options in subsequent commands.

To create and populate the settings file, settings.trig, in your home directory, run the following command:

anzo setup

Where include the following choices:

-beep , --beep beep when command is completed -ds , --datasource URI of the datasource to query, if other than primary datasource. Option not available for dataset queries. -h , --host anzo server hostname -http , --http Use http connection to server. -p , --port anzo server port -pause , --pause-exit Wait for a user key entry before an abnormal exit. -ssl , --use-ssl Use SSL for connection. -t , --timeout override the default 30 second timeout for operations -timer , --timer Print out the total operation time -trace , --show-trace Show stack trace for errors. -trust , --trust-all Trust all certificates including invalid ones -u , --user username to connect with -w , --password user's password -x , --exclude-prefixes Do not use prefixes defined in user settings to expand options, arguments, or to write RDF. -z , --settings override the default settings file location

For example:

anzo setup -h localhost -p 61616 -u sysadmin -w @nz0

Graph Studio creates the settings.trig file in the ~/user/.anzo directory. You can edit the file as needed. The installation also includes a sample settings file, settings_example.trig, in the Client directory. You can view the sample file for reference. For example:

### standard prefixes @prefix foaf : http://xmlns.com/foaf/0.1/ . @prefix rdfs : http://www.w3.org/2000/01/rdf-schema# . @prefix dc : http://purl.org/dc/elements/1.1/ . @prefix xsd : http://www.w3.org/2001/XMLSchema# . @prefix rdf : http://www.w3.org/1999/02/22-rdf-syntax-ns# .

anzo prefixes:

@prefix cli : http://openanzo.org/cli/ . @prefix system : http://openanzo.org/ontologies/2008/07/System# . @prefix anzo : http://openanzo.org/ontologies/2008/07/Anzo# . @prefix ld : http://cambridgesemantics.com/ontologies/2009/05/LinkedData# . @prefix anzowt : http://cambridgesemantics.com/ontologies/2009/05/AnzoWebToolkit# . @prefix reg : http://cambridgesemantics.com/registries/ . @prefix ontserv : http://cambridgesemantics.com/semanticServices/OntologyService# . @prefix ldserv : http://cambridgesemantics.com/semanticServices/LinkedData# . cli:config { cli:config

system:user "" ;

system:password "" ;

system:timeout "0"; system:useSsl "false"; system:port "61616"; system:keystoreFile "${ANZO_CLI_HOME}/../Common/ssl/client.ks"; system:keystoreType "JCEKS"; system:keystorePassword "p@ssw0rd"; system:truststoreFile "${ANZO_CLI_HOME}/../Common/ssl/client.ts"; system:truststoreType "JCEKS"; system:truststorePassword "p@ssw0rd"; . }

View the CLI Help Menu

The CLI help menu lists all of the available subcommands. To view the subcommands, run anzo help.

usage: anzo [options] [args] Graph Studio Command Line Client. Type 'anzo help ' for help with a specific subcommand. Available subcommands: acls Ensure the graphs in a dataset inherit their ACLs from the dataset analyze Provides several flavors of analysis for Graph Studio request/response logs call Calls an Graph Studio semantic service and prints the service response to the console ...

To view the help for a specific subcommand, run anzo help <command>. For example, the following command displays help for the find command:

[user@anzo Client]# ./anzo help find usage: anzo find [options] [NAMED-GRAPH-URI...] Retrieves statements from the server via simple pattern find. -beep , --beep beep when command is completed -ds , --datasource URI of the datasource to query, if other than primary datasource. Option not available for dataset queries. -f , --output-file write the find results to a file -h , --host Graph Studio server hostname ...

Source: https://docs.sw.siemens.com/documentation/external/PL20260212925461721/en-US/graph_studio/anzo-cli-get-started.htm · retrieved 2026-08-23