Skip to main content

Loci Notes CLI

This is the official documentation for the Loci Notes command line client (CLI). The CLI is the lowest-level client available to users, and while it might not be pretty, or easy to use, it should support all interactions regardless of other clients.

Source​

https://gitlab.com/loci-notes/loci-cli

Installation​

The CLI supports Python3+, and is available on the PyPI.

pip3 install loci-cli

Basics​

user@localhost:~ loci --version
loci v0.6.0

user@localhost:~ loci --help
Usage: loci [OPTIONS] COMMAND [ARGS]...

Options:
-v, --version
--help Show this message and exit.

Commands:
artifact artifact management commands
artifacts Alias for `artifact list`
config Configure this CLI tool
new Alias for `note new`
note Note management commands
notes Alias for `note list`
project Project management commands
projects Alias for `project list`
setup Server and localhost setup commands
status Alias for `artifact status`
test Test connectivity to Loci server and CLI configuration
user User management commands

Commands​

This section lists various useful commands.

Server Setup​

loci setup server

This command will setup a new Loci Notes server, setup a new user as a server administrator, and configure your local host for access to said server using the created admin profile.

Extras​

This command asks for the location of the Loci Notes server, calls the setup API so that the server is ready for use, makes an API call to generate a key for you to use, and then stores this information locally. The location of this info is ~/.config/loci/loci-config.ini for Linux or %LOCALAPPDATA%\loci\loci-config.ini for Windows.

Configuration​

loci config

This command will configure your local host for access to a remote Loci Notes server. Use this if the server was already setup by someone else, but you need to connect to it.

Extras​

This command asks for the location of the Loci Notes server, makes an API call to generate a key for you to use, and then stores this information locally. The location of this info is ~/.config/loci/loci-config.ini for Linux or %LOCALAPPDATA%\loci\loci-config.ini for Windows.

Test​

loci test

This command is a sanity check to make sure your local machine is configured correctly.

Extras​

It should be noted that this command does not make sure your project configuration is correct, only that you are properly authenticated to the Loci Notes server. If this fails, try loci config (for an already-setup server) or loci setup server (for a new server).

Localhost Setup​

loci setup localhost

This command will setup your local directory structure to use a given project. Run this is the directory for each new project you make.

Project Management Commands​

user@localhost:~ loci project --help
Usage: loci project [OPTIONS] COMMAND [ARGS]...

Project management commands

Options:
--help Show this message and exit.

Commands:
access Project access management commands
delete Delete a project
get Get the current configured project for the current working...
list Show all projects
new Create a new project
update Update a project

New Project​

loci project new

This command will setup a new empty project, and make you a manager for that project.

List Projects​

loci projects

Shows all projects in the current server.

Extras​

This command is an alias for loci project list.

Project Access Management Commands​

user@localhost:~ loci project access --help
Usage: loci project access [OPTIONS] COMMAND [ARGS]...

Project access management commands

Options:
--help Show this message and exit.

Commands:
add Grant a user project access
rm Remove a user's project access
show Show current user access to project

Show Project Access​

loci project access show

Show all users with access to a given project.

Add Project Access​

loci project access add

Grant a user access to a project.

Remove Project Access​

loci project access rm

Remove a users project access.