Command-line tool

Installing tiled adds a command-line tool, tiled, to the environment. Use tiled --help for info, or see the documentation below.

tiled

tiled [OPTIONS] COMMAND [ARGS]...

Options

--install-completion

Install completion for the current shell.

--show-completion

Show completion for the current shell, to copy it or customize the installation.

admin

Administrative utilities for managing large deployments.

tiled admin [OPTIONS] COMMAND [ARGS]...

check-config

Check configuration file for syntax and validation errors.

tiled admin check-config [OPTIONS] [CONFIG_PATH]

Arguments

CONFIG_PATH

Optional argument

Path to a config file or directory of config files. If None, check environment variable TILED_CONFIG. If that is unset, try default location ./config.yml.

downgrade-database

Upgrade the database schema to the latest version.

tiled admin downgrade-database [OPTIONS] DATABASE_URI REVISION

Arguments

DATABASE_URI

Required argument

REVISION

Required argument

The ID of a revision to downgrade to.

initialize-database

Initialize a SQL database for use by Tiled.

tiled admin initialize-database [OPTIONS] DATABASE_URI

Arguments

DATABASE_URI

Required argument

list-principals

List information about all Principals (users or services) that have ever logged in.

tiled admin list-principals [OPTIONS] [PAGE_OFFSET] [PAGE_LIMIT]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

Arguments

PAGE_OFFSET

Optional argument

PAGE_LIMIT

Optional argument

Max items to show

show-principal

Show information about one Principal (user or service).

tiled admin show-principal [OPTIONS] UUID

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

Arguments

UUID

Required argument

UUID identifying Principal of interest

upgrade-database

Upgrade the database schema to the latest version.

tiled admin upgrade-database [OPTIONS] DATABASE_URI [REVISION]

Arguments

DATABASE_URI

Required argument

REVISION

Optional argument

The ID of a revision to upgrade to. By default, upgrade to the latest one.

api_key

Create, list, and revoke API keys.

tiled api_key [OPTIONS] COMMAND [ARGS]...

create

tiled api_key create [OPTIONS]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

--expires-in <expires_in>

Number of seconds until API key expires. If None, it will never expire or it will have the maximum lifetime allowed by the server.

--scopes <scopes>

Restrict the access available to this API key by listing scopes. By default, it will inherit the scopes of its owner.

--note <note>

Add a note to label this API key.

--no-verify

Skip SSL verification.

Default:

False

list

tiled api_key list [OPTIONS]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

revoke

tiled api_key revoke [OPTIONS] FIRST_EIGHT

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

Arguments

FIRST_EIGHT

Required argument

First eight characters of API key (or the whole key)

catalog

Manage a catalog of data to be served by Tiled.

tiled catalog [OPTIONS] COMMAND [ARGS]...

downgrade-database

Upgrade the catalog database schema to the latest version.

tiled catalog downgrade-database [OPTIONS] DATABASE_URI REVISION

Arguments

DATABASE_URI

Required argument

REVISION

Required argument

The ID of a revision to downgrade to.

init

Initialize a database as a Tiled Catalog.

Examples:

# Using a simple local file as an embedded “database” (SQLite) tiled init catalog.db tiled init path/to/catalog.db tiled init sqlite+aiosqlite:////path/to/catalog.db

# Using a client/serve database engine (PostgreSQL) tiled init postgresql+asyncpg://uesrname:password@localhost/database_name:5432

tiled catalog init [OPTIONS] [DATABASE]

Options

--if-not-exists, --no-if-not-exists

By default, it is an error if a database is already initialized.Set this flag to be permissive and return without an error.

Default:

False

Arguments

DATABASE

Optional argument

A filepath or database URI

serve

Serve a catalog.

tiled catalog serve [OPTIONS] [DATABASE]

Options

-r, --read <read>

Locations that the server may read from

-w, --write <write>

Location that the server may write to

--temp

Make a new catalog in a temporary directory.

Default:

False

--init

Initialize a new catalog database.

Default:

False

--public

Turns off requirement for API key authentication for reading. However, the API key is still required for writing, so data cannot be modified even with this option selected.

Default:

False

--api-key <api_key>

Set the single-user API key. By default, a random key is generated at startup and printed.

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’.

Default:

'127.0.0.1'

--port <port>

Bind to a socket with this port.

Default:

8000

--scalable

This verifies that the configuration is compatible with scaled (multi-process) deployments.

Default:

False

--log-config <log_config>

Custom uvicorn logging configuration file

