CLI
Biscuit provides a command line interface (CLI) to interact with the main application. The CLI is a powerful tool that allows you to perform a wide range of operations, such as managing extensions, files, and settings.
-
General Commands
General commands to manage the application, files, settings, and more
-
Editor Commands
Commands to manage the editor, files, settings, and more
-
Git Commands
Commands to manage Git repositories, branches, commits, and more
-
Extension Commands
Commands to manage extensions, install, update, and more
Overview
cli(path=None, dev=False)
Biscuit CLI
Run biscuit <path>
to open a folder/file
(biscuit .
for this directory)
Source code in src/biscuit/cli/cli.py
docs()
Open biscuit documentation
This command will open the biscuit documentation in the default browser.
Example
biscuit doc
run()
setup()
Setup the CLI commands
Loads all the commands from the cli extensions and registers them
Editor Commands
goto(path=None, linecol=None)
Open a file and go to a specific location
This command will open a file and go to a specific location.
Example
biscuit goto path/to/file line
biscuit goto path/to/file line:column
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the file. Defaults to None. |
None
|
linecol
|
str
|
The line and column to go to. Defaults to None. |
None
|
Source code in src/biscuit/cli/editor.py
open(path=None)
Open a file or folder in the editor
This command will open a file or folder in the editor.
Example
biscuit open path/to/file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
path
|
str
|
The path to the file or folder. Defaults to None. |
None
|
Source code in src/biscuit/cli/editor.py
Git Commands
clone(url)
Clone & open a git repository in Biscuit
This command will clone a git repository and open it in a new window.
Example
biscuit clone
Parameters:
Name | Type | Description | Default |
---|---|---|---|
url
|
str
|
The url of the git repository |
required |
Source code in src/biscuit/cli/git.py
diff(file1=None, file2=None)
Diff two files
This command will open a new window with the diff of the two files.
Example
biscuit diff path/to/file path/to/second/file
Parameters:
Name | Type | Description | Default |
---|---|---|---|
file1
|
str
|
The path to the first file. Defaults to None. |
None
|
file2
|
str
|
The path to the second file. Defaults to None. |
None
|
Source code in src/biscuit/cli/git.py
Extension Commands
dev()
Start the extension development server
This command will load the extension located in the current working directory and
start Biscuit in development mode. The command assumes that the
current directory is the root of the extension project (i.e. it
contains a pyproject.toml
or a src/<name>/
package with a
setup
entrypoint).
Source code in src/biscuit/cli/extensions.py
265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 |
|
ext()
Commands for managing and developing biscuit extensions
This command group allows you to manage and develop biscuit extensions.
Examples::
biscuit ext list
biscuit ext install extension_name
biscuit ext uninstall extension_name
Extension Dev commands::
biscuit ext new my_extension
biscuit ext dev
biscuit ext test
Source code in src/biscuit/cli/extensions.py
info(name)
Show information about an extension by name
Example::
biscuit ext info extension_name
Args::
name (str): The name of the extension
Source code in src/biscuit/cli/extensions.py
install(name)
Install an extension by name
Example::
biscuit ext install extension_name
Args::
name (str): The name of the extension
Source code in src/biscuit/cli/extensions.py
list_ext(user, installed)
List all extensions or installed or filter by user
Example::
biscuit ext list
biscuit ext list -u user
biscuit ext list -i
Args::
user (str): Filter by user
installed (bool): Show installed extensions
Source code in src/biscuit/cli/extensions.py
new(name, template, output, description, author, version, force)
Create a new Biscuit extension project from a scaffold template.
Examples::
biscuit ext new my_extension # uses default template
biscuit ext new my_extension -t widget # uses a named template
biscuit ext new my_extension -t https://github.com/user/repo.git
Source code in src/biscuit/cli/extensions.py
publish(skip_tests)
Guide for publishing the extension to the Biscuit marketplace.
Biscuit extensions are distributed via the central
biscuit-extensions
repository which aggregates extension git
submodules (see https://github.com/tomlin7/biscuit-extensions). This
command validates the current project, optionally runs the test-suite and
then prints step-by-step instructions on how to add your repository as a
submodule and update extensions.toml
.
Source code in src/biscuit/cli/extensions.py
389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 |
|
test(keyword, verbose)
Run the extension's pytest suite.
Stand in the root of your extension project and run::
biscuit ext test
The command locates the tests
directory (or any test_.py / _test.py
files) under the current working directory and executes them with
pytest. You can forward a -k keyword expression and enable verbose
output via -v.
Source code in src/biscuit/cli/extensions.py
uninstall(name)
Uninstall an extension by name
Example::
biscuit ext uninstall extension_name
Args::
name (str): The name of the extension
Source code in src/biscuit/cli/extensions.py
update(skip_tests)
Guide for updating an already published extension.
Produces a checklist for bumping your extension to a new version in the
biscuit-extensions
repository. Similar to publish, but assumes the
extension submodule already exists and only needs a version/commit
update.