CLI References

Authentication

Login

Authenticate user to CLI via provided token.

float16 login --token <YOUR_TOKEN>

Options

  • --token <YOUR_TOKEN> (required): Your authentication token.

    • If --token is provided, attempts to authenticate with the given token.

    • If --token is omitted, prompts the user to input the token.

Token

Display the current token and configuration file path.

float16 token

Logout

Log out the current user.

This command ends the current authenticated session.

Project Management

Init

Initializes a new project in the current directory. Creates float16.conf and requirements.txt files.

Example

creates a specific project from our predefined examples.

Example list

displays a list of all available example projects.

You can also view the list of example projects in our repository.

Create

Creates a new project with a specific instance type to enable your project's computational environment.

Requires

  • Instance type must be valid

  • Project must not exist or must be deleted

  • If --instance is omitted, interactive input for instance type will be prompted

Options

  • --instance <INSTANCE_TYPE> : (Required) Specifies instance type for container

  • --name <PROJECT_NAME> or -n <PROJECT_NAME>: (Optional) Specifies name for project

Start

Begins a new project session and automatically installs packages listed in requirements.txt (if present).

Requires

  • float16.conf file would exist.

Install

Installs packages specified in the project's requirements.txt file.

Requires

  • requirements.txt file would exist.

  • Project must be started before running this command.

Delete

Removes project container, permanently deleting the project and associated resources.

Requires

  • Instance type must be valid

  • Project must not exist or be deletable

  • If --project-id is omitted, reads project ID from float16.conf

Options

  • --project-id : Project ID to delete

    • Optional if project ID exists in float16.conf (will delete current active project)

    • Required if no project ID is found in float16.conf

List

Displays list of all projects under the workspace, including deleted projects.

Options

  • -n, --limit <number>: (Optional) Specifies the number of tasks to display.

  • -a, --all: (Optional) Displays all tasks, overriding the default limit.

Output

Display 20 queued tasks if no option is specified

Task Management

Run

Executes a Python script on a remote instance.

Requires

  • <file> must exist and be a .py file.

  • <name> (if provided) must be alphanumeric and less than 64 characters.

  • Project must be started before running this command.

Parameters

  • <YOUR_FILE>: Path to the Python script to run.

Options

  • --name <NAME>(Optional): Custom name for the task.

  • --spot (Optional): Activate Spot mode.

  • --budget <budget_limit>(Optional): [Spot Mode] Config limit budget of spot task. (default 10 USD)

Task

Retrieves details of a specific task.

Parameters

  • <TASK_ID> : task id must be exist

Output

Task list

Displays a list of all tasks.

Options

  • -n, --limit <number>: Specify the number of queued tasks to display

  • -a, --all: Display all queued tasks

  • --type : Specify the type of tasks to display (e.g., manual, server, function).

  • --project-id : Specify the project of tasks to display

Output

Display 20 queued tasks if no option is specified

Task log

Prints the log of a specific task.

Parameters

  • <TASK_ID> : Existing task ID

Output

Task stop

stop spot task

Parameters

  • <TASK_ID> : Existing task ID

Task adjust

adjust spot task configuration

Parameters

  • <TASK_ID> : Existing task ID

Options

  • --budget <budget_limit>: Specify budget limit

Queue Management

Queue list

Displays a list of all queued tasks.

Output

Delete queue

Removes a specific task from the queue.

Parameters

  • <TASK_ID> : Valid queue ID of the task to be removed

Deployment

Deploy

Deploys the specified application to the remote instance.

Requires

  • Application must exist and be a .py file

  • Project ID must exist

Parameters

  • <YOUR_APP>: Path to the Python script to deploy.

Options

  • --project-id <project_id>: Project ID for deployment

    • Optional if project ID exists in float16.conf

    • Required if no project ID is found in float16.conf

Output

Endpoint

Lists all available endpoints for the current or specified project.

Requires

  • Project ID must exist

  • If --project-id is omitted, reads project ID from float16.conf

Options

  • --project-id : Project ID to list endpoints

    • Optional if project ID exists in float16.conf (will list endpoints of current active project)

    • Required if no project ID is found in float16.conf

Output

Stop Endpoint

Stops the active endpoint for the current or specified project.

Requires

  • Project ID must exist

  • Endpoint status must be active

  • If --project-id is omitted, reads project ID from float16.conf