--log-timestamps, --no-log-timestamps

Include timestamps in log output.

Default:

False

Arguments

DATABASE

Optional argument

A filepath or database URI, e.g. ‘catalog.db’

upgrade-database

Upgrade the catalog database schema to the latest version.

tiled catalog upgrade-database [OPTIONS] DATABASE_URI [REVISION]

Arguments

DATABASE_URI

Required argument

REVISION

Optional argument

The ID of a revision to upgrade to. By default, upgrade to the latest one.

login

Log in to an authenticated Tiled server.

tiled login [OPTIONS]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

--set-default, --no-set-default

Use this identity as the default for this API.

Default:

True

--show-secret-tokens

Show secret tokens after successful login.

Default:

False

logout

Log out.

tiled logout [OPTIONS]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

--username <username>
--provider <provider>

profile

Examine Tiled ‘profiles’ (client-side config).

tiled profile [OPTIONS] COMMAND [ARGS]...

clear-default

Clear the default Tiled profile.

tiled profile clear-default [OPTIONS]

create

Create a ‘profile’ that can be used to connect to a Tiled server.

tiled profile create [OPTIONS] URI

Options

--name <name>

Profile name, a short convenient alias

Default:

'auto'

--set-default, --no-set-default

Set new profile as the default profile.

Default:

True

--overwrite

Overwrite an existing profile of this name.

Default:

False

--no-verify

Skip SSL verification.

Default:

False

Arguments

URI

Required argument

URI ‘http[s]://…’

delete

tiled profile delete [OPTIONS] NAME

Arguments

NAME

Required argument

Profile name

edit

Show the content of a profile.

tiled profile edit [OPTIONS] PROFILE_NAME

Arguments

PROFILE_NAME

Required argument

get-default

Show the current default Tiled profile.

tiled profile get-default [OPTIONS]

list

List the profiles (client-side configuration) found and the files they were read from.

tiled profile list [OPTIONS]

paths

List the locations that the client will search for profiles (client-side configuration).

tiled profile paths [OPTIONS]

set-default

Set the default Tiled profile.

tiled profile set-default [OPTIONS] PROFILE_NAME

Arguments

PROFILE_NAME

Required argument

show

Show the content of a profile.

tiled profile show [OPTIONS] PROFILE_NAME

Arguments

PROFILE_NAME

Required argument

register

tiled register [OPTIONS] URI FILEPATH

Options

-v, --verbose

Log details of directory traversal and file registration.

Default:

False

-w, --watch

Update catalog when files are added, removed, or changed.

Default:

False

--prefix <prefix>

Location within the catalog’s namespace to register these files

Default:

'/'

--keep-ext

Serve a file like ‘measurements.csv’ as its full filepath with extension, instead of the default which would serve it as ‘measurements’. This is discouraged because it leaks details about the storage format to the client, such that changing the storage in the future may break user (client-side) code.

Default:

False

--ext <ext>

Support custom file extension, mapping it to a known mimetype. Spell like ‘.tif=image/tiff’. Include the leading ‘.’ in the file extension.

--mimetype-hook <mimetype_detection_hook>

ADVANCED: Custom mimetype detection Python function. Expected interface: detect_mimetype(filepath, mimetype) -> mimetype Specify here as ‘package.module:function’

--adapter <adapters>

ADVANCED: Custom Tiled Adapter for reading a given formatSpecify here as ‘mimetype=package.module:function’

--walker <walkers>

ADVANCED: Custom Tiled Walker for traversing directories and grouping files. This is used in conjunction with Adapters that operate on groups of files. Specify here as ‘package.module:function’

--api-key <api_key>

Arguments

URI

Required argument

URL to Tiled node to register on

FILEPATH

Required argument

A file or directory to register

serve

Launch a Tiled server.

tiled serve [OPTIONS] COMMAND [ARGS]...

catalog

Serve a catalog.

tiled serve catalog [OPTIONS] [DATABASE]

Options

-r, --read <read>

Locations that the server may read from

-w, --write <write>

Location that the server may write to

--temp

Make a new catalog in a temporary directory.

Default:

False

--init

Initialize a new catalog database.

Default:

False

--public

Turns off requirement for API key authentication for reading. However, the API key is still required for writing, so data cannot be modified even with this option selected.

Default:

False

--api-key <api_key>

Set the single-user API key. By default, a random key is generated at startup and printed.

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’.

Default:

'127.0.0.1'

--port <port>

Bind to a socket with this port.

Default:

