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.

All commands, except for float16 init , float16 example list ,float16 example ,require the user to be logged in before use.

Token

Display the current token and configuration file path.

float16 token

Logout

Log out the current user.

float16 logout

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.

float16 init

Example

creates a specific project from our predefined examples.

float16 example <EXAMPLE>

Example list

displays a list of all available example projects.

float16 example list

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

float16 project create --instance <INSTANCE_TYPE>

Options

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

Start

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

Requires

  • float16.conf file would exist.

float16 project start

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.

float16 project install

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

float16 project delete

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.

float16 project list

Output

Project ID | Instance Type | Status  | Created At          | Last Updated
aaaaaaaa   | aws           | Active  | 2023-09-24 10:00:00 | 2023-10-24 10:00:00
bbbbbbbb   | aws           | Deleted | 2023-09-24 11:30:00 | 2023-10-24 11:30:00

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.

float16 run <YOUR_FILE> --name <NAME>

Parameters

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

Options

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

Task

Retrieves details of a specific task.

float16 task <TASK_ID>

Parameters

  • <TASK_ID> : task id must be exist

Output

Task ID: TASK-XXXXX
Name: [task name]
Type: [Develop or Deploy]
Status: [status]
Created At: [timestamp]
Completed At: [timestamp or N/A]
Duration: [duration or N/A]
Project ID: [project id]

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

float16 task list

Output

Task ID   | Name     | Type     | Status   | Created At          | Project ID
TASK-0001 | Task 1   | Develop  | Running  | 2023-09-24 10:00:00 | aaaaaaa
TASK-0002 | Task 2   | Deploy   | Completed| 2023-09-24 11:30:00 | aaaaa....bbbb

Display 20 queued tasks if no option is specified

Task log

Prints the log of a specific task.

Parameters

  • <TASK_ID> : Existing task ID

float16 task log <TASK_ID>

Output

✅ Task log fetched successfully
Task Log:
====================
<YOUR_TASK_LOG>
====================

Queue Management

Queue list

Displays a list of all queued tasks.

float16 queue list

Output

 Queued tasks fetched successfully
Queue ID  | Task ID | Created At | Position
0 | TASK-0003 | 2023-09-24 12:00:00 | QUEUE-001
1 | TASK-0004 | 2023-09-24 12:15:00 | QUEUE-002

Delete queue

Removes a specific task from the queue.

Parameters

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

float16 queue delete <TASK_ID>

Deployment

Deploy

Deploys the specified application to the remote instance.

Requires

  • Application must exist and be a .py file

  • Project ID must exist

float16 deploy <YOUR_APP>

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

Application deployed successfully
Endpoint: <Endpoint Func>
          <Endpoint Server>
API Key:  <Endpoint API Key>

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

float16 endpoint

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

Function Endpoint: <Endpoint Func>
Server Endpoint: <Endpoint Server>
API Key: <Endpoint API Key>
Project ID: <project-id>
Status: <Endpoint Status>
Last Deployed: YYYY-MM-DD HH:MM:SS

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

float16 endpoint stop

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.

float16 endpoint start

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

float16 endpoint regenerate

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.

float16 storage ls

Output

Filename       | Size    | Type | Last Modified
example.py     | 1.2 KB  | File | 2023-09-24 14:00:00
data/          | 4.0 MB  | Dir  | 2023-09-24 13:30:00

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.

float16 storage copy-output --path <PATH> --s3-uri <S3-URI> --s3-access-key <S3-ACCESS-KEY> --s3-secret-key <S3-SECRET-KEY> --aws-region <AWS-REGION>

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.

float16 storage copy-to-remote --path <PATH> --s3-uri <S3-URI> --s3-access-key <S3-ACCESS-KEY> --s3-secret-key <S3-SECRET-KEY> --aws-region <AWS-REGION>

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.

  • <PATH> must be valid.

float16 storage remove-on-remote --path <PATH>

Options

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

General

Help

Displays general help information or help for a specific command.

For general help:

float16 --help

For command-specific help:

float16 <command> --help

Example

float16 run --help

This will display help information for the 'run' command

Get version

Displays the current version of the Float16 CLI.

float16 -v

or

float16 --version

Last updated