Options

  • --project-id : Project ID to stop endpoint

    • Optional if project ID exists in float16.conf (will stop current active project endpoint)

    • Required if no project ID is found in float16.conf

Start Endpoint

Starts the inactive endpoint for the current or specified project.

Requires

  • Project ID must exist.

  • Endpoint status must inactive.

  • If --project-id is omitted, read project ID from float16.conf instead.

Options

  • --project-id : Project ID must exist

    • Endpoint status must be inactive

    • If --project-id is omitted, reads project ID from float16.conf

Re-generate API Key

Generates a new API key for the current or specified project.

Requires

  • Project ID must exist

  • If --project-id is omitted, reads project ID from float16.conf

Options

  • --project-id : Project ID to re-generate API key

    • Optional if project ID exists in float16.conf (will re-generate current active project API key)

    • Required if no project ID is found in float16.conf

Storage Management

Storage list

Displays a list of files in the project.

Requires

  • Project must be started before running this command.

Output

The system can display up to 1,000 files.

Copy output

Copies output files to the user's S3 bucket.

Requires

  • Project must be started before running this command.

  • All parameters must be valid.

Options

  • --path <PATH> (required): Path to the file or directory to be copied

  • --s3-uri <S3-URI> (required): S3 URI where the copied file or directory will be placed

  • --s3-access-key <S3-ACCESS-KEY> (required): S3 access key for authentication

  • --s3-secret-key <S3-SECRET-KEY> (required): S3 secret key for authentication

  • --aws-region <AWS-REGION> (required): AWS region for the S3 bucket

Copy file to remote instance

Copies files from user's S3 to the remote instance.

Requires

  • Project must be started before running this command.

  • All parameters must be valid.

Options

  • --path <PATH> (required): Path to the destination where the copied file or directory will be placed

  • --s3-uri <S3-URI> (required): S3 URI where the files will be copied to

  • --s3-access-key <S3-ACCESS-KEY> (required): S3 access key for authentication

  • --s3-secret-key <S3-SECRET-KEY> (required): S3 secret key for authentication

  • --aws-region <AWS-REGION> (required): AWS region for the S3 bucket

Remove file on remote instance

Removes a file from the remote instance.

Requires

  • Project must be started before running this command.

  • <FILE> must be valid.

Options

  • -f, --files <FILE> (required): Path to the file or directory to be removed

  • -p, --project-id <PROJECT_ID> (optional): Project ID of the file or directory to be removed

Upload file to remote instance

Upload file or directory from local storage to remote instance.

Requires

  • Project must be started before running this command.

  • <FILE> must be valid.

Options

  • -f, --files <FILE> (Required): Path to the file or directory to be uploaded

  • -d, --destination <PATH> (optional): Path to the file or directory to be placed

  • -p, --project-id <PROJECT_ID> (optional): Project ID of the file or directory to be placed

Download file to local storage

download file to local storage.

Requires

  • Project must be started before running this command.

  • <FILE> must be valid.

Options

  • -f, --files <FILE> (Required): Path to the file or directory to be downloaded

  • -d, --destination <PATH> (optional): Path to the file or directory to be placed

  • -p, --project-id <PROJECT_ID> (optional): Project ID of the file or directory to be downloaded

Copy file

Copy a file or folder from remote storage to a specified destination. This includes copying within the same project or across different projects.

Requires

  • Project must be started before running this command.

  • <FILE> must be valid.

Parameters

  • <ORIGIN_PROJECT_ID>: Project ID of the source file or folder

  • <FILE_PATH>: Path to the file or folder you want to copy

  • <DESTINATION_PROJECT_ID>: Project ID of the destination

  • <DESTINATION_PATH>: Destination path for the copied file or folder

  • You can also use the float16 storage cp command as a shorthand.

  • If a file or folder with the same name already exists at the destination, it will be replaced.

  • If you're copying a file from the current project (as defined in float16.conf), you do not need to specify <ORIGIN_PROJECT_ID>. Example: float16 storage copy <FILE_PATH> <DESTINATION_PROJECT_ID>:<DESTINATION_PATH>

  • If the destination path is the root of the destination project, you may omit <DESTINATION_PATH>. Example: float16 storage copy <ORIGIN_PROJECT_ID>:<FILE_PATH> <DESTINATION_PROJECT_ID>:

General

Help

Displays general help information or help for a specific command.

For general help:

For command-specific help:

Example

This will display help information for the 'run' command

Get version

Displays the current version of the Float16 CLI.

or

Last updated