The official Netskope CLI — manage your Netskope tenant from the command line
Project description
Netskope CLI
The official command-line interface for the Netskope platform. Manage your tenant, query events, investigate alerts, configure policies, and more — all from your terminal.
Available as both netskope and the shorter alias ntsk.
Installation
pip (all platforms)
pip install netskope
Homebrew (macOS / Linux)
brew tap netskopeoss/tap
brew install netskope
pipx (recommended — isolated install)
pipx installs the CLI in its own virtual environment so it won't conflict with other Python packages.
# Install pipx if you don't have it
# macOS
brew install pipx && pipx ensurepath
# Linux
python3 -m pip install --user pipx && pipx ensurepath
# Windows
py -m pip install --user pipx && pipx ensurepath
# Then install Netskope CLI
pipx install netskope
Windows
# Using pip (requires Python 3.11+)
py -m pip install netskope
# Or using pipx
py -m pipx install netskope
From source
git clone https://github.com/netSkopeoss/netksope-cli.git
cd netksope-cli
pip install .
Verify installation
netskope --version
ntsk --help
Quick Start
1. Configure your tenant
netskope config set-tenant mytenant.goskope.com
2. Authenticate
Option A — API token:
export NETSKOPE_API_TOKEN="your-token"
Option B — Browser SSO login:
netskope auth login
3. Start using the CLI
# Check tenant connectivity and status
ntsk status
# List recent alerts
ntsk alerts list --limit 10
# Search events by type
ntsk events list --type alert --limit 20
# List SCIM users
ntsk users list
# Export incidents as CSV
ntsk incidents list -o csv > incidents.csv
# View URL lists used in policies
ntsk policy url-list list
Output Formats
Every command supports multiple output formats via the -o / --output flag:
| Format | Flag | Description |
|---|---|---|
| Table | -o table |
Human-friendly table (default in TTY) |
| JSON | -o json |
Pretty-printed JSON |
| JSONL | -o jsonl |
One JSON object per line |
| CSV | -o csv |
Comma-separated values |
| YAML | -o yaml |
YAML output |
# Pipe JSON output to jq
ntsk alerts list -o json | jq '.[] | .alert_name'
# Export users to CSV
ntsk users list -o csv > users.csv
Commands
| Category | Commands |
|---|---|
| Status | status |
| Events | events list --type alert|application|network|... |
| Alerts | alerts list |
| Incidents | incidents list, incidents search, incidents uci |
| Users | users list, users groups list |
| Policy | policy url-list list, policy deploy |
| Auth | auth login, auth logout, auth status |
| Config | config set-tenant, config set-token, config show |
| Publishers | publishers list |
| Steering | steering private-apps list, steering config get |
| IPSec | ipsec tunnels list, ipsec pops list |
| Services | services cci APP_NAME, services tags list |
| DNS | dns profiles list, dns categories |
| Docs | docs open, docs search, docs jql |
Run ntsk --help or ntsk <command> --help for full details.
Environment Variables
| Variable | Description |
|---|---|
NETSKOPE_API_TOKEN |
API v2 token for authentication |
NETSKOPE_TENANT |
Tenant hostname (overrides config file) |
NETSKOPE_PROFILE |
Configuration profile to use |
# Check which values are active and their sources
netskope config show
Shell Completion
# Bash
netskope --install-completion bash
# Zsh
netskope --install-completion zsh
# Fish
netskope --install-completion fish
# PowerShell
netskope --install-completion powershell
Requirements
- Python 3.11 or later
- A Netskope tenant with API access
License
MIT
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netskope-0.2.9.tar.gz.
File metadata
- Download URL: netskope-0.2.9.tar.gz
- Upload date:
- Size: 124.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1018-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e5f5f0bca9c55ee1b2ef322ad144e30876f81b2ada1dd565b6445f615309200
|
|
| MD5 |
4db79bc2b97c39da31f621e0bc747bb8
|
|
| BLAKE2b-256 |
a9ab771302b9cbfaa6d21faae53f4ad87718c0dd72c379eaf758940e20fea07b
|
File details
Details for the file netskope-0.2.9-py3-none-any.whl.
File metadata
- Download URL: netskope-0.2.9-py3-none-any.whl
- Upload date:
- Size: 165.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.14.0-1018-aws
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c2d7254d9dc7c503046ed4cb4dbc39e98f3835714566e3eb90220acd2ff2ee9
|
|
| MD5 |
4960fbefd59b3003939ee4ca74522955
|
|
| BLAKE2b-256 |
6a9d6b8eddf392eef610e921b809480a1c9967d18cc58476ae86db380212bf86
|