Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
cb6cd2e
teams commands
martindstone Sep 19, 2024
2624db2
add paginated fetch to client, start on catalog commands
martindstone Sep 19, 2024
cd0aaa9
fetch for different endpoint response shapes
martindstone Sep 20, 2024
7201583
first pass at audit-logs
jeff-schnitter Sep 20, 2024
915c9ab
Add custom-data commands
jeff-schnitter Sep 20, 2024
765a2fd
Add simple descriptions for each command.
jeff-schnitter Sep 20, 2024
7bc72b1
Add custom-events; minor clean up
jeff-schnitter Sep 23, 2024
703110c
add raw request commands
martindstone Sep 26, 2024
4a4c9da
add a blank line to raw post/put when reading from interactive termin…
martindstone Sep 26, 2024
2471abe
give a nice error when invalid param
martindstone Sep 26, 2024
7e474ea
Add dependencies commands
jeff-schnitter Sep 30, 2024
2d2886d
Add custom-metrics
jeff-schnitter Oct 1, 2024
ca41f9c
Add deploys command
jeff-schnitter Oct 7, 2024
2908f35
new fetch in client, CSV and table output in utils.py
martindstone Oct 8, 2024
0c38697
Modify deploys tests to support typer
jeff-schnitter Oct 8, 2024
d165686
Add tests
jeff-schnitter Oct 8, 2024
6223ad4
Add test utils; clean up tests
jeff-schnitter Oct 9, 2024
85560fe
print from context fn to move more output flag validation to utils
martindstone Oct 12, 2024
acec276
Add discovery audit
jeff-schnitter Oct 14, 2024
04adc78
Fix merge conflicts
jeff-schnitter Oct 14, 2024
c1a756e
Separate discovery audit tests
jeff-schnitter Oct 14, 2024
de6d241
Break out discovery audit tests
jeff-schnitter Oct 14, 2024
685991d
Add docs API commands
jeff-schnitter Oct 14, 2024
c680e4c
rename raw to rest
martindstone Oct 15, 2024
fd991aa
add table sorting, default to show usage when no command given
martindstone Oct 15, 2024
3567fa9
Use just for build
jeff-schnitter Oct 16, 2024
6a6f091
Merge branch 'typer' of github.com:cortexapps/cli into typer
jeff-schnitter Oct 16, 2024
4bddfb7
Partial implementation for entity types
jeff-schnitter Oct 17, 2024
6e762f6
Add GitOps Logs. Could use some additional test coverage.
jeff-schnitter Nov 1, 2024
32607f3
Add groups
jeff-schnitter Nov 4, 2024
9a30031
Add IP allowlist
jeff-schnitter Nov 5, 2024
b718bef
Add oncall. No tests for now because we cannot ensure test environme…
jeff-schnitter Nov 5, 2024
da9f467
Add packages
jeff-schnitter Nov 7, 2024
512ab55
Add packages
jeff-schnitter Nov 7, 2024
1bcb3e7
Add plugins
jeff-schnitter Nov 8, 2024
47a6405
Add queries
jeff-schnitter Nov 8, 2024
4ce1f2a
Add partial SCIM commands
jeff-schnitter Nov 8, 2024
b3f1a41
Partially completed implementation of scorecards, need to finish some…
jeff-schnitter Nov 18, 2024
8bceaf1
Finish scorecards tests
jeff-schnitter Nov 20, 2024
5bfd05c
Add AWS integration
jeff-schnitter Nov 23, 2024
31e308c
Azure Resources
jeff-schnitter Nov 27, 2024
b74653c
Azure DevOps
jeff-schnitter Nov 27, 2024
590b93f
CircleCI
jeff-schnitter Nov 27, 2024
356476e
Created rest of integrations, essentially all clones of each other, n…
jeff-schnitter Nov 28, 2024
2e57ab7
Catalog updates
jeff-schnitter Dec 13, 2024
d154a25
catalog and API key commands
jeff-schnitter Dec 20, 2024
aa4eec7
Add workflows
jeff-schnitter Dec 20, 2024
02d946e
Show help when no command provided
jeff-schnitter Dec 20, 2024
3ecae2e
Big sweep to get all tests running
jeff-schnitter May 30, 2025
082b059
Remove need to load data before tests.
jeff-schnitter Jun 6, 2025
961f830
A little more cleanup - remove references to public-api-test
jeff-schnitter Jun 6, 2025
a345b7e
Test clean up
jeff-schnitter Jun 11, 2025
c9d1b39
Fix syntax error
jeff-schnitter Jun 11, 2025
ac26f9c
Minor updates
jeff-schnitter Jun 13, 2025
20a98db
Update version information
jeff-schnitter Jun 13, 2025
4a8c5eb
merge conflicts
jeff-schnitter Jun 13, 2025
cdac2d7
Fix vuln in requests library
jeff-schnitter Jun 13, 2025
99c5112
Merge branch 'main' into typer
jeff-schnitter Jun 13, 2025
3d5535a
Run apt as root
jeff-schnitter Jun 13, 2025
0f80094
Merge branch 'typer' of github.com:cortexapps/cli into typer
jeff-schnitter Jun 13, 2025
3fbbc05
Fix catalog patch test
jeff-schnitter Jun 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @jeff-schnitter @rich-jay
* @jeff-schnitter
12 changes: 2 additions & 10 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ on:
env:
AWS_ACCOUNT_ID: ${{ secrets.AWS_ACCOUNT_ID }}
CORTEX_API_KEY: ${{ secrets.CORTEX_API_KEY }}
CORTEX_API_KEY_RICH_SANDBOX: ${{ secrets.CORTEX_API_KEY_RICH_SANDBOX }}
CORTEX_API_KEY_VIEWER: ${{ secrets.CORTEX_API_KEY_VIEWER }}
CORTEX_BASE_URL: ${{ vars.CORTEX_BASE_URL }}
GH_PAT: ${{ secrets.GH_PAT }}
GH_WEBHOOK_SECRET: ${{ secrets.GH_WEBHOOK_SECRET }}
CORTEX_GH_WEBHOOK_URL: ${{ vars.CORTEX_GH_WEBHOOK_URL }}

