CLI

Commands

Use the following commands to create a BAQ project, then add, manage, and publish record types from that project.

  • -h, --help

    • Display more information about a command.

    • This includes what it does, parameters, and options.

  • -d, --debug

    • Print full errors when a command fails.

Rebuild the current project.

baq
  • Finds the current BAQ project and rebuilds the generated types.

  • Remote record types are cached for repeated use.

  • Fails if no project file­ is found.

Initialize a new project.

baq init
  • Prompts for the following:

    • Path: Where the project file­ should be created.
    • Name: User-facing name of the app.
    • Type: JS/TS, with or without React.
    • Files path: Where to generate record type files.
  • Results in the creation of a new baq.json project file.

Add a new record type to the current project.

baq add <type> [name]
baq add src/types/record.task.json
baq add src/types/record.task.json todo_task
baq add types.baq.dev+2b6f7bc8ffd54c8db8062700c040e04f

Parameters

  • type

  • name optional

    • Friendly name given to the record type within this app.

    • Expects a value in snake_case.

    • Defaults to the name found in the type record.

Notes

  • Rebuilds the project once the new record type is added.

  • Automatically downloads remote record types.

Remove a record type from the current project.

baq remove <name>
baq remove todo_task

Parameters

  • name

    • Friendly name of the record to remove.

    • Expects a value in snake_case.

Notes

  • Rebuilds the project once the record is removed.

Watch files and rebuild on change.

baq watch
  • Watches all local record types added to the project.

  • Rebuilds all generated type files on change.

  • CTRL-C stops the watch process.

Authenticate a BAQ user to publish record types.

baq login <entity>
baq login alice.baq.run
  • Opens the default web browser to perform the authorization flow­.

  • Creates a ~/.baq/profile.json file to store authentication data.

  • Rebuilds all generated type files with the updated entity.

Logout the current BAQ user.

baq logout
  • Requires confirmation.

  • Rebuilds all generated type files to remove the user’s entity.

Publish updated record types.

baq publish
  • Requires an authenticated BAQ user.

  • Finds updated local record types and publishes them.

  • Rebuilds all generated type files with the updated versions.

© 2024 Quentez