Skip to content

Command line tool

python -m cattle_grid

Usage:

python -m cattle_grid [OPTIONS] COMMAND [ARGS]...

Options:

  --config_file TEXT
  --help              Show this message and exit.

python -m cattle_grid account

Used to manage accounts associated with cattle_grid

Usage:

python -m cattle_grid account [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
python -m cattle_grid account delete

Lists existing accounts

Usage:

python -m cattle_grid account delete [OPTIONS] NAME

Options:

  --help  Show this message and exit.
python -m cattle_grid account list

Lists existing accounts

Usage:

python -m cattle_grid account list [OPTIONS]

Options:

  --actors  If set, also lists the actors associated with each account
  --help    Show this message and exit.
python -m cattle_grid account modify

Modifies an account

Usage:

python -m cattle_grid account modify [OPTIONS] NAME

Options:

  --add_permission TEXT     Adds the permission to the account
  --remove_permission TEXT  Adds the permission to the account
  --help                    Show this message and exit.
python -m cattle_grid account new

Creates a new account

Usage:

python -m cattle_grid account new [OPTIONS] NAME PASSWORD

Options:

  --admin            Set the admin permission
  --permission TEXT  Adds the permission to the account
  --help             Show this message and exit.

python -m cattle_grid actor

Used to manage actors

Usage:

python -m cattle_grid actor [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
python -m cattle_grid actor list

Usage:

python -m cattle_grid actor list [OPTIONS]

Options:

  --deleted  Only list deleted actors
  --help     Show this message and exit.
python -m cattle_grid actor modify

Adds a group to the actor

Usage:

python -m cattle_grid actor modify [OPTIONS] ACTOR_ID

Options:

  --add_group TEXT
  --help            Show this message and exit.
python -m cattle_grid actor prune

Usage:

python -m cattle_grid actor prune [OPTIONS]

Options:

  --help  Show this message and exit.
python -m cattle_grid actor show

Usage:

python -m cattle_grid actor show [OPTIONS] ACTOR_ID

Options:

  --help  Show this message and exit.

python -m cattle_grid async-api

Usage:

python -m cattle_grid async-api [OPTIONS]

Options:

  --filename TEXT
  --component TEXT  Restrict to a component. Currently allowed ap
  --help            Show this message and exit.

python -m cattle_grid block

Allows management of the level 0 blocklist of cattle_grid. These are the instances that you consider so bad you want them blocked on the lowest level possible.

Usage:

python -m cattle_grid block [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
python -m cattle_grid block add

Adds domain to the current list of domain blocks

Usage:

python -m cattle_grid block add [OPTIONS] DOMAIN

Options:

  --help  Show this message and exit.
python -m cattle_grid block compare

Compares the current block list with the one provided by source

Usage:

python -m cattle_grid block compare [OPTIONS]

Options:

  --source TEXT  URL or file to import blocklist from
  --help         Show this message and exit.
python -m cattle_grid block empty

Sets the blocklist to the empty set

Usage:

python -m cattle_grid block empty [OPTIONS]

Options:

  --help  Show this message and exit.
python -m cattle_grid block import

Imports the blocklist from source. By default the blocklist is merged with current one. By specifying the allow flag, one can overwrite the current blocklist.

Usage:

python -m cattle_grid block import [OPTIONS]

Options:

  --source TEXT  URL or file to import blocklist from
  --overwrite    Use to overwrite the existing blocklist instead of just
                 adding to it
  --help         Show this message and exit.
python -m cattle_grid block list

Prints the current blockllist in alphabetical order

Usage:

python -m cattle_grid block list [OPTIONS]

Options:

  --help  Show this message and exit.
python -m cattle_grid block remove

Removes domain from the current list of domain blocks

Usage:

python -m cattle_grid block remove [OPTIONS] DOMAIN

Options:

  --help  Show this message and exit.

python -m cattle_grid create-db-migration

Creates a database migration; run after editing models

Usage:

python -m cattle_grid create-db-migration [OPTIONS]

Options:

  --db_uri TEXT
  --name TEXT
  --help         Show this message and exit.

python -m cattle_grid extensions

Commands for managing extensions

Usage:

python -m cattle_grid extensions [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
python -m cattle_grid extensions async-api

Generates the async api schema for the extension

Usage:

python -m cattle_grid extensions async-api [OPTIONS] MODULE

Options:

  --help  Show this message and exit.
python -m cattle_grid extensions load

Loads an extension

Usage:

python -m cattle_grid extensions load [OPTIONS] MODULE

Options:

  --help  Show this message and exit.
python -m cattle_grid extensions openapi

Generates the openapi schema for the extension

Usage:

python -m cattle_grid extensions openapi [OPTIONS] MODULE

Options:

  --filename TEXT  Filename to write to
  --help           Show this message and exit.
python -m cattle_grid extensions run

Runs the extension as an independent server process. The configuration is taken from the same files as cattle_grid. Thus these must be present.

Usage:

python -m cattle_grid extensions run [OPTIONS] MODULE

Options:

  --host TEXT        Host to run on
  --port INTEGER     Port to run on
  --reload_dir TEXT  Reload on changes in directory
  --no_broker        Set to run without included broker
  --help             Show this message and exit.

python -m cattle_grid keys

Allows the management of public keys

Usage:

python -m cattle_grid keys [OPTIONS] COMMAND [ARGS]...

Options:

  --help  Show this message and exit.
python -m cattle_grid keys clear

Usage:

python -m cattle_grid keys clear [OPTIONS]

Options:

  --all_flag  Remove all known public keys
  --help      Show this message and exit.

python -m cattle_grid new-config

Creates a new authorization configuration, including generating a public and private key.

Argument is the actor_id for the fetch actor, e.g. http://cattle_grid/fetch_actor

Usage:

python -m cattle_grid new-config [OPTIONS] ACTOR_ID

Options:

  --config_file TEXT  Filename to save the configuration to
  --username TEXT     Specify a username for the fetch actor. Otherwise it is
                      automatically generated
  --force             Used to override the old configuration file
  --help              Show this message and exit.

python -m cattle_grid openapi

Usage:

python -m cattle_grid openapi [OPTIONS]

Options:

  --filename TEXT
  --component TEXT  Restrict to a component. Currently allowed auth or ap
  --help            Show this message and exit.

python -m cattle_grid stat

Displays statistical information about cattle_grid

Usage:

python -m cattle_grid stat [OPTIONS]

Options:

  --help  Show this message and exit.

python -m cattle_grid upgrade-db

Usage:

python -m cattle_grid upgrade-db [OPTIONS]

Options:

  --db_uri TEXT
  --help         Show this message and exit.