8000

--scalable

This verifies that the configuration is compatible with scaled (multi-process) deployments.

Default:

False

--log-config <log_config>

Custom uvicorn logging configuration file

--log-timestamps, --no-log-timestamps

Include timestamps in log output.

Default:

False

Arguments

DATABASE

Optional argument

A filepath or database URI, e.g. ‘catalog.db’

config

Serve a Tree as specified in configuration file(s).

tiled serve config [OPTIONS] [CONFIG_PATH]

Options

--public

Turns off requirement for API key authentication for reading. However, the API key is still required for writing, so data cannot be modified even with this option selected.

Default:

False

--api-key <api_key>

Set the single-user API key. By default, a random key is generated at startup and printed.

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’. Uses value in config by default.

--port <port>

Bind to a socket with this port. Uses value in config by default.

--scalable

This verifies that the configuration is compatible with scaled (multi-process) deployments.

Default:

False

--log-config <log_config>

Custom uvicorn logging configuration file

--log-timestamps, --no-log-timestamps

Include timestamps in log output.

Default:

False

Arguments

CONFIG_PATH

Optional argument

Path to a config file or directory of config files. If None, check environment variable TILED_CONFIG. If that is unset, try default location ./config.yml.

demo

Start a public server with example data.

tiled serve demo [OPTIONS]

Options

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’.

Default:

'127.0.0.1'

--port <port>

Bind to a socket with this port.

Default:

8000

directory

Serve a Tree instance from a directory of files.

tiled serve directory [OPTIONS] DIRECTORY

Options

-v, --verbose

Log details of directory traversal and file registration.

Default:

False

-w, --watch

Update catalog when files are added, removed, or changed.

Default:

False

--public

Turns off requirement for API key authentication for reading. However, the API key is still required for writing, so data cannot be modified even with this option selected.

Default:

False

--api-key <api_key>

Set the single-user API key. By default, a random key is generated at startup and printed.

--keep-ext

Serve a file like ‘measurements.csv’ as its full filepath with extension, instead of the default which would serve it as ‘measurements’. This is discouraged because it leaks details about the storage format to the client, such that changing the storage in the future may break user (client-side) code.

Default:

False

--ext <ext>

Support custom file extension, mapping it to a known mimetype. Spell like ‘.tif=image/tiff’. Include the leading ‘.’ in the file extension.

--mimetype-hook <mimetype_detection_hook>

ADVANCED: Custom mimetype detection Python function. Expected interface: detect_mimetype(filepath, mimetype) -> mimetype Specify here as ‘package.module:function’

--adapter <adapters>

ADVANCED: Custom Tiled Adapter for reading a given formatSpecify here as ‘mimetype=package.module:function’

--walker <walkers>

ADVANCED: Custom Tiled Walker for traversing directories and grouping files. This is used in conjunction with Adapters that operate on groups of files. Specify here as ‘package.module:function’

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’.

Default:

'127.0.0.1'

--port <port>

Bind to a socket with this port.

Default:

8000

--log-config <log_config>

Custom uvicorn logging configuration file

--log-timestamps, --no-log-timestamps

Include timestamps in log output.

Default:

False

Arguments

DIRECTORY

Required argument

A directory to serve

pyobject

Serve a Tree instance from a Python module.

tiled serve pyobject [OPTIONS] OBJECT_PATH

Options

--public

Turns off requirement for API key authentication for reading. However, the API key is still required for writing, so data cannot be modified even with this option selected.

Default:

False

--api-key <api_key>

Set the single-user API key. By default, a random key is generated at startup and printed.

--host <host>

Bind socket to this host. Use –host 0.0.0.0 to make the application available on your local network. IPv6 addresses are supported, for example: –host ‘::’.

Default:

'127.0.0.1'

--port <port>

Bind to a socket with this port.

Default:

8000

--scalable

This verifies that the configuration is compatible with scaled (multi-process) deployments.

Default:

False

--log-config <log_config>

Custom uvicorn logging configuration file

--log-timestamps, --no-log-timestamps

Include timestamps in log output.

Default:

False

Arguments

OBJECT_PATH

Required argument

Object path, as in ‘package.subpackage.module:object_name’

tree

Show the names of entries in a Tree.

This is similar to the UNIX utility tree for listing nested directories.

tiled tree [OPTIONS] [MAX_LINES]

Options

--profile <profile>

If you use more than one Tiled server, use this to specify which.

Arguments

MAX_LINES

Optional argument

Max lines to show.