CLI#
This section list and describe the commands offered by the argilla
CLI application. If you need more information about the available
commands in the CLI you can use the --help
option:
argilla --help
If you need more information about a specific command you can use the --help
option too:
argilla users create --help
Login#
The argilla login
command is used to store the local credentials of a user, with the main purpose of reusing these credentials
to automatically authenticate in the Argilla server to run other commands or Python scripts that use Argilla.
argilla login --api-url http://localhost:6900
Note
To validate that the provided URL and API Key are valid, the login
command will try to connect to the Argilla server
using the provided credentials.
Note
By default, Argilla will use ~/.cache/argilla
directory to store the local credentials. If you want to change this
behaviour, you can set a valid directory using the ARGILLA_CACHE_DIR
environment variable.
Logout#
The argilla logout
command removes the stored local credentials previously generated by calling the argilla login
command.
argilla logout
Note
The logout
will try to connect to the Argilla server before removing the stored credentials. If, for some reason,
the Argilla server is not available but you still want to remove the stored credentials, the --force
option can
be used.
Whoami#
The argilla whoami
command prints the information (username, workspaces, API Key, etc.) of the logged-in user.
argilla whoami
Info#
The argilla info
command prints the versions of the Python client, Argilla server and ElasticSearch server used and that might
be useful for debugging purposes or reporting an issue.
argilla info
Users#
The argilla users
group of commands offers basic operations for managing the users of the connected Argilla server.
Create a user#
The argilla users create
command allows you to easily create a new user from the command line. The command will prompt for the
username and password of the new user, but the following options can be provided:
--username
: The username of the new user.--password
: The password of the new user.--first-name
: The first name of the new user. If not provided, the username will be used.--last-name
: The last name of the new user.--role
: The role of the new user. The default value isannotator
.--workspace
: The name of the workspace where the new user will be added. It can be provided multiple times to add the user to multiple workspaces.
argilla users create --username joe --first-name Joe --last-name Doe --role admin --workspace workspace1 --workspace workspace2
Delete a user#
The argilla users delete
command allows you to easily delete an existing user from the command line by providing the username of the
user to delete.
argilla users delete joe
List users#
The argilla users list
command shows the list of the registered users in the Argilla server. Optionally, the --workspace
option can be provided to show only the users that belong to a specific workspace.
argilla users list
Workspaces#
The argilla workspaces
group of commands offers basic operations for managing the workspaces of the connected Argilla server.
The commands of this group that perform an operation in a specific workspace require the --name
option to be provided to
specify the workspace where the operation will be performed.
Create a workspace#
The argilla workspaces create
command allows you to easily create a new workspace from the command line.
argilla workspaces create my-new-workspace
Add user to workspace#
The argilla workspaces add-user
command allows you to add a user to a workspace by providing the username of the user and the name of the workspace.
argilla workspaces --name my-workspace add-user joe
Delete use from workspace#
The argilla workspaces delete-user
command allows you to delete a user from a workspace by providing the username of the user and the name of the workspace.
argilla workspaces --name my-workspace delete-user joe
List workspaces#
The argilla workspaces list
command shows the list of the workspaces in the Argilla server.
argilla workspaces list
Datasets#
The argilla datasets
group of commands offers basic operations for managing the datasets stored in the connected Argilla server.
The commands of this group that perform an operation in a specific dataset require the --name
option to be provided and optionally
the --workspace
option to specify the workspace where the dataset is stored. If the --workspace
option is not provided, then the
workspace stored in the local credentials will be used.
Delete a dataset#
The argilla datasets delete
command allows you to remove a FeedbackDataset
from the Argilla server by providing the name of the
dataset and optionally the workspace where the dataset is stored.
argilla datasets --name my-dataset --workspace my-workspace delete
List datasets#
The argilla datasets list
shows the list of the datasets stored in the Argilla server. The following options can be provided:
--workspace
: The name of the workspace from which the datasets will be listed. If not provided, all the datasets from all the workspaces will be listed.--type
: The type of datasets to be listed. Two possible values:feedback
andother
(forTextClassification
,TokenClassification
andText2Text
datasets).
argilla datasets list
Server#
The argilla server
group of commands contains commands for managing the Argilla server and its database.
Note
This group of commands will only be available if Argilla was installed with the required dependencies for the server (using pip install argilla[server]
).
Start the server#
The argilla server start
command will start the Argilla server blocking the current terminal. The following options can be provided:
--host
: The host where the Argilla server will be bound. Default value is0.0.0.0
.--port
: The port where the Argilla server will be bound. Default value is6900
.--access-log/--no-access-log
: Enable/disable the server access log. Default value isTrue
.
Database management#
The argilla server database
group of commands offers functionality for managing the Argilla server database:
argilla server database migrate
: applies the database migrations.argilla server database revisions
: list the different revisions to which the database can be migrated.
User management using the database connection#
The argilla server database users
group of commands offers functionality for managing the users of the Argilla server. To do so,
the argilla server database users
commands use the database connection instead of the Argilla API, so these commands will have
to get executed from a machine that has access to the database. To set the URL of the database that will be used by the commands,
check SQLite and PostgreSQL section.
argilla server database users create
: creates a new user in the Argilla server database.argilla server database users create_default
: creates the default users in the Argilla server database.argilla server database users migrate
: migrates the users from the oldYAML
file to the Argilla server database.argilla server database users update
: updates a user in the Argilla server database.