Command-line tools for Kumiho Cloud asset management
Project description
kumiho-cli
Command-line tools for Kumiho Cloud asset management system.
Overview
kumiho-cli provides command-line utilities for authenticating with Kumiho Cloud and managing credentials. It's used by all Kumiho SDKs (Python, C++, Dart, FastAPI) to provide a unified authentication experience.
Installation
pip install kumiho-cli
Or install with pipx (recommended for CLI tools):
pipx install kumiho-cli
Quick Start
Login
Authenticate with your Kumiho Cloud credentials:
kumiho-cli login
This will:
- Prompt for your Kumiho Cloud email and password
- Obtain authentication tokens from Firebase
- Exchange for a Control Plane JWT
- Store credentials securely in
~/.kumiho/kumiho_authentication.json
Refresh Token
Refresh your authentication token:
kumiho-cli refresh
Check Status
View your current authentication status:
kumiho-cli whoami
Credential Storage
Credentials are stored in:
- Location:
~/.kumiho/kumiho_authentication.json - Permissions:
0600(read/write for owner only) - Format: JSON with Firebase ID token, refresh token, and Control Plane JWT
Environment Variables
| Variable | Description | Default |
|---|---|---|
KUMIHO_CONFIG_DIR |
Override config directory | ~/.kumiho |
KUMIHO_FIREBASE_API_KEY |
Firebase API key | (built-in) |
KUMIHO_FIREBASE_PROJECT_ID |
Firebase project ID | (optional) |
KUMIHO_CONTROL_PLANE_API_URL |
Control plane URL | https://kumiho.io |
KUMIHO_AUTH_TOKEN_GRACE_SECONDS |
Token refresh grace period | 300 |
Usage with SDKs
Python SDK
# Install kumiho with CLI tools
pip install kumiho[cli]
# Or install separately
pip install kumiho kumiho-cli
import kumiho
# Automatically uses credentials from kumiho-cli
kumiho.auto_configure_from_discovery()
projects = kumiho.get_projects()
C++ SDK
# One-time setup
pip install kumiho-cli
kumiho-cli login
#include <kumiho/kumiho.hpp>
// Automatically loads tokens from ~/.kumiho/
auto client = kumiho::Client::createFromEnv();
Commands
login
Interactive login with email and password.
kumiho-cli login [--api-key KEY] [--project-id ID]
Options:
--api-key: Override Firebase API key (default: uses built-in key)--project-id: Specify Firebase project ID (optional)
refresh
Refresh the cached authentication token.
kumiho-cli refresh
whoami
Display current user information.
kumiho-cli whoami
Security Best Practices
- Never commit credentials: Add
~/.kumiho/to your.gitignore - Use environment variables in CI/CD: Set
KUMIHO_AUTH_TOKENinstead of storing files - Rotate tokens regularly: Use
kumiho-cli refreshto get fresh tokens - Protect credential files: The CLI automatically sets
0600permissions
CI/CD Integration
For automated environments (GitHub Actions, Jenkins, etc.):
# Option 1: Use environment variable
export KUMIHO_AUTH_TOKEN="your-token-here"
# Option 2: Non-interactive login (if supported by your CI)
echo "password" | kumiho-cli login --email user@example.com
Development
Install from source
git clone https://github.com/kumihoclouds/kumiho-python.git
cd kumiho-python/kumiho-cli
pip install -e ".[dev]"
Run tests
pytest tests/
Troubleshooting
"No cached credentials found"
Run kumiho-cli login to authenticate.
"Token expired"
Run kumiho-cli refresh to get a fresh token.
"Permission denied" on credential file
chmod 600 ~/.kumiho/kumiho_authentication.json
Links
License
Apache License 2.0 - see LICENSE for details.
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 kumiho_cli-1.0.0.tar.gz.
File metadata
- Download URL: kumiho_cli-1.0.0.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c279ab900d74a8a701b56f67ac9ba917733bab180e95c451f4b1b89a70236cb4
|
|
| MD5 |
25dbb5286855de36f677c53ad172e08a
|
|
| BLAKE2b-256 |
4b433a359bb8ed910b718c2476fe4bfa16a1d4f5c108b7df0af6898f150195bd
|
File details
Details for the file kumiho_cli-1.0.0-py3-none-any.whl.
File metadata
- Download URL: kumiho_cli-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d915f7ec8c3810dbe28526f48efc22885c2460e64f56ff9d90f8e7542911fd48
|
|
| MD5 |
a99df5bd59e0512ad9da4cd9cf71869d
|
|
| BLAKE2b-256 |
a52d1fed44e7efedbe64be10a6aad990df309de036a856626944380aca0c5698
|