Skip to content

Commands

Cubyc's command-line interface (CLI) complements its Python library, providing a convenient way to manage and query your projects. This section covers the available commands and their usage.


Initialize

Initialize a new Cubyc project in the current directory with the init command. This creates the necessary .cubyc, .git folders, and .gitignore file.

$ cubyc init

Login

Securely store an access token from your repository hosting platform using the login command. The token is used only to authenticate your queries.

$ cubyc login [PLATFORM] [ACCESS_TOKEN]

Arguments:

  • [PLATFORM]: The hosting platform to store the access token for. Supported options:

    • github
    • gitlab
    • bitbucket
  • [ACCESS_TOKEN]: The access token for the specified platform.

Note

Cubyc securely stores your access token using Python's keyring library. You may be prompted to enter your system password to store and access the access token.


Cleanup

Remove all Cubyc and Git-related files and directories from the current working directory with the cleanup command.

$ cubyc cleanup

Warning

The cleanup command permanently deletes the .cubyc, .git directories, and .gitignore file. Consider initializing a new project in a different directory instead.


Query

Run SQL queries against your experiment history using the query command. It supports querying both local and remote repositories.

$ cubyc query [STATEMENT] --path [PATH] --branch [BRANCH]

Arguments:

  • STATEMENT: The SQL query statement to execute.

Options:

  • --path, -p: The local path or remote URL of the repository to query. Defaults to the current working directory.
  • --branch, -b: The branch to query. If not specified, all branches will be queried.

Example:

$ cubyc query "select * from config" --path https://github.com/owner/project.git
+----+------------------------------------------+---------------+------------+
|    | id                                       | learning_rate | batch_size |
|----+------------------------------------------+---------------+------------|
|  0 | 0f3e35af52587ecb0b6dec33d68c09159df54617 |           0.1 |         32 |
|  1 | be18a9e78f5754460b1edea4bad5012f9c7530ff |          0.01 |         64 | 
|  2 | cc16b3f37f51d81cd7bd0189d2d9379d263a088e |          0.01 |        128 |
-----+------------------------------------------+---------------+------------+