Skip to main content

A Glicthtip CLI

Project description

Glitchtipcli

Glitch-tip Error tracking software command-line tool in python click.

Prerequisites

Features Remaining - (TODO)

  • Push to PyPi
  • Containerized cli tool.
  • Make upstream changes to glitchtip backend to enable api token removal feature flag.
  • Create a reporting feature flag
  • Create a Jira integration

To run Glitchtip commandline tool local setup.

  • Step 1. Clone this repository and run the following commands to set up a virtual environment.
git clone git@gitlab.cee.redhat.com:cssre/glitchtipcli.git
cd glitchtipcli/
mkdir -p env
python3 -m venv env  # 'venv' is a module, 'env' is the target directory
source env/bin/activate
  • Step 2. Install all the python package requirements. You may need to update some package versions in the requirements.txt file depending on your python version.
pip install -r requirements.txt
pip freeze > requirements.txt
  • Step 3. Generate a Gltich-tip API Token from your Glitchtip instance. Login into your hosted or self hosted Glitchtip instance in the appropriate organization.

    • Step 3.1 Goto --> Profile --> Auth Tokens

    • Step 3.2 Click Create New Token button and give your Auth Token a name and apply the appropriate permissions.

      alt text

  • Step 4. You will be prompted for the API token and your Glitch-tip instance url the first time you run the script.

  • Example output (output may differ due to future updates to the CLI)

python3 src/glitchtipcli/glitchtipcli.py 
   _________ __       __    __  _     
  / ____/ (_) /______/ /_  / /_(_)___ 
 / / __/ / / __/ ___/ __ \/ __/ / __ \
/ /_/ / / / /_/ /__/ / / / /_/ / /_/ /
\____/_/_/\__/\___/_/ /_/\__/_/ .___/ 
                             /_/      

GT, Open Source Error Tracking Software! ☕ By Mark Freer

Looks like you don't have a `.env` file set up yet. Let's do it!
GlitchTip project API key: my-api-key  
GlitchTip instance url (https://glitchtip.example.net): my-gt-instance-url
Config successfully written to `.env` file.
Do you want to add `.env` to your `.gitignore` file? (y/n): y
`.gitignore` file successfully updated.

Usage: glitchtipcli.py [OPTIONS] COMMAND [ARGS]...

  A Glitch-tip Command line tool to query the Glitch-tip Error tracking
  software API.

Options:
  --help  Show this message and exit.

Commands:
  create-organization  Creates a new glitchtip organization
  create-project       Creates a new glitchtip Project
  create-team          Creates a new Team in glitchtip under your...
  create-user          Creates a new glitchtip User associated with an...
  delete-organization  Delete a glitchtip organization
  delete-project       Delete a glitchtip project
  delete-team          Delete a glitchtip team
  list-members         This returns the list of glitchtip projects members
  list-organizations   This returns the list of glitchtip Organization...
  list-projects        This returns the list of glitchtip projects
  list-teams           This returns the list of glitchtip teams
  list-tokens          Get the list of Glitchtip API tokens
  list-users           This returns the list of glitchtip specific org users
  • ASCIINEMA setup demo asciicast

Dev workflow

  • TBD
autopep8 --in-place --aggressive --aggressive glitchtipcli.py 

Please review the glitchtip contribution guideline for Getting-started.md

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

glitchtip_cli-1.0.0-py3-none-any.whl (16.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page