jobs:
test:
Expand All @@ -41,6 +37,7 @@ jobs:

- name: Install dependencies
run: |
sudo apt update && sudo apt install just
python -m pip install --upgrade pip
pip install poetry poetry-audit-plugin pytest-cov pytest pytest-xdist

Expand All @@ -53,11 +50,6 @@ jobs:
echo "[default]" > $HOME/.cortex/config
echo "api_key = $CORTEX_API_KEY" >> $HOME/.cortex/config
echo "base_url = $CORTEX_BASE_URL" >> $HOME/.cortex/config
echo "[rich-sandbox]" >> $HOME/.cortex/config
echo "api_key = $CORTEX_API_KEY_RICH_SANDBOX" >> $HOME/.cortex/config
pwd
ls -l $HOME/.cortex
cat $HOME/.cortex/config
shell: bash

- name: Install package
Expand All @@ -67,4 +59,4 @@ jobs:

- name: Test with pytest
run: |
make all-cli
just test-all
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ coverage.json
.github/workflows/test.yml
.export
report.html
import.html
report*.html
.load-data-done

20 changes: 20 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Release History
===============

1.0.0 (2025-06-13)
------------------

**Improvements**
- A complete re-write centered around the [typer library](https://typer.tiangolo.com/) and better code modularization
- Added sub-commands:
- api-keys
- custom-metrics
- initiatives
- workflows
- Removed sub-commands:
- team hieararchies
- added `--table` and `--csv` options to list commands

**Breaking Changes**
- custom-events -i timestamp changed to -ts timestamp
- plugins `get` command changed to `list`
- plugins `get-by-tag` subcommand changed to `get`
- `resource-definitions` command changed to `entity-types`

0.27.0 (2025-01-04)
------------------

Expand Down
35 changes: 35 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cortex_cli := 'poetry run cortex'
pytest := 'PYTHONPATH=. poetry run pytest -rA'

export CORTEX_API_KEY := env('CORTEX_API_KEY')
export CORTEX_BASE_URL := env('CORTEX_BASE_URL', "https://api.getcortexapp.com")
export CORTEX_API_KEY_VIEWER := env('CORTEX_API_KEY_VIEWER')

help:
@just -l

_setup:
@if [ -f .coverage ]; then rm .coverage; fi

# Run all tests
test-all: _setup test-parallel test-serial

# Run tests that can run in parallel
test-parallel: test-import
{{pytest}} -n auto -m "not setup and not serial" --html=report-parallel.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests

# Run all tests serially - helpful to see if any tests seem to be hanging
_test-all-individual: test-import
{{pytest}} --html=report-all-invidual.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests

# Run tests that have to run sequentially
test-serial: test-import
{{pytest}} -n auto -m "serial" --html=report-serial.html --self-contained-html --cov=cortexapps_cli --cov-append --cov-report term-missing tests

# Run import test, a pre-requisite for any tests that rely on test data.
test-import:
{{pytest}} tests/test_import.py --cov=cortexapps_cli --cov-report=

# Run a single test, ie: just test tests/test_catalog.py
test testname:
{{pytest}} {{testname}}
268 changes: 0 additions & 268 deletions Makefile

This file was deleted.

Loading