A Glicthtip CLI
Project description
Glitchtipcli
Glitch-tip Error tracking software command-line tool in python click.
Prerequisites
- Please review glitchtip API Documentation
- Python 3.8
- Click
- Docker
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 yourAuth Token
a name and apply the appropriate permissions.
-
-
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
Dev workflow
- TBD
autopep8 --in-place --aggressive --aggressive glitchtipcli.py
Please review the glitchtip contribution guideline for Getting-started.md
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for glitchtip_cli-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 42732e9a22c9cdd7e0318f06453104b8db52ce015d77be043039c49d1a2cc1a6 |
|
MD5 | 8a6ed9f438826ad9ae078c52a954b436 |
|
BLAKE2b-256 | b34c22fd909bd19b5748ad1ae9dd330d317278b855b13be75491ad42b56498c